Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm creating an mdi application and i've never used a timer before and i need some help. i'm not sure how i'm supposed to do this so help would be greatly appreciated.

 

right now i have a form with a button and a text box. what i would like to do is if nothing has been entered in the textbox, say within 10 seconds then it automatically opens up another form. however, if text has been entered, then it resets the timer and waits for another 10 seconds.

 

can someone help me with this?

  • *Experts*
Posted
You could set the interval of the timer to 10000 miliseconds (10 seconds). Then start the timer wherever you want to do it, then in the Tick event of the Timer check whether the textbox has anything entered into it. You can start the timer using its Start() method.
Posted (edited)

thanks. i believe i figured it out. it's one of those after you post it that's when the solution comes. but thanks for confirming what i originally though.

 

however, how can you close a message box? i can close whatever form i need to and open what i want, but if a message box is open, it won't close. is there a way to close this?

Edited by BlueJay924

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...