I want to put a timer for waiting so that there is 10 sec time interval between one message box to another message box.
I mean after hitting OK of the first message box, the second message box will pop up after 10 seconds.
I am using VB.NET.
Printable View
I want to put a timer for waiting so that there is 10 sec time interval between one message box to another message box.
I mean after hitting OK of the first message box, the second message box will pop up after 10 seconds.
I am using VB.NET.
Hi,
Two ways.
1. Design your own messagebox and make it non modal (use Show and not ShowDialog)
2. In the event which calls the first messagebox put
VB Code:
Timer1.Enabled = True Timer1.interval = 10000 MessageBox.Show("Message1")
Then in the Timer_Tick event
VB Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick MessageBox.Show("Second Message") Timer1.Enabled = False End Sub
The user will then have to close both messageboxes by hand.