Results 1 to 2 of 2

Thread: Waiting time

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2004
    Posts
    35

    Waiting time

    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.

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    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:
    1. Timer1.Enabled = True
    2.         Timer1.interval = 10000
    3.         MessageBox.Show("Message1")

    Then in the Timer_Tick event

    VB Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.         MessageBox.Show("Second Message")
    3.         Timer1.Enabled = False
    4.     End Sub

    The user will then have to close both messageboxes by hand.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width