Part 1 - Introducing (WF)
Today we are gonna look at C# at introducing to it and the basics of windows form.Lets start with what C# is?
Microsoft C# Visual Studio is a programming language wich you can use to create programs or different applications. You can work with windows forms, xml, sockets, consoles and much more.
C# is similar to C & C++ or java, but is not the same language and they all work different. They got different ways to work with things on.
Your very first script/program.
Lets take a look on a windows form application with a Messageboxes, a Textbox and a Button.
First you have to create a new project.
Choose "windows form application".
Now change the size so it fit, to what you want.
Now at the top of it create a label.
(Use the toolbox, you can choose it up in right it looks like some tools that you work with)
Click on the label and find "text".
Change the text "label1" to "Write: My First Script"
Now create a button.
Click on the button and find "text"
Change the text "Button1" to "Right Text?"
Now just place the button in the middle of the window.
Now create a textbox and make the size of it similar to this:
[ this is the textbox ]
Place the button beside the textbox, so it looks like this:
[ this is the textbox ][BUTTONHERE]
Now double on the Button.
Now find:
Code:
InitializeComponent();
}
Code:
private string Text = "My First Script"
it could look like this:
Code:
if (Text == textBox1.Text) //Calls the private string from before
{
Code:
//Private void above this
{
if (Text == textBox1.Text) //Calls the private string from before
{
MessageBox.Show("You have created your first script successfull, congratulations.");
}
else
{
MessageBox.Show("Please type in: My First Script.");
}
}
Then click on OK.Quote:
My First Script
And it should say:
You have created your first script successfull, congratulations.
And if you put other things or nothing it will say:
Please type in: My First Script.
Congratulations you have created your first C# script and windows form application.
But how do you save it as a program?
Click on build.
Then go to the release folder.
Then you got your files there.
You can take them to anywhere or put them in a rarfile, zipfile anything, so you can upload it or show friends etc.
I hope this was useful.
In Part 2, we will look at checkboxes.

---------------------------------------
Any problems, post a reply or PM me.






