Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Graphics not working

Status
Not open for further replies.

balajee

Programmer
Jun 29, 2000
134
0
0
NZ
Hi

I am new to .NET and trying to draw a line on a picture box.
I have just the following code:

Option Strict On
Imports System.Drawing.Drawing2D
Public Class frmMain
Inherits System.Windows.Forms.Form
Dim graphics1 As Graphics

+ Windows Form Designer generated code

End Class

It is giving me an error on the statement: "Dim graphics1 As Graphics" saying "Type expected".

Cannot figure it out what's wrong.

Thanks,
 
Sorry guys.
I did not realise that I had named the solution as "Graphics" which must have clashed with the "Graphics" class. I created another solution with different name and the above code did not report any errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top