Hi Woody,
The timer will raise Tick event after an internal(you can specify), so you
can handle certain operations in this event handler.
And it will not block the execute of other controls.
For you issue, you can do like this:
'First, you should have placed a timer control on to the form.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
TextBox1.Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Timer1.Interval = 2000
Timer1.Start()
TextBox1.Visible = True
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Timer1.Stop()
TextBox1.Visible = False
End Sub
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Woody Splawn" <
[email protected]>
| Subject: Timer Question
| Date: Mon, 20 Oct 2003 11:20:23 -0700
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#
[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 168.158-60-66-fuji-dsl.static.surewest.net
66.60.158.168
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.
phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:148442
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| I have a Yellow text box on a winform that normally stays hidden but on
| occasion I make it visible to display some message to the user. In one
| particular case it would be nice if the text box would only stay visible
for
| a few seconds. Is this possible? If so I suppose it involves a Timer
| control but it is not clear to me how to program the Winform so that the
| textbox stays visible only for a given period of time. If is is visible
for
| say only two seconds, would all other processing have to stop for two
| seconds too?
|
|
|
|
|
|