Gw Temp


Tutorial - 'First program in Visual Basic & Random Number' by rpgsmo

An item about Programming Languages posted on


Both of these tuts were by rpgsmo and were so short that I decided to post this as one bigger tutorial. If you are interested in VB, check this out.


First program in Visual Basic

This is where you get to make a program in visual basic that says "Hello World" when you push a button.

First of all, open a new project, standard exe is fine. Now at the left side, there is a command called "Command button" Click that. Ok, now drag a button across the screen. Got it? Good. Ok, double click on that button and a blank screen will appear. This is for typig code. Now just type:

print "Hello World";

And now save it and press F5, a screen should appear with your button, now click the button and it should say "Hello World", if it has that good, if it does not do the tutorial over. If it still does not work, then email me at rpgsmo@bullzeyeproduction.met amd I will help you.

Random Number in Visual Basic

View more tutorials like this at

Heh, this is displaying a random number in visual basic. OK, i suggest reading my first tutorial before reading this.

Visual Basic

Ok, got vb, good!!!

1.First, make a command button on the screen just like the last tutorial, then make a label by searching for the label icon and draggin it on the screen. Ok, under properites window make the caption 0. Now, make the caption of the button "Click here".

2.Double click on the button and the code comes up. The cursor should be in the private sub function, now type this as your code:

Codenumber = rnd 1 * 2000< br> label1.caption = number

That is it, the:

Codenumber = rnd 1 * 2000

Generates a ranodom number from 1 to 2000.

And the next part just changes the label caption to the random number.

Easy huh, now if that works, then a thumbs up for you.

If not, email me at and I will help you as fast I can.