Skorkpup
Programmer
- Feb 17, 2005
- 11
Hi Guys I wonder if any one can help me.
I am making a simple program with an OLE control set to wave files. I would like to be able to drag and drop a file into the programs icon and have the file loaded and playing in the OLE control when the progran opens. I would also like the wave to begin playing when the wave file is dropped into the OLE container after the program opens automatically. I tried this by placing OLE1.DoVerb 0 into the sub, OLE1_DragDrop but to no avail it will not play after dropped.
So far I can drag the file into the ole control after the program is already open the sound plays through the sub Ole1_MouseMove and the sound stops with a Command button.
Any and all help would be greatly appriciated.
Thanks,
Skorkpup
Here is my code so far:
Option Explicit
Private Sub Command1_Click()
'stop the sound
OLE1.Action = 9
End Sub
Private Sub Command2_Click()
'close the program
Unload Me
End Sub
Private Sub OLE1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'play the sound
OLE1.DoVerb 0
End Sub
Skorkpup
I am making a simple program with an OLE control set to wave files. I would like to be able to drag and drop a file into the programs icon and have the file loaded and playing in the OLE control when the progran opens. I would also like the wave to begin playing when the wave file is dropped into the OLE container after the program opens automatically. I tried this by placing OLE1.DoVerb 0 into the sub, OLE1_DragDrop but to no avail it will not play after dropped.
So far I can drag the file into the ole control after the program is already open the sound plays through the sub Ole1_MouseMove and the sound stops with a Command button.
Any and all help would be greatly appriciated.
Thanks,
Skorkpup
Here is my code so far:
Option Explicit
Private Sub Command1_Click()
'stop the sound
OLE1.Action = 9
End Sub
Private Sub Command2_Click()
'close the program
Unload Me
End Sub
Private Sub OLE1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'play the sound
OLE1.DoVerb 0
End Sub
Skorkpup