Computing Students - Computer Science Degree Notes
Home Contact Shop Notes Questions Programming Links Dictionary Coursework FORUM Tutors
  Recommended Amazon Searches: Computer Science | Computing | Computer Systems | Database | Computing Revision  

Programming > Visual Basic > Downloads > Loops

This is a program demonstrating different types of loop, and how they can be used. The outline of the program is given below:

  • There are 4 buttons in the program that invoke the different loops.
  • The first button, which demonstrates a "for" loop, causes a message box displaying the word "hi" to be shown 4 times. This cannot be changed by a user of the program, but you can change the message or amount of times it is shown by editing the source code.
  • The second button demonstrates a "while" loop. When clicked, the user is prompted to enter a password, and while the correct password ("computing") has not been entered, the password prompt continues to loop.
  • The third button is the same in function as the second button, but it uses a "do" loop instead.
  • The second "for" loop button requires the user to enter a number into a text box. When the button is clicked, consecutive message boxes are displayed counting up to the number entered in the text box. If a large number is entered, the loop will go on for a long time!

Download Now   (7KB Zip file)

Search for "Visual Basic" on: Google | Kelkoo | Amazon | eBay (UK) | eBay (US)

Search for "Visual Basic" on the rest of Computing Students: Visual Basic

Find Visual Basic (VB) Programming Books in the Computing Students Computer Science Book Shop

Home | Contact | Shop | Notes | Questions | Programming | Links | Dictionary | Coursework | Tutors Sponsored Links: Affiliate Program Articles | Computer Science Definitions | CS Degree Notes
Copyright © 2005-2009
This site is to be used in accordance with the User Agreement
High Wycombe Web Design