[VB] Hello World tutorial

Discussion in 'Programming' started by Xabber, Jun 5, 2007.

  1. #1
    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
    Code (markup):
    Let's change that into :

    Private Sub Form_Load()
    msgbox "Hello world !", vbokonly, "Tutorial made by Xabber"
    End Sub
    Code (markup):
    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
    Code (markup):
    Just change it in :

    Private Sub Form_Load()
    msgbox "Hello world !", vbokonly, "Tutorial made by Xabber"
    end
    End Sub
    Code (markup):
    The end function simply just ends the program. Well, that's it !
     
    Xabber, Jun 5, 2007 IP
  2. slawek

    slawek Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just my 2 cents :) If you write VB tutorial, is it not better to write for vb.net ?insteed of outdate VB 6? :)
     
    slawek, Jun 5, 2007 IP
  3. timallard

    timallard Well-Known Member

    Messages:
    1,634
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    158
    #3
    ohh i remember those days :p
     
    timallard, Jun 5, 2007 IP
  4. Vizuke

    Vizuke Peon

    Messages:
    339
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You should do VB.NET instead
     
    Vizuke, Jun 5, 2007 IP
  5. Da_Purr

    Da_Purr Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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
     
    Da_Purr, Jul 14, 2007 IP