Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Sounds and .WAV using MMControl 6.0

Sounds and .WAV using MMControl 6.0

Scheduled Pinned Locked Moved Visual Basic
comquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jm6k
    wrote on last edited by
    #1

    In Visual Basic 6 in Highschool we used MMControl 6.0 in order to play .WAV files in our applications? That Was a long time ago. Can anyone please tell me where I can find some code in order to play sounds in my Application Thank You The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew

    D 1 Reply Last reply
    0
    • J Jm6k

      In Visual Basic 6 in Highschool we used MMControl 6.0 in order to play .WAV files in our applications? That Was a long time ago. Can anyone please tell me where I can find some code in order to play sounds in my Application Thank You The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew

      D Offline
      D Offline
      dynamic
      wrote on last edited by
      #2

      in vb.net do this : VB:


      Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
      (ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer
      Const SND_SYNC As Integer = &H0
      Const SND_ASYNC As Integer = &H1
      Const SND_NODEFAULT As Integer = &H2
      Const SND_LOOP As Integer = &H8
      Const SND_NOSTOP As Integer = &H10
      Dim SoundName As String, wFlags As Integer, x As String

      Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
      SoundName = "D:\Knock.wav"
      wFlags = SND_ASYNC Or SND_NODEFAULT
      x = sndPlaySound(SoundName, wFlags)

      End Sub


      putting your sound file's name where it says "D:\Knock.wav" hope that helps:)


      Private void ExpectingTwins(string twins)
      {
      switch(twins)
      {
      Case ("twins on the way"):
      MessageBox.Show("for mr and mrs dynamic","twins on the way");
      break;
      }
      }


      J 1 Reply Last reply
      0
      • D dynamic

        in vb.net do this : VB:


        Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
        (ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer
        Const SND_SYNC As Integer = &H0
        Const SND_ASYNC As Integer = &H1
        Const SND_NODEFAULT As Integer = &H2
        Const SND_LOOP As Integer = &H8
        Const SND_NOSTOP As Integer = &H10
        Dim SoundName As String, wFlags As Integer, x As String

        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        SoundName = "D:\Knock.wav"
        wFlags = SND_ASYNC Or SND_NODEFAULT
        x = sndPlaySound(SoundName, wFlags)

        End Sub


        putting your sound file's name where it says "D:\Knock.wav" hope that helps:)


        Private void ExpectingTwins(string twins)
        {
        switch(twins)
        {
        Case ("twins on the way"):
        MessageBox.Show("for mr and mrs dynamic","twins on the way");
        break;
        }
        }


        J Offline
        J Offline
        Jm6k
        wrote on last edited by
        #3

        Thanks Again...You are a life saver! The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups