tags:

views:

287

answers:

2

Hello, I am new to c# and VS, but I am getting it. The application is this: A program in which the end result will draw a spider from options in which the user will define. Lets say there are 100s of options: size and number of body parts, color, connections points to the body, etc.

First question: Should I try to use the library included with VS 2005? Or, is there another environment in which I could "tap into" to get good results (flash, java, etc.)?

Second Question: Could you direct me to information corresponding to your answer from the first question?

Thanks so much, the kids I teach will love it!

Jennifer

+1  A: 

Here is a link to some examples of how to draw things with C#:

http://www.geekpedia.com/tutorial50_Drawing-with-Csharp.html

This example uses just the built-in graphics methods of .NET, so you won't need any other libraries.

MusiGenesis
+2  A: 

Hmm.

This is truly a rough question, not because I don't know how to do it, but because it can often be so ridiculously daunting for beginners. If you use the "standard" Windows Forms C# method of doing it, you'll end up asking yourself, "What the #*(&! is WM_PAINT?" or "Why does my program totally get messed up when I move a window over my picture?!"

There are basically two main technologies that you can use to do drawing in .NET : Windows Forms (what MusiGenesis suggested) and WPF, or Windows Presentation Foundation, which ships with the 3.0 version of Visual Studio. That means that if you download the .NET 3.5 SDK or use Visual Studio 2008, WPF comes with it.

I'd recommend using WPF instead of Windows forms if you're just starting off, because the dirty details of drawing and repainting are largely abstracted. You can also define a lot of your picture as markup, just like a web page, and then manipulate it in code. Good luck and have fun!

Dave Markle
Drawing in windows forms is definitely more complicated than it should be. A simple double-buffered canvas control in .NET would have made a world of difference (I think VB.NET has one but I don't remember).
MusiGenesis
Last I checked, VB.NET didn't have one built in. :( Thank God I haven't had to check VB.NET in a while!
Dave Markle