-
May 8th, 2015, 07:39 AM
#1
Thread Starter
Member
[Help?] Making a Code Loop
Lets say I wanted to have a code like,
Code:
MessageBox.Show("Hi there!", "Blah", MessageBoxButtons.Ok, MessageBoxIcon.Information)
How would I have my program wait 15 minutes, and then show the messagebox again?
Thanks in advance!
-
May 8th, 2015, 07:49 AM
#2
Re: [Help?] Making a Code Loop
Drop a Timer on your form and set the interval to 900,000 (15 minutes * 60 seconds/minute * 1000 mS/second), then put your message box code in the timer.tick event handler.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
May 8th, 2015, 08:00 AM
#3
Lively Member
Re: [Help?] Making a Code Loop
Hi - this would be pretty annoying wouldn't it? However, you can add a Timer to a form and insert your code there. Be sure to set the Timer's interval to 15000. (I'm not sure what you're doing but you might want to add a button to start the timer, use something like:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Hope this helps
GTD
-
May 8th, 2015, 08:01 AM
#4
Lively Member
Re: [Help?] Making a Code Loop
Ah Kebo go there first... also... i calculated for 15 seconds. The interval should be 900,000 as Kebo says .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|