-
Aug 16th, 2011, 04:29 PM
#1
Thread Starter
New Member
Make a Messagebox Beep Repeatedly
I'm trying to create an annoying alarm messagebox. So when I press a button, I want the computer to display a message box and beep until the user presses ok. Can someone help me with this?
Thanks,
EC
-
Aug 17th, 2011, 11:00 AM
#2
Re: Make a Messagebox Beep Repeatedly
Hey echan989! Thanks for joining the forum. My 2 cents before I point you in the right direction is to:
1st- Utilize the search at the upper right hand corner of the forum.
2nd- Try searching MSDN(Check link below) to see if perhaps somebody else has any examples
3rd- If all these options are exausted, then post what you have all ready completed. If you don't know how to code it, atleast say if you've added a button here, a textbox there.
Something to get you started is to add a datetimepicker and change the properties to showupdown to true and set the format to time. This way the user can set what time they want the alarm to go off. Add a button so that a user can set the alarm. As for a "set alarm" code, check out the timer class. In this help, it even provides an example. Hope that this helps you out a bit.
-
Aug 17th, 2011, 11:10 AM
#3
Re: Make a Messagebox Beep Repeatedly
Fairly simply actually...why do you want to do this? If I were using your program, I would greatly annoy me
vb.net Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = True
MessageBox.Show("Click me")
Timer1.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Beep()
End Sub
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
|