Ist euch auch schon aufgefallen, das man mit einem simplen Drag n Drop Code:
Spoiler anzeigen
im Adminmodusn ein Problem hat: geht nicht!
Wie kann man Drag n Drop auch als Admin "ausführen" ?
UFO
VB.NET-Quellcode
- Public Class Form1
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- ListBox1.AllowDrop = True
- End Sub
- Private Sub ListBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragDrop
- If e.Data.GetDataPresent(DataFormats.FileDrop) Then
- Dim filePaths As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
- For Each s As String In filePaths
- ListBox1.Items.Add(s)
- Next s
- End If
- End Sub
- Private Sub ListBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragEnter
- If e.Data.GetDataPresent(DataFormats.FileDrop) Then
- e.Effect = DragDropEffects.Copy
- Else
- e.Effect = DragDropEffects.None
- End If
- End Sub
- End Class
im Adminmodusn ein Problem hat: geht nicht!
Wie kann man Drag n Drop auch als Admin "ausführen" ?
UFO