Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showing a form for a certain length of time

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
0
0
GB
hello,

how can I show a form for a certain length of time ?

eg,

if message.visible = true then

close the form opened after 10 seconds ?


thanx in advance.
 
use the timer control
add control and set properties
enabled =true
interval= 10000 for 10 secs

Private Sub Timer1_Timer()
if message atc then
Me.Hide
end if

End Sub
 
put this line in general declarations

Dim iTimer As Integer

place a timer on your form set interval to 1000 (1 sec)

add this code to you form

Private Sub Timer1_Timer()

If Timer1.Enabled = True Then
If iTimer = 10 Then
Timer1.Enabled = False
Unload Me
End If
iTimer = iTimer + 1
End If

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top