B
Bre-x
Guest
I can drag it but don't know how to drag it out
Private Sub tsb_exit_Click(sender As Object, e As EventArgs) Handles tsb_exit.Click
Application.Exit()
End Sub
Private Sub fmain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Text = "John's Docs"
Me.Icon = My.Resources.icon_blue
Me.gbox_01.AllowDrop = True
Me.tss_01.Text = Environment.UserName.ToString
Me.tss_02.Text = Nothing
Me.tss_03.Text = Nothing
End Sub
Private Sub gbox_01_DragDrop(sender As Object, e As DragEventArgs) Handles gbox_01.DragDrop
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
For Each path In files
If System.IO.Directory.Exists(path) = True Then
Me.PictureBox1.Image = My.Resources.folder_full
Else
PictureBox1.Image = Drawing.Icon.ExtractAssociatedIcon(path).ToBitmap()
End If
Next
End Sub
Private Sub gbox_01_DragEnter(sender As Object, e As DragEventArgs) Handles gbox_01.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
End Sub
Private Sub gbox_01_DragLeave(sender As Object, e As EventArgs) Handles gbox_01.DragLeave
Me.PictureBox1.Image = Nothing
'Not working
End Sub
Continue reading...
Private Sub tsb_exit_Click(sender As Object, e As EventArgs) Handles tsb_exit.Click
Application.Exit()
End Sub
Private Sub fmain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Text = "John's Docs"
Me.Icon = My.Resources.icon_blue
Me.gbox_01.AllowDrop = True
Me.tss_01.Text = Environment.UserName.ToString
Me.tss_02.Text = Nothing
Me.tss_03.Text = Nothing
End Sub
Private Sub gbox_01_DragDrop(sender As Object, e As DragEventArgs) Handles gbox_01.DragDrop
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
For Each path In files
If System.IO.Directory.Exists(path) = True Then
Me.PictureBox1.Image = My.Resources.folder_full
Else
PictureBox1.Image = Drawing.Icon.ExtractAssociatedIcon(path).ToBitmap()
End If
Next
End Sub
Private Sub gbox_01_DragEnter(sender As Object, e As DragEventArgs) Handles gbox_01.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
End Sub
Private Sub gbox_01_DragLeave(sender As Object, e As EventArgs) Handles gbox_01.DragLeave
Me.PictureBox1.Image = Nothing
'Not working
End Sub
Continue reading...