Learn VB .NET easy way Part -1 Tutorial  

Posted by Kunal Pradhan

Guide to start with VB .Net

First download and install VB .NET 2008 and required components (which comes in package)
http://www.microsoft.com/express/download/ (approx. 70 mb)

After installing you can see "Microsoft Visual Basic 2008 Express Edition" in your start menu.
Open it.

Click on "project..." which is on right side of label "create".
Choose windows forms application,give name whatever you want in below name box and press ok.
you can see window like this (click on image to enlarge)
On right side panel you can see its properties panel which shows property of selected element of project.
Also you can see a toolbox there.If you can't you can enable it viw view--> toolbox(CTRL+AL+X)

Now lets make our first simple application.

Add a button from tool bar.Click button and make a button of your size in form1's area.This is similar to make a rectangle in paint.
Now you have make graphix part
as an application has two parts graphix and codings
now lets move to coding part
Double click on button you made to open the coding part
double click will open the button's default coding event i.e. button1_click
Note: you can switch between coding and designer via view menu.

Now we will give user a message on pressing the button.

So message code will be

msgbox("your message")

like
msgbox("This is my first application")

Tip: you can choose msgbox type by giving secong argument
like
MsgBox("This is my first application", MsgBoxStyle.Information)

This shows the msgbox will be windows' default information style box.

so final code will be

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("This is my first application", MsgBoxStyle.Information)
End Sub

Click on green arrow like play button on top to run your first application!

More options:
Project menu---> project name properties... contains useful options about your project
You can change application logo and important properties from properties of form1 (right click on form1's and area and select properties(the part where u drew button)

You can publish you application and can distribute within friends by build menu--->build application name example build windows application1

You ready to distribute application will be in D:\Documents and Settings\Kunal Pradhan\My Documents\Visual Studio 2008\Projects\"project name that you gave"\"project name that you gave"\bin\Release\application name.exe

you can send this exe file to all.

Next tutorial will be posted soon.Support us by informing friends about us.

Get all vb .net tutorials click here:List all

This entry was posted on Sunday, June 22, 2008 and is filed under , , . You can leave a response and follow any responses to this entry through the Subscribe to: Post Comments (Atom) .

0 comments