Results 1 to 8 of 8

Thread: Disabled Form Click Event

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Disabled Form Click Event

    Hi is it possible to disable the ding sound which gets played when you click on a form which has its enabled property set to false? If so please help :P

    Thanks alot!

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Disabled Form Click Event

    That is a Windows setting rather than something specific to your program, so even if it is possible you shouldn't do it.

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Disabled Form Click Event

    Yes it is possible to do it...

    Go to control panel~~> Sounds.
    Under the Tab "Sounds"
    Under "Program Events"
    Select "Default Beep" under "Windows"
    In the sounds combobox below, set the sound to "None"
    Click on Apply and then click on "Ok" to exit...

    Hope this helps...

    Edit: Si beat me to it...What Si says, makes sense so if it is only for your pc, then change it else do not do it...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Disabled Form Click Event

    Additionally, the default beep can apply to other windows sound. Disabling it, especially through code, is not recommended as it may make your users disappointed with your app.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disabled Form Click Event

    Doesnt matter I've sorted it out for myself by changing the reg values of that default beep sound to a null value then when my app closes it gets set back to the original setting of Windows XP Ding.wav.

    Thanks anyway guys!

  6. #6
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Disabled Form Click Event

    So if you query is solved then do remember to mark this thread Resolved
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  7. #7
    Member
    Join Date
    Mar 2006
    Posts
    46

    Re: Disabled Form Click Event

    I'm not to sure if that is a good idea changing registry just to disable the default beep. What happens if your app crashes for some reason? If you don't do the right error correcting it will stay the same until your users change it back.

    Just something to think of.

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Disabled Form Click Event

    Indeed - and that is just one of the reasons that your application making system-wide changes is extremely rude, and should not be considered unless it is the entire point of your program.

    Others include:
    • If the user has limited permissions, there is a chance that it will fail.
    • You wrote "when my app closes it gets set back to the original setting of Windows XP Ding.wav.", do you mean you have hard-coded that value? If so, that will fail for many people, and be wrong for many others.
    • If it isn't hard coded but there is a problem reading/setting the value to start with, when your program closes will you accidentally set it to the wrong value?
    • Even if you do manage to always set it back when finished (which is doubtful), it will affect all other programs while your program is running.
    • What happens if the user starts more than one copy of your app? The first will remove the sound, the others will assume that it was meant to be off - and if the first to open isn't the last to close, you have made a permanent change to their system.
    If you want to make that change manually on your own system then it is fair enough, but to do it automatically on somebody elses computer is out of order - lots of people would uninstall your program as soon as they noticed something like that.

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