Results 1 to 7 of 7

Thread: Media program

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    34

    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)

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    34
    Well... I was kinda hoping for help

  4. #4

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    34
    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.

  5. #5
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    Hi,

    This isn't what you asked for, but it works for .wav files.

    Is it any use to you?

    Tris.


    VB Code:
    1. Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
    2.                         (ByVal lpszName As String, _
    3.                          ByVal hModule As Integer, _
    4.                          ByVal dwFlags As Integer) As Integer
    5.  
    6.  
    7.     'Play sound.
    8.      PlaySound("C:\MusicFile.wav", 0, 1)
    This world is not my home. I'm just passing through.

  6. #6

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    34
    Where should i paste the playsound-command, and can I use it with a command1_click?

  7. #7
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    This works for me.

    VB Code:
    1. Option Strict On
    2.  
    3. Public Class Form1
    4.     Inherits System.Windows.Forms.Form
    5.  
    6. 'Windows Form Designer generated code
    7.  
    8.     Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
    9.                         (ByVal lpszName As String, _
    10.                          ByVal hModule As Integer, _
    11.                          ByVal dwFlags As Integer) As Integer
    12.  
    13.  
    14.     Private Sub Button1_Click(ByVal sender As System.Object, _
    15.                               ByVal e As System.EventArgs) Handles Button1.Click
    16.  
    17.  
    18.         'Play sound.
    19.         PlaySound("C:\MusicFile.wav", 0, 1)
    20.     End Sub
    21. 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
  •  



Click Here to Expand Forum to Full Width