views:

50

answers:

2

I'm using .NET 2.0 Windows Forms and want to add "drawing" components such as lines, rectangles, etc.. I've done this before in MS Access, but I can't seem to find similar things in teh Visual Studio 2005 IDE. Where do I need to look to find these elements?

+2  A: 

If you're using .NET 2 with Windows Forms, one option is to install the Visual Basic 2005 Power Pack (which is also usable from C#). It includes a series of line and shape controls.

Otherwise, you can use GDI+ and the System.Drawing namespace to draw manually.

Reed Copsey
Thanks for the suggestion. I don't think I'll be installing the Power Pack at this time. That's the correct solution, but I'm very surprised that MS didn't include a set of drawing controls in their initial release.
Ben McCormack
@Ben: They did, later - but I believe it's part of Microsoft.VisualBasic.dll which ships with .NET 3.0... In 2.0, you need the power pack. Otherwise, in 2.0, it's using GDI to draw by hand :(
Reed Copsey
A: 

Since these components are not in Visual Studio (the way they were for VB6), you have four choices.

Personally, I like options 3 and 4.

Added

Hey, here's a good article for option 4! http://msdn.microsoft.com/en-us/library/aa289517(VS.71).aspx

David Stratton