Guest Chiragc Posted October 8, 2002 Posted October 8, 2002 Hi everyone! Can anyone tell me how to draw a triangle in vb.net? I am using the drawPolygon method. I want to use variables such as Xpos, and Ypos, instead of static variables. any ideas? Quote
*Gurus* divil Posted October 8, 2002 *Gurus* Posted October 8, 2002 Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) Dim Points(2) As Point Points(0) = New Point(100, 100) Points(1) = New Point(150, 100) Points(2) = New Point(100, 150) e.Graphics.DrawPolygon(Pens.Red, Points) End Sub Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.