mechwarrior3
Well-known member
- Joined
- Dec 19, 2005
- Messages
- 67
- Programming Experience
- Beginner
Hello,
So, I am trying to use graphics to draw a black triangle on Button1. I am trying to draw this at the time the form loads. However, when I run my code, there is no triangle drawn on my button. Why not? Here is the code I'm using in the Form1_Load function:
All help is greatly appreciated.
So, I am trying to use graphics to draw a black triangle on Button1. I am trying to draw this at the time the form loads. However, when I run my code, there is no triangle drawn on my button. Why not? Here is the code I'm using in the Form1_Load function:
My Code said:
Dim g As Graphics
Dim myBrush AsNew SolidBrush(Color.Black)
Dim myPoints(2) As System.Drawing.Point
myPoints(0).X() = 0
myPoints(0).Y() = 0
myPoints(1).X() = 57
myPoints(1).Y() = 21
myPoints(2).X() = 114
myPoints(2).Y() = 0
g = Me.Button1.CreateGraphics
' g.FillPolygon(myBrush, New Point() {New Point(0, 0), New Point(57, 21), New Point(114, 0)})
g.FillPolygon(myBrush, myPoints)
All help is greatly appreciated.