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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where can I use the VB.NET drawing tools?

Status
Not open for further replies.

capitano

Programmer
Jul 30, 2001
88
US
In Visual Studio .NET, I see a bunch of standard drawing tools on the menu bar: line, square, circle, etc. But they're all grayed-out. I can't seem to figure out how (or when) they're active and useable. Not on forms, not on picture boxes, not on panels, and not on anything else that seems a valuable place to use them.

Anybody know how to use these things?
 
I do not know what they're for but I do know how to perform graphics operations on windows forms. The form object exposes a method called CreateGraphics. This method returns the graphics object for the form.

Among other things, there are methods like DrawEllipse, DrawRectangle, and DrawLine that will get you your circle, square, and line respectively. Check out the docs for the System.Drawing.Graphics class for more info.
 
Capitano -

Add a bitmap file to your project. When you double-click on it, it's brought up in an image editor where you can make use of those toolbar, uhhhh, tools.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top