Ergebnis 1 bis 4 von 4
  1. #1
    NoClose Wurm
    Registriert seit
    08.07.2007
    Beiträge
    166

    Standard [VB6] Musik einfügen

    naja sorry wegen dem post wie vüge ich musik in mein vb6 project ein ich hab bis jezt imer ohne musik gemacht bitte um hilfe bei google usw hab ich schon gesucht finde imer das falsche ^^

  2. #2
    Tsutomu Shimomura Avatar von -=Player=-
    Registriert seit
    15.02.2006
    Beiträge
    1.549

    Standard

    Code:
    Private Const SND_APPLICATION = &H80         '  look for application specific association
    Private Const SND_ALIAS = &H10000     '  name is a WIN.INI [sounds] entry
    Private Const SND_ALIAS_ID = &H110000    '  name is a WIN.INI [sounds] entry identifier
    Private Const SND_ASYNC = &H1         '  play asynchronously
    Private Const SND_FILENAME = &H20000     '  name is a file name
    Private Const SND_LOOP = &H8         '  loop the sound until next sndPlaySound
    Private Const SND_MEMORY = &H4         '  lpszSoundName points to a memory file
    Private Const SND_NODEFAULT = &H2         '  silence not default, if sound not found
    Private Const SND_NOSTOP = &H10        '  don't stop any currently playing sound
    Private Const SND_NOWAIT = &H2000      '  don't wait if the driver is busy
    Private Const SND_PURGE = &H40               '  purge non-static events for task
    Private Const SND_RESOURCE = &H40004     '  name is a resource name or atom
    Private Const SND_SYNC = &H0         '  play synchronously (default)
    Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
    
    Private Sub Form_Load()
        PlaySound "C:\WINDOWS\MEDIA\TADA.WAV", ByVal 0&, SND_FILENAME Or SND_ASYNC
    
    End Sub
    Du musst das lied (WAV, denn mp3 ist mehr code) als resource anhängen und wenn dein Programm startet, soll es entpackt werden und dann halt mit PlaySound starten

  3. #3
    W32.FunLove
    Registriert seit
    26.06.2007
    Beiträge
    128

    Standard

    hier hätt ich was für mp3 gefunden
    http://www.vbarchiv.net/archiv/tipp_details.php?pid=499

  4. #4
    Kuschel-Wuschel enco Avatar von enco
    Registriert seit
    26.01.2006
    Beiträge
    1.075

    Standard

    Und für MIDI und MOD dateien hast du hier ein Tutorial:
    http://host-x.org/vbx/board/viewtopic.php?t=223

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •