well im trying to get it so when a persons mouse goes into a picture box, which I have named as prender, a box is drawn around the mouse, and then it follows the mouse, the code I have is this
Private Sub prender_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles prender.MouseMove
Dim p As Pen
Dim g As Graphics
g.DrawRectangle(p, e.X, e.Y, 40, 40)
End Sub
this all builds, and everything, but when i try it in the app, I get a Object reference not set to an instance of an object error...
can someone help me with this I havent used GDI much, so im not firmiliar that much with it.
Private Sub prender_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles prender.MouseMove
Dim p As Pen
Dim g As Graphics
g.DrawRectangle(p, e.X, e.Y, 40, 40)
End Sub
this all builds, and everything, but when i try it in the app, I get a Object reference not set to an instance of an object error...
can someone help me with this I havent used GDI much, so im not firmiliar that much with it.