|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Blinking buttonhow come i cannot see the blinking effect? is there any screen update function? Thanks. ****************************** Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Button1.BackColor = Color.Red Then Dim a For a = 1 To 5 Button1.BackColor = Color.Yellow System.Threading.Thread.Sleep(1000) Button1.BackColor = Color.Red Next Else Button1.BackColor = Color.Red End If End Sub Add
Application.DoEvents() after your sleep line. __________________________________________ The Grim Reaper Show quoteHide quote "tony wong" <x**@netvigator.com> wrote in message news:%23CrPIsxCHHA.4404@TK2MSFTNGP06.phx.gbl... >i wish to make the button blinking for 5 times at 1 second interval. > > how come i cannot see the blinking effect? > > is there any screen update function? Thanks. > > ****************************** > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > If Button1.BackColor = Color.Red Then > Dim a > For a = 1 To 5 > Button1.BackColor = Color.Yellow > System.Threading.Thread.Sleep(1000) > Button1.BackColor = Color.Red > Next > Else > Button1.BackColor = Color.Red > End If > End Sub > > Thanks a lot.
Show quoteHide quote "The Grim Reaper" <grim_rea***@REMOVEbtopenworld.com> ¼¶¼g©ó¶l¥ó·s»D:xJidnbEzq6Xog8LYRVn***@bt.com... > Add > > Application.DoEvents() > > after your sleep line. > __________________________________________ > The Grim Reaper > > "tony wong" <x**@netvigator.com> wrote in message > news:%23CrPIsxCHHA.4404@TK2MSFTNGP06.phx.gbl... >>i wish to make the button blinking for 5 times at 1 second interval. >> >> how come i cannot see the blinking effect? >> >> is there any screen update function? Thanks. >> >> ****************************** >> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As >> System.EventArgs) Handles Button1.Click >> If Button1.BackColor = Color.Red Then >> Dim a >> For a = 1 To 5 >> Button1.BackColor = Color.Yellow >> System.Threading.Thread.Sleep(1000) >> Button1.BackColor = Color.Red >> Next >> Else >> Button1.BackColor = Color.Red >> End If >> End Sub >> >> > >
Syntax error in INSERT INTO statement
How to attach an exe to the debugger? question about opening SQL results in Excel from ASP.NET via XML User Control saving properties Is my interpretation of COM interface correct? byte array concatenation Newbie - MDI Question Getting the generated name attribute for use in JavaScript syntax to compare data from text field, when adding a record, to a field in a table for duplicates problem with DataSet.GetXml() method |
|||||||||||||||||||||||