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 ClassExplanation / Answer
Public Class frmMain Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close()
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.