|
-
Sep 3rd, 2003, 09:25 PM
#1
Thread Starter
Member
Media program
Hello!
I want to make a program that has several command buttons. When you press these buttons, a picture should come up, at the same time as an mp3 is being played.
Kind of like an interactive christmas calendar.
(PS. I would like the song to be played in the program, if this isn't a problem)
-
Sep 3rd, 2003, 09:27 PM
#2
Okay, let us know when you run into trouble.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Sep 3rd, 2003, 09:28 PM
#3
Thread Starter
Member
Well... I was kinda hoping for help
-
Sep 3rd, 2003, 09:48 PM
#4
Thread Starter
Member
OK, I have figured out a part of it..
Private Sub Command1_Click()
com1.Show
End Sub
This will bring up the second form with my picture...
Now, all that is missing, is the musak.
-
Sep 4th, 2003, 06:05 AM
#5
Hi,
This isn't what you asked for, but it works for .wav files.
Is it any use to you?
Tris.
VB Code:
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, _
ByVal hModule As Integer, _
ByVal dwFlags As Integer) As Integer
'Play sound.
PlaySound("C:\MusicFile.wav", 0, 1)
This world is not my home. I'm just passing through.
-
Sep 4th, 2003, 10:09 AM
#6
Thread Starter
Member
Where should i paste the playsound-command, and can I use it with a command1_click?
-
Sep 4th, 2003, 10:28 AM
#7
This works for me.
VB Code:
Option Strict On
Public Class Form1
Inherits System.Windows.Forms.Form
'Windows Form Designer generated code
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, _
ByVal hModule As Integer, _
ByVal dwFlags As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
'Play sound.
PlaySound("C:\MusicFile.wav", 0, 1)
End Sub
End Class
This world is not my home. I'm just passing through.
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
|