Tuesday, 28 May 2013

C# chapter 1 : C# or C sharp For Beginer

c# Chapter 1


Let   WIRTE    our   FIRST c#  program !


It have been about 2 month, I not write on this blog !
I am learning about Microsoft Visual C# (They call it C Sharp) all these times.

Now I can write some simple program.  OK! Let start.

1st]  MUST have Microsoft Visual C#.

2nd] Install it.

3rd] Start the program.

4th] Select : File -> New -> Project


5th] select .Net Framework 2.0 , then select Windows Forms Application, type your File Name, File Path.
        Then select OK.


6th]  After a while, the form come out . Find the ToolBox Tab, that is on the Left side of the sreen. Click it.    Then  Click the Pin on the Toolbox  to Lock it.  [Must do this.]



7th]   Use mouse click and Drag to resize the form


8th]  Use Mouse drag the scroll bar on the ToolBox to find    TextBox  , click on it , then click near on the left side in the form. Drag to the right side.  Release the mouse , Then   press keyboard   Esc .



9th]  Use Mouse drag the scroll bar on the  Properties  on the bottom right   to find    Multiline  ,  use the mouse to the change False  to  True.   The Textbox will become bigger.



10th]  Use Mouse drag the scroll bar on the ToolBox to find    Button  , click on it , then click in the form. Drag to the right side.  Release the mouse , Then   press keyboard   Esc .   Remember to  press keyboard   Esc      every time !

   Now there is a  Button in the form. Program is  write  inside the button.

OK!  Let start our FIRST c#  program !
I call it  Hello World !
It will show up  inside the Textbox  in the Form.


1}  Double click on button1
~  ~ Wait for a while  ~ ~ ~
This screen will come out.



2}   OK!  Let   WIRTE    our FIRST c#  program !  

This is the blank button1 program , DON'T DELETE ANY OF THESE !

        private void button1_Click(object sender, EventArgs e)
        {
        }


INSIDE THE   {   }   WIRTE  YOUR  PROGRAM (you can copy and paste these 3 Lines below)
            string STR_A;
            STR_A = " Hello World";
            textBox1.Text = STR_A;


SO  IT BECOME THIS
        private void button1_Click(object sender, EventArgs e)
        {
            string STR_A;
            STR_A = " Hello World";
            textBox1.Text = STR_A;
        }

** MUST MATCH CASE **   A IS A , a is a  ,  a Is Not A  ,  A is Not a


3}  Select  Debug -> Start without Debugging
~  ~ Wait for a while  ~ ~ ~




  ~  ~ Wait for a while  ~ ~ ~
This screen will come out.



4}   Let  click on button1
     Hello World  
  will show up  inside the Textbox.


Try type some words inside the TextBox , then click on button1
     Hello World  
  will show up  inside the Textbox.   The words you type is gone!
Ha! Ha!  This is all because of   button1  that you click.

 Click  the  X   to close it.

So,  our  FIRST c# program work.  Next chapter I will show how to improve this program.


___________________________________________
Need More Detail ?   contact me !!
Please send me some money at  Paypal
Any small amount is welcome , even 10 cents is good for me.

I will guide you step by step, personally.
My Paypal Account is :   ksw.industries@gmail.com


Don't know how to send money ?   Click here for detail about Paypal account.
http://xyberpast.blogspot.com/2014/05/how-to-get-my-program.html

Don't have money? OK! Here is another way to get the program.
how to get my program - Free of charge



AcuAids AstroNutrition Global Gear Pocket Strategist Anytimeherbal - Herbal Remedies, Supplements, Herbs Capsules and Vitamins. Calorad Century Supplements Thorn Equipment Finance Amino Z - Natural Weight Loss And Supplements Apex Sales - Leaders in health, hygiene and packaging supplies
Associate-O-Matic

No comments:

Post a Comment