visual basic error sound
2013-11-18, 03:53 AM,
#1
Hello everyone,
can someone tell me how to play error sound as the app opens,

If someone open the app it will make an error sound (like the critical sound) but the program will still work, i need just the code for the sound in the beginning.

thanks.
Reply
Share This Thread :

2013-11-18, 03:59 AM, (This post was last modified: 2013-11-18, 04:05 AM by Seen.)
#2
Code:
Sub PlaySystemSound()
    My.Computer.Audio.PlaySystemSound(
        System.Media.SystemSounds.Hand)
End Sub

Edit*

"Hand" is the name of the sound you want.

Source: http://msdn.microsoft.com/en-us/library/....100).aspx
Reply
2013-11-18, 04:15 AM,
#3
(2013-11-18, 03:59 AM)Seen Wrote:
Code:
Sub PlaySystemSound()
    My.Computer.Audio.PlaySystemSound(
        System.Media.SystemSounds.Hand)
End Sub

Edit*

"Hand" is the name of the sound you want.

Source: /en-us/library/vstudio/c27he2zs(v=vs.100).aspx
thanks,
but where do i put it in the code?
Reply
2013-11-18, 04:18 AM, (This post was last modified: 2013-11-18, 04:19 AM by Seen.)
#4
(2013-11-18, 04:15 AM)Xtr3m3r Wrote:
(2013-11-18, 03:59 AM)Seen Wrote:
Code:
Sub PlaySystemSound()
    My.Computer.Audio.PlaySystemSound(
        System.Media.SystemSounds.Hand)
End Sub

Edit*

"Hand" is the name of the sound you want.

Source: /en-us/library/vstudio/c27he2zs(v=vs.100).aspx
thanks,
but where do i put it in the code?

Insert a timer into your program, set it to enabled from the options.
Double click it, and put in:

Code:
PlaySystemSound()
Timer1.Stop()

Make sure you change the "Timer1" above to the timers name.

Then paste the below into your coding section.

Code:
Sub PlaySystemSound()
        My.Computer.Audio.PlaySystemSound(
            System.Media.SystemSounds.Hand)
    End Sub

Here's what it should look like:

[Image: 5lsBu.png]

[Image: 5lszk.png]
Reply
2013-11-18, 04:27 AM, (This post was last modified: 2013-11-18, 04:29 AM by Xtr3m3r.)
#5
(2013-11-18, 04:18 AM)Seen Wrote:
(2013-11-18, 04:15 AM)Xtr3m3r Wrote:
(2013-11-18, 03:59 AM)Seen Wrote:
Code:
Sub PlaySystemSound()
    My.Computer.Audio.PlaySystemSound(
        System.Media.SystemSounds.Hand)
End Sub

Edit*

"Hand" is the name of the sound you want.

Source: /en-us/library/vstudio/c27he2zs(v=vs.100).aspx
thanks,
but where do i put it in the code?

Insert a timer into your program, set it to enabled from the options.
Double click it, and put in:

Code:
PlaySystemSound()
Timer1.Stop()

Make sure you change the "Timer1" above to the timers name.

Then paste the below into your coding section.

Code:
Sub PlaySystemSound()
        My.Computer.Audio.PlaySystemSound(
            System.Media.SystemSounds.Hand)
    End Sub

Here's what it should look like:

[img]/5lsBu.png[/img]

[img]/5lszk.png[/img]

wow thank you for the detailed answer!
you've helped me alot!
Reply


Related Threads
Thread Author Replies Views Last Post
  Clickbank account error Zillionaire 4 109 2018-06-22, 11:05 PM
Last Post: Zillionaire
  Fraudfilter Campaign Setting Error - Urgent Help Needed. intkhab 2 390 2017-08-08, 01:53 PM
Last Post: intkhab
  404 ERROR HELP ASAP. Karrosales 3 408 2017-04-07, 02:10 AM
Last Post: manjeshsingh
  Visual studio/basic miamor 6 417 2017-03-07, 10:37 PM
Last Post: miamor
  Visual Basic Question ObsidianConnect 2 437 2017-02-24, 10:52 PM
Last Post: imonambot





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top