Do while loop statement, Visual Basic Programming

Do While Loop Statement:

The statements contained by the do...while loop block executes till the condition given in the while is true.

The working of do...loop is elaborated with the event Form_MouseDown which is shown in the figure. Whenever you click the mouse on the form, then the event handler executes and generates the output as given in figure as shown.

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y

As Single)

Dim i As Integer

i = 5

Do While i > 0

Form1.Print "i is " & i

i = i - 1

Loop

End Sub

1236_do while loop statement.png

Figure: Working of do while loop

Posted Date: 10/9/2012 8:52:50 AM | Location : United States







Related Discussions:- Do while loop statement, Assignment Help, Ask Question on Do while loop statement, Get Answer, Expert's Help, Do while loop statement Discussions

Write discussion on Do while loop statement
Your posts are moderated
Related Questions
Restricting The Vocabulary: The properly formed vocabulary is like an inverted pyramid. All easy to learn communication system follow this pattern. The canonical vocabulary in

Dialog Based Application: The application which app wizard generates is based on the dialog template resource.

#questiontypes of lines and how to draw


Dialog Based Application: (A) Dialog Based Application to demonstrate Animate Control: 1. Build a dialog based application. 2. Design the dialog as shown. 3. Place

Message Routing: The system posts the messages to a first-in, first-out queue known as the message queue or it sends the messages directly to a window procedure. The Messages

DIALOG BOXES IN VB The two dialog boxes, namely, the message box and the input box are usually used in the Visual Basic. The message box is used for displaying the messages to

Depreciation to a Salvage Value of 0.   For tax purposes an item may be depreciated over a period of several years, n. With the straight-line method of depreciation, each year th

Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever

You can employ the SCRIPT element to add VBScript code to an HTML page. The SCRIPT Tag VBScript code is written inside paired SCRIPT tags. For instance, a process to test