Zitat Zitat von Kaspersky Beitrag anzeigen
du musst die datei erst droppen und dann abspielen, siehe hier:
Code:
Option Explicit On
Public Class Form1
    Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpszCommand As String, ByVal lpszReturnString As String, ByVal cchReturnLength As Long, ByVal hwndCallback As Long) As Long
    Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        mciSendString("stop MyMP3", 0, 0, 0)
        mciSendString("close MyMP3", 0, 0, 0)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        IO.File.WriteAllBytes("test.mp3", My.Resources.Guns)
        If mciSendString("open " & "test.mp3" & " type MPEGVideo alias MyMP3", 0, 0, 0) = 0 Then
            mciSendString("play MyMP3 from 0", 0, 0, 0)
        End If
    End Sub
End Class
Bekomme es nicht hin steht immer guns ist kein member von resources