First Step In Visual Basic [First Time Using VB!]

.Nielz

Member
Reputation
0
Tutorial Difficult Easy

Some Info
Okay , for much people it is hard to learn Visual basic's . In this 10 part long tutorial I will learn you how to use Visual Basic's . Don't say this will be just like a other tutorial , this will finish with 10 good tutorials !

The Tutorial​

Okay today I will show you the first step in Visual Basic's , just like every 'coding' language it starts with 'Hello' . I have added every where photo's for helping you ! They are in the spoiler .

1 ) First we're going to open the project . Click on 'file' -> 'New Project'
gifwv.gif
2 ) Now we're going to add a 'button' , this is on the left box , under 'General' . Just click on it and press it randomly in your program .This is the window in the center , with the name 'Form1' .
74840598.gif
3 ) The button is added to ours program , but it is called 'Button1' we are going to change it . Click on the button and then go left in the screen , there will be a new box .
Scroll down in the box till you find 'text' , change it to 'Click' or something you like .

80859969.jpg
4 ) Now we are going to do the first coding . Dubble click on the button in the centre . There will pop-up a other window called 'Form1.vb' . Okay now I will show you what the code means .
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

End Sub


End Class

Green This is a 'sub' a sub is a part of a form (= part of a program). Here you need to remind only the 'Button_click'. This means when you press the button it will do this code . 'End Sub' is just to show that the sub is ended .

Red This is your full 'form1' (= Part1 of your program , sometimes you will make more then 1 form . Then there will be form2 or how you called ) .
But in you will be righting almost everything bitween this , 'End class' end the class
64254834.jpg
Okay now you know what this means we will be starting to make code . Add this between your sub .
MessageBox.Show("Hello this is my first program !")
This code means when you click 'button1' it will show a messagebox with this text .
86642544.jpg
5 ) Now we are going to do our first 'debug' , debug is testing the program of there are no problems . Press the play button and the program will start . Now click the button , there will pop-up a window with our text(If not do the other steps again) .
86642544.jpg
6 ) Now we see are program and we are going to click the button . The messagebox will show up , but there is no title ?!
82504713.jpg
So we are going to add a title . Close the program and go back to your code . Add the red ;
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show("Hello this is my first program !","First Title")
End Sub

End Class
92539850.gif
7 ) Final Step We're going to 'debug' again . Like you see the title is added . You have maded your first program in Visual Basics ! If you want to get some more commands for your messagebox check the 'extra'
79311265.gif
EXTRA
You can only click now 'ok' but you can change this . Photo

Not Working ?
Do every step again and watch every photo (in the spoiler) . Still not working . Download the full code . After that you can post a reply ;-)
I hope you guys liked this first tutorial . Please leave some feedback and say what I can do better next time !
Download link
MediaFire http://adf.ly/2IDn
MegaUpload http://adf.ly/2IDl
Want to support my? Click the add !
 
Detailed tutorial with pictures. Thanks for posting it. I'm sure it will help some people out. I would recommend adding a little more spacing though. It looks a little cluttered.
 
Thank you for sharing this tutorial on Your First Application. Not boasting about my skills, but I do believe that I am capable of comprehending more advanced tutorials.
 
Extreme tutorial, very clear Niels. Currently learning VB so I need all the help I can get.
 
Very Very nice mate keep it up +rep
 
RE: Trashed: First Step In Visual Basic [First Time Using VB!]

The Elite said:
This thread has been verified to be a quality thread and has been moved back into the rightful forum section.

Please contact Management if this was wrongfully done.
Wow, thanks really nice of you guys.
 
Nice job. Very colourful tutorial, very detailed. You should add a link to a demo download for Visual Basic or something.
 
Back
Top