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
INTRODUCTION TO CONTROLS AND TOOLBARS The Visual Basic programming is an event driven programming. In the form objects the termed controls are placed. We can put the properties


Let us modify the webTime ASP.NET project that we developed. We will add drop down lists for modifying the different style elements for the label element that displays the time. We

HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL BASIC PROGRAMMING


FILES IN A VB PROJECT The project file has the.vbp extension. The form in which we draw has the .frm extension; .mod denotes the module file; .cls denotes the class file; .res

Do Until Loop Statement: The statements within the do...until loop block executes till the condition given in until become true. The working of do...until loop is elaborated w

The following table lists suggested conventions for objects you might encounter while programming VBScript. Code Commenting Conventions All process should begin with a brie

Check Box: The check box control takes the value as on or off or grayed. The grayed one is neither on nor off. The user can transform the setting of the grayed check box.

Creating an application that will calculate the cost of a car rental based on the number of days that the car is rented. the cost of the car rental includes the cost of the car its