How to make Windows.Form in C# by Visual Studio


Now i will learn ho to show and using windows form language c#. what is windows form? windows form is a screen display when you open aplication of computer maybe you can make game from this.

first open your visual studio aplication in your computer => create new project => console project and use c# language.


then give name your project name. if all done, right click on reference => edit reference => search Windows.Form then checked that.


back to your program.cs or code c#, clean all code there.
in first line and second + Using System; and Using System.Windows.Form;
then write code below

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

}

you can run for tested.
A little extra from this article i want learn to adding title in your form hehe, emm you just copy paste code below:

public class MainClass:Form
{
  static void Main()
      {
             Application.Run(new MainClass());
      }
  public MainClass() //this must same by name of your class
      {
               this.Text = "Soeratman Blog"; //your title form using string tipe
       }

}

Maybe we can see again in next article by more big program. thank you by visiting my article, see ya.

Add comments if you want ask question.

0 Response to "How to make Windows.Form in C# by Visual Studio"

Post a Comment

Relevan Untuk Anda

Powered by Blogger.