Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how do I change the Do...loop statement in the btnclickme control\'s click event

ID: 3659377 • Letter: H

Question

how do I change the Do...loop statement in the btnclickme control's click event procedure to a for...nextstatement? Public Class frmMain Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnClickMe_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnClickMe.Click ' blinks the message in the lblMessage control ' declare counter variable Dim intCount As Integer ' begin counting intCount = 1 Do While intCount <= 20 If lblMessage.Visible = False Then lblMessage.Visible = True Else lblMessage.Visible = False End If Me.Refresh() System.Threading.Thread.Sleep(250) ' update the counter variable intCount = intCount + 1 Loop End Sub End Class

Explanation / Answer

Public Class frmMain Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close()