back
Visual Basic Random Number Generator
Adapted from An Introduction to Programming in Visual Basic by Beth Brown and Bruce Presley

First, lay out your form. Look at the two graphics below to see the physical layout and the properties.







Next, do your coding for the project. Double-click on the cmdRandNum button and add the following code:



Double-click on the finish button and type:

Unload Me

Save the project and run it. Write down the numbers and run it again. What do you notice about the numbers?

Now open up the Form_Load section of the code window and type:

Randomize

Run the program again and note the numbers. Try running it a few times. What do you notice now about the numbers?

Before you call me to check off your project, customize it with your own colors, graphics, and font sizes.