Hello world using windows form.

Creating .NET windows form from zero.

Page 1 of 1

3 Replies - 3007 Views - Last Post: 13 December 2008 - 08:56 PM Rate Topic: -----

#1 red_4900  Icon User is offline

  • Code T(h)inkers
  • member icon

Reputation: 21
  • View blog
  • Posts: 1,120
  • Joined: 22-February 08

Hello world using windows form.

Post icon  Posted 13 December 2008 - 06:24 AM

I've been creating windows form starting from the template prepared. But how to create windows form starting from empty project? Can someone teach me step-by-step?

1 - Create empty project. (done)
2 - Add reference to all the required component in the reference section. (done)
3 - Now what?

ps : I already watch the tutorial in here by PsychoCoder, but it starts by choosing the template, not from empty project.
Is This A Good Question/Topic? 0
  • +

Replies To: Hello world using windows form.

#2 danzar  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 108
  • Joined: 10-December 08

Re: Hello world using windows form.

Posted 13 December 2008 - 06:56 AM

View Postred_4900, on 13 Dec, 2008 - 05:24 AM, said:

I've been creating windows form starting from the template prepared. But how to create windows form starting from empty project? Can someone teach me step-by-step?

1 - Create empty project. (done)
2 - Add reference to all the required component in the reference section. (done)
3 - Now what?

ps : I already watch the tutorial in here by PsychoCoder, but it starts by choosing the template, not from empty project.



I would suggest making a empty project then make a template project. compare the two to see what the diffence is and you should be good. Just an ideal
Was This Post Helpful? 0
  • +
  • -

#3 red_4900  Icon User is offline

  • Code T(h)inkers
  • member icon

Reputation: 21
  • View blog
  • Posts: 1,120
  • Joined: 22-February 08

Re: Hello world using windows form.

Posted 13 December 2008 - 08:02 AM

Edit :
If I were to compare both :
Template:
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.Run(new Form1());
		}

Mine :
		static void Main() 
		{
			Application.Run(new Form1());
		}

I know this might requires too much of an explanation, so if you think it would take too much time explaining all that, I would appreciate it if anyone would recommend any books or website that would give step-by-step tutorial.

This post has been edited by red_4900: 13 December 2008 - 08:15 AM

Was This Post Helpful? 0
  • +
  • -

#4 jakepogo  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 13-December 08

Re: Hello world using windows form.

Posted 13 December 2008 - 08:56 PM

This is how I start all my coding projects, Then I give the project System, System.Drawing, & System.Windows.Forms refrences.... I add others when I need them but thats all you should need for a beginner program.

using System;
using System.Windows.Forms;

public class frmMain : Form
{
public static void Main()
{
frmMain main= new frmMain();
Application.Run(main);
}

public frmMain()
{
InitializeComponent();
}

}
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1