C# Gui implementations

thesadguy

Active Member
Joined
Nov 29, 2008
Messages
70
Reaction score
0
Can anyone give me a link to a resource for C# GUI implementation? Everything I've seen only talks about using Visual Studio. I'd like to do it programmatically.

Thanks!
 
Visual Studio is simply the IDE, are you wanting an alternative IDE for .Net programming?
You can use Visual Studio to write the code that programatically populate controls on a form.
 
I'm looking for some references where I can learn to programmatically create a GUI.

The articles I have found online so far all talk about using Visual Studio's Designer to graphically create the GUI.

An example:

In Java, I create a class GuiComponents that contains the definitions of various widgets and defines how they are laid out. I can create an instance of the GuiComponents class that will serve as the starting point for my application.

The examples of C# GUI implementation that I have found thus far simply say things like
"Open Visual Studio, drag the component from the toolbox to the Designer pane" etc...

I'd like a more programmatic way of creating the GUI.
 
var tb = new TextBox();

tb.height = 100;
tb.width = 300;
etc, etc

Form.Controls.Add(tb);
 
at a minimum I think you;d need to give the TextBox an ID property in oder to reference it
 
I think your best bet would be to play around with the classes found in the System.Windows.Forms namespace. You can add and manipulate all controls programmatically, hence no need for the designer.
 
Dude, before you go there. First learn what .Net is about and how to use it. If you've got that under the belt (which might take some time), then you start going more advanced in trying to generate screen by not using the designer. But first use the designer supplied by the Visual Studio IDE to learn the stuff. The Visual Studio IDE is the best there is so you won't find better.

If you don't want to use the IDE, use notepad then...
 
You can see what code the Visual Studio generates when creating a form in the designer, rather use the designer and then look at the code. It will give you an understanding of whats going on.
 
Top
Sign up to the MyBroadband newsletter
X