Hey guys I'm new to C#.NET but I'm trying to create my own Form using my own GUI code. However I'm unsure which project I need when using Visual Studio 2008. A normal person would assume that selecting Windows Forms Application would be correct. However you'd be wrong it would appear that you can't create your own code for the GUI since it incorperates a GUI builder. I'd sooner learn the hard way than have the GUI Builder do it for you. Any ideas has to what I can do?

You can create any project type and put in your windows forms by referencing System.Windows.Forms.dll

Right based on what you said I've gone for an ASP.net application, that gives me the best of both worlds. However the import for System.windows isn't there.

Yes, you can, but logically why user in web-based application interacts with windows forms?! it sounds not logic at all, instead interacts with web forms.

Ok well Ive tried the following

private Label lb;

however i get the following error:

Error 1 The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?) C:\Users\John\Documents\Visual Studio 2008\Projects\Project1\Project1\Class1.cs 5 7 Project1

Error 2 The type or namespace name 'Label' could not be found (are you missing a using directive or an assembly reference?) C:\Users\John\Documents\Visual Studio 2008\Projects\Project1\Project1\Class1.cs 13 17 Project1

In the references though I've added the link to WindowsFormsInteragtion, and added the using System.Windows.Forms;
Any ideas?

WindowsFormsInteragtion??
No just add reference to System.Windows.Forms and write it in Using section.
but just question, did u add this dll for creating labels?!!! HTML and ASP.NET has label control, you don't need to add Windows.Forms to create control exists in asp.net!!

Technology is something that makes things easier, Why do you want to write code just to have a Form, you can just select a Win Form when you start your Project or Add it

cause vuyiswamb sometimes it takes rewritting some code to understand it, and learn what goes on behind the scences.

You're getting yourself a bit confused, Acidburn. ASP .NET and WinForms are two different worlds entirely. ASP .NET is strictly for web-based application development, meaning that everything you display to the user will be a webpage.

WinForms is like a more traditional application.

I know I'm not answering your original question (I am an ASP .NET dev), but if you try to mix up WinForms and ASP, you'll just get frustrated.

I understand what you mean, If you do it for understanding purpose its fine. but man there are a lot of things to learn in .NET than a code behind a winform ,its Simple if you have once done coding in java, you will understand that the code behind the winform , is just declaring a form , telling it how big should it be, where should it display when ran and more, there is nothing interesting about it, but still i understand what you mean.

cool

This article has been dead for over six months. Start a new discussion instead.