469,957 Members | 2,579 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,957 developers. It's quick & easy.

paint question

i am using this code to try to paint a line on my form and it wont work i
get an object not set to a reference error

Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)

Dim formGraphics As System.Drawing.Graphics

formGraphics = Me.CreateGraphics()

formGraphics.DrawLine(myPen, 0, 0, 200, 200)

myPen.Dispose()

formGraphics.Dispose()

what is wrong

thanks for the help

WStoreyII
Nov 20 '05 #1
0 1412

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Franck | last post: by
5 posts views Thread by Tamir Khason | last post: by
5 posts views Thread by vooose | last post: by
8 posts views Thread by WStoreyII | last post: by
7 posts views Thread by hamil | last post: by
4 posts views Thread by Sam | last post: by
5 posts views Thread by =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post: by
reply views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.