Microsoft.DirectX.AudioVideoPlayback Drag and Drop Probleme

  • VB.NET

    Microsoft.DirectX.AudioVideoPlayback Drag and Drop Probleme

    Gute Nacht!

    Ich habe eine frage unzwar wie kann ich die Drag and Drop funktion nutzen mit meinem DirectX Video Player

    VB.NET-Quellcode

    1. Private Sub KryptonListBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles KryptonListBox1.DragDrop
    2. Dim files As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
    3. For Each filename As String In files
    4. KryptonListBox1.Items.Add(filename)
    5. Next
    6. End Sub
    7. Private Sub KryptonListBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles KryptonListBox1.DragEnter
    8. If e.Data.GetDataPresent(DataFormats.FileDrop) Then
    9. e.Effect = DragDropEffects.Copy
    10. End If
    11. End Sub



    So aber jetzt weiß ich nicht wie ich das mit dem Video Player verbinden soll?!?!

    Quellcode

    1. [code=vbnet]
    2. Private Sub KryptonButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton4.Click
    3. OpenFileDialog1.ShowDialog()
    4. With OpenFileDialog1
    5. TextBox1.Text = .FileName
    6. video = AudioVideoPlayback.Video.FromFile(TextBox1.Text)
    7. End With
    8. End Sub