Results 1 to 3 of 3

Thread: Make a Messagebox Beep Repeatedly

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2011
    Posts
    1

    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

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    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.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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:
    1. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    2.         Timer1.Enabled = True
    3.         MessageBox.Show("Click me")
    4.         Timer1.Enabled = False
    5.     End Sub
    6.  
    7.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    8.         Beep()
    9.     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
  •  



Click Here to Expand Forum to Full Width