G
Guest
I have the following code and I don't understand why I get a "Declaration
expected" error for the myPen and formGraphics variables.
Imports System.Drawing
Public Class ucInfield
Dim myPen As New Pen(System.Drawing.Color.Red)
Dim formGraphics As Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawLine(myPen, 0, 0, 200, 200)
myPen.Dispose()
formGraphics.Dispose()
End Class
In the last four lines, Intellisense shows them with squiggly lines and the
project won't compile. Any help would be appreciated.
Regards,
Mark
expected" error for the myPen and formGraphics variables.
Imports System.Drawing
Public Class ucInfield
Dim myPen As New Pen(System.Drawing.Color.Red)
Dim formGraphics As Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawLine(myPen, 0, 0, 200, 200)
myPen.Dispose()
formGraphics.Dispose()
End Class
In the last four lines, Intellisense shows them with squiggly lines and the
project won't compile. Any help would be appreciated.
Regards,
Mark