topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 10:54 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Tutorial: Visual C# For Beginners - Part 1 (With Pretty Pictures!!!)  (Read 7989 times)

KynloStephen66515

  • Animated Giffer in Chief
  • Honorary Member
  • Joined in 2010
  • **
  • Posts: 3,741
    • View Profile
    • Donate to Member
Hey Guys,

I'm kinda bored this weekend, so I have decided to write a tutorial for c# beginners.

Instead of using the usual "Hello World", We are going to be creating a notepad style application.

We will start with the basics then gradually add more and more function :)

Here Goes:




First things first:

Download Visual C# 2010 Express Here

Run the installation and add any extras you want. (If you don't know how to download/install software then this tutorial really isn't for you)

Once installation has completed, Launch Visual C# 2010 Express: (Note: First time being launched it takes a few minutes for the software to setup, dont worry, this is normal)

1.png

OK, now its loaded you should see the following screen:

2.pngTutorial: Visual C# For Beginners - Part 1 (With Pretty Pictures!!!)
(Click To Enlarge)

If you see that screen, then we are on track!

OK, now start a new project:

3.png

Now Select Windows Form Application, Choose A Name, and hit OK!:

4.pngTutorial: Visual C# For Beginners - Part 1 (With Pretty Pictures!!!)
(Click To Enlarge)

Now comes the fun part.  You should see the main screen!

5.pngTutorial: Visual C# For Beginners - Part 1 (With Pretty Pictures!!!)
(Click To Enlarge)

Now, for those of you who are completely new to Visual C#, this may all look a little bit daunting, but don't worry, this part is actually very very simple.

You may want to expand your form area a little bit so you have more space.  Don't worry to much, it doesn't really matter how big it is, just give yourself enough space to work :)

6.png

Now, Add a RichTextBox into the form area (Click and drag)

7.png

And now add a MenuStrip (Click and Drag Again)

8.png

Right Click the MenuStrip and click "Add Standard Items" - We will add the code for these later.

9.png

Now, you want to dock the RichTextBox we added earlier into its parent container (Click the text box in the main form window and click the little > arrow that can be found at top right of the highlighted box):

10.png

OK, now lets take a look at your software.  It cant do anything other than allow you to enter text, but its functional none-the-less :) - To exit your software and return to the programming console click the red X in the top right corner of the Notepad Application.

To load the software you will have to click the green arrow that looks like a play button:

11.png

OK, now you have seen your software in action.

Usually, Tutorials like this have you try to do everything in one session, but instead, what I am going to do is ask you to save your project (we are going to add to it in the next session. which will be uploaded in around 12 hours time (1-2pm GMT)).

Now your project is saved, close it, and attempt to do everything discussed in this tutorial without reading it again.  If you get stuck, take another peek, but don't go rushing ahead and add anything else to the project otherwise you will end up losing track and forgetting what you are learning here.  Be patient and you will be surprised how quickly things will come together!


-------------------


Homework (Yes, we have homework!):

  • Take a look at other notepad applications (Windows Standard) and others like Notepad++
  • Take notes of what features each notepad applications have and jot down anything you would like to add in yours

Let me know any features you find in other notepad applications that you would like to add, and would like me to go into further details about.


« Last Edit: May 28, 2011, 03:06 PM by Stephen66515 »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • View Profile
    • Donate to Member
nice job!  :Thmbsup: