Solved

I got a few questions-Avis, Wav's, and File I/O

Posted on 1998-10-07
1
176 Views
Last Modified: 2010-04-30
1-How do i play an .avi file automatically?  When i use an OLE to put the avi in, it requires the user to double click on it, then click the play button.  I want it to automatically play, then open another form when it is finished.
2-How do you play .wav files in the background of a form.(As in the program is still running while the sound plays)
3-How in the heck do you let somone save multiple values into a file name that they decide with any extention(.txt, .wow, .dat are examples) that I want.  I know that its simple, but I am a simple freshman in High School and I need to know simple things.
0
Comment
Question by:Peanuthead
1 Comment
 
LVL 3

Accepted Solution

by:
TheAnswerMan earned 50 total points
ID: 1438763
TO PLAY MUSIC>>PUT THIS WITH YOUR GLOBALS>>>
Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
THEN>>> when you want to play the sound...
call sndPlaySound("C:\PathName.wav",0)

TO PLAY AVI>> USE THE ActiveMovie Control and set it to autoplay.

To Allow them select extenstions.. use the CommonDialog Control. and do something like this,,,
  On Error GoTo ErrHappened
  CommonDialog1.Flags = cdlOFNHideReadOnly  
  CommonDialog1.Filter = "All Files (*.*)|*.*|Wow Files" & _
  "(*.wow)|*.wow|Batch Files (*.bat)|*.bat"  
  CommonDialog1.ShowSave  
Exit Sub  
ErrHandler:
'go here if the guy hit cancel
End Sub

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Computer crashes, following error message in event manager 5 136
vb6 connector to mongodb 2 48
SLMGR Switches Are Not Working On KMS Host 3 67
MsgBox 4 45
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now