Online Advertising - Mobile Phones - Cell Phones - Mortgage - Remortgages

PDA

View Full Version : [VB] Hello World tutorial


Xabber
Jun 5th 2007, 6:58 am
OK, I assume this is the first tutorial you are reading for VB [ Visual Basics ]. Once you start up VB standard EXE . You will see form1, let's double click form one. This is what you should have now :

Private Sub Form_Load()

End Sub

Let's change that into :

Private Sub Form_Load()
msgbox "Hello world !", vbokonly, "Tutorial made by Xabber"
End Sub

Press F5 and you should see a message box, click ok and the form will load. We want to end the program after you clicked ok, this is easy. You should have :

Private Sub Form_Load()
msgbox "Hello world !", vbokonly, "Tutorial made by Xabber"
End Sub

Just change it in :

Private Sub Form_Load()
msgbox "Hello world !", vbokonly, "Tutorial made by Xabber"
end
End Sub

The end function simply just ends the program. Well, that's it !

slawek
Jun 5th 2007, 9:59 am
Just my 2 cents :) If you write VB tutorial, is it not better to write for vb.net ?insteed of outdate VB 6? :)

timallard
Jun 5th 2007, 10:06 am
ohh i remember those days :P

Vizuke
Jun 5th 2007, 8:47 pm
You should do VB.NET instead

Da_Purr
Jul 14th 2007, 12:54 pm
lol. Xabber, just learn some C++ instead of VB:p
I agree that VB is very outdated, but it's a nice language to start in. I started in QBASIC when I was 7, lol