Hi Folks,
I have a little problem. I like to play an arbitrary Wav-File when opening a form. How must I proceed? Is there a easy solution? The "Speaker-Beep" is so terrible,you know.
For 'filename' you can, of course, fill in any wave file you like and which is avaialble to all users.
Small warning, though: Adding some sound can spice up the use of a program (Navision not excepted), but please be modest in the selection which sound you use for which event. Irritation isn't far away here.
The filename of this OCX is MCI32.OCX in the Windows/System directory. I'm not sure if it's a standard Windows control, because I have a couple of development environments on my system. But I believe it comes with Windows Mediaplayer also.
encountered error message:
Could not invoke member Shareable. The OLE control or Automation server returned the following message:
The number of elements provided is different from the number of arguments accepted by the method or property.
Comments
1) Define "Sound" as a variable of type OCX, subtype "Microsoft Multimedia Control, version 6.0" (in my case, check yours)
2) In the OnOpenForm trigger (or in fact, at any place you would like to play some sound) you put the following code:
Sound.Notify := FALSE;
Sound.Wait := TRUE;
Sound.Shareable := FALSE;
Sound.DeviceType := 'WaveAudio';
Sound.FileName := 'C:\WINDOWS\MEDIA\CHIMES.WAV';
Sound.Command := 'Open';
Sound.command := 'Play';
For 'filename' you can, of course, fill in any wave file you like and which is avaialble to all users.
Small warning, though: Adding some sound can spice up the use of a program (Navision not excepted), but please be modest in the selection which sound you use for which event. Irritation isn't far away here.
John
Regards Stefan
I did not found the right OCX were you talking about.Where can I get it?
The filename of this OCX is MCI32.OCX in the Windows/System directory. I'm not sure if it's a standard Windows control, because I have a couple of development environments on my system. But I believe it comes with Windows Mediaplayer also.
John
encountered error message:
Could not invoke member Shareable. The OLE control or Automation server returned the following message:
The number of elements provided is different from the number of arguments accepted by the method or property.
any hints? :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org