sound-steuerelement

  • VB.NET

Es gibt 2 Antworten in diesem Thema. Der letzte Beitrag () ist von ichbines.

    Probier mal das hier:

    Quellcode

    1. Public Class SoundClass
    2. ' Zum Wiedergeben von Sounds
    3. ' EINFACH AUS DER HILFE KOPIERT
    4. Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name _
    5. As String, ByVal hmod As Integer, ByVal flags As Integer) As Integer
    6. ' name specifies the sound file when the SND_FILENAME flag is set.
    7. ' hmod specifies an executable file handle.
    8. ' hmod must be Nothing if the SND_RESOURCE flag is not set.
    9. ' flags specifies which flags are set.
    10. ' The PlaySound documentation lists all valid flags.
    11. Public Const SND_SYNC = &H0 ' play synchronously
    12. Public Const SND_ASYNC = &H1 ' play asynchronously
    13. Public Const SND_FILENAME = &H20000 ' name is file name
    14. Public Const SND_RESOURCE = &H40004 ' name is resource name or atom
    15. Public Sub PlaySoundFile(ByVal filename As String)
    16. ' Spielt Sound von Datei
    17. PlaySound(filename, Nothing, SND_FILENAME Or SND_ASYNC)
    18. End Sub
    19. End Class



    MFG, BattleMaker

    Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „BattleMaker“ ()