Re: bell
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 25, 2001
- 376 views
If you are using win32lib you can do this... atom xMessageBeep, junk xMessageBeep = registerw32Function(user32, "MessageBeep", {C_UINT}, C_UINT) then when you need to make a sound ... junk = w32Func(xMessageBeep, {whichsound}) where 'whichsound' can be one of ... -1 = Standard Beep MB_ICONASTERISK = WAV file assigned to 'Asterisk' MB_ICONEXCLAMATION = WAV file assigned to 'Exclamation' MB_ICONHAND = WAV file assigned to 'Hand' MB_ICONQUESTION = WAV file assigned to 'Question' MB_OK = WAV file assigned to 'Default' You can use the Windows Control Panel to assign WAV files to specific types of sound events. If you are not using win32lib try this... include msgbox.e atom lUser32, xMessageBeep, junk lUser32 = open_dll("user32") xMessageBeep = define_c_func(lUser32, "MessageBeep", {C_UINT}, C_UINT) then when you need to make a sound ... junk = c_func(xMessageBeep, {whichsound}) ----- Original Message ----- From: <otter at FULL-MOON.COM> To: "EUforum" <EUforum at topica.com> Sent: Thursday, July 26, 2001 6:33 AM Subject: Re: bell > > > well in the old dos days I'd just print a control-g > > haven't tried it, but it's worth a shot. > > At 02:57 PM 07/24/2001 -0400, you wrote: > > > > > > > >On Tuesday 24 July 2001 14:27, gwalters at sc.rr.com wrote: > > > > >Thanks, Irv.....I discovered the reqirement for an integer and changed it > > > to 1. It now 'sleeps' for a second but no sound eminates.. Do you know how > > > to simulate a 'bell' on windows? > > > >Try the playSound() routine in Win32lib. It plays wav files, > >I think. > > > >Regards, > >Irv > > > > > > > > > > > > >