Guys the below code is not working ( i know i am trying to reference a
function!) .
Im a beginner so does anyone know how i could reference the bitmap?
Private Sub MarkVORToolStri pMenuItem_Click (ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
MarkVORToolStri pMenuItem.Click
If ContextMenuStri p1.SourceContro l.BackgroundIma ge Is
DrawCross() Then
msgbox("test")
End Sub
Friend Function DrawCross() As Bitmap
Dim sampleBitmap As New Bitmap(32, 32)
Dim g As Graphics = Graphics.FromIm age(sampleBitma p)
Dim p As New Pen(Professiona lColors.ButtonP ressedBorder)
p.Color = Color.Red
Try
p.Width = 2
g.DrawLine(p, -35, 65, 80, -45)
g.DrawLine(p, 200, 200, 0, 0)
Finally
p.Dispose()
End Try
Return sampleBitmap
End Function
function!) .
Im a beginner so does anyone know how i could reference the bitmap?
Private Sub MarkVORToolStri pMenuItem_Click (ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
MarkVORToolStri pMenuItem.Click
If ContextMenuStri p1.SourceContro l.BackgroundIma ge Is
DrawCross() Then
msgbox("test")
End Sub
Friend Function DrawCross() As Bitmap
Dim sampleBitmap As New Bitmap(32, 32)
Dim g As Graphics = Graphics.FromIm age(sampleBitma p)
Dim p As New Pen(Professiona lColors.ButtonP ressedBorder)
p.Color = Color.Red
Try
p.Width = 2
g.DrawLine(p, -35, 65, 80, -45)
g.DrawLine(p, 200, 200, 0, 0)
Finally
p.Dispose()
End Try
Return sampleBitmap
End Function
Comment