|
-
May 23rd, 2000, 07:56 PM
#1
Thread Starter
New Member
I'm trying to have a wave file run when a form loads. What is the easiest way to do this? Maybe a OLE & autoActivate property. Thanks
-
May 23rd, 2000, 08:10 PM
#2
Lively Member
How about using Micro$oft Multimedia Control and playing the wave file when the form loads.
-
May 23rd, 2000, 09:53 PM
#3
Thread Starter
New Member
What is a Multimedia control? And where will I find it in the toolbox?
-
May 23rd, 2000, 10:59 PM
#4
Lively Member
Which VB version are you using? If you're using VB6 then do this:
1. From the VB IDE, press Control+T.
2. Scroll down until you find Microsoft Multimedia Control
3. Check the box next to it and hit the "OK" button. This will place the control in your tool box.
4. Drag the control onto your form.
5. Go here, http://support.microsoft.com/support.../Q247/0/36.ASP
and learn how to use it.
If you have any other questions. Let me know.
-
May 23rd, 2000, 11:01 PM
#5
Lively Member
Sorry, wrong URL. That's for Foxpro.
Try this one instead:
http://msdn.microsoft.com/library/de...mcicontrol.htm
-
May 24th, 2000, 03:26 AM
#6
Instead of using a Multimedia Control, it's much easier just to use an API called sndPlaySound.
Put the following code in a module.
Code:
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Now put this into the Form's Activate event.
Code:
Call sndPlaySound("C:\MyWavFile.wav", &H1)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|