diff options
| author | TheUltimateHacker <[email protected]> | 2015-03-09 20:55:16 -0400 |
|---|---|---|
| committer | TheUltimateHacker <[email protected]> | 2015-03-09 20:55:16 -0400 |
| commit | 583b06b4be4ab3be9f33887e052f0d9de8e5404d (patch) | |
| tree | 82c3586552d26db7ebac795ae37190430460b886 | |
| parent | 996b7ea76ea4a904e7ce3d78166eaad6e8c1179d (diff) | |
| download | shiftos-583b06b4be4ab3be9f33887e052f0d9de8e5404d.tar.gz shiftos-583b06b4be4ab3be9f33887e052f0d9de8e5404d.tar.bz2 shiftos-583b06b4be4ab3be9f33887e052f0d9de8e5404d.zip | |
Draggable Icons added.
I got them working again, so yeah! Don't touch the last 3 subs at the
direct bottom of ShiftOSDesktop.
| -rw-r--r-- | ShiftOS/ShiftOSDesktop.vb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ShiftOS/ShiftOSDesktop.vb b/ShiftOS/ShiftOSDesktop.vb index e080d0a..789e966 100644 --- a/ShiftOS/ShiftOSDesktop.vb +++ b/ShiftOS/ShiftOSDesktop.vb @@ -4743,4 +4743,20 @@ File_Opener.lbtitletext.Text = "Create Shortcut" File_Opener.Show() End Sub + + Private Sub desktopicons_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles desktopicons.ItemDrag + Dim lvi As ListViewItem = CType(e.Item, ListViewItem) + desktopicons.DoDragDrop(New DataObject("System.Windows.Forms.ListViewItem", lvi), DragDropEffects.Move) + End Sub + Private Sub desktopicons_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles desktopicons.DragEnter + If e.Data.GetDataPresent("System.Windows.Forms.ListViewItem") Then + e.Effect = DragDropEffects.Move + End If + End Sub + Private Sub desktopicons_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles desktopicons.DragOver + Dim lvi As ListViewItem = CType(e.Data.GetData("System.Windows.Forms.ListViewItem"), ListViewItem) + Dim Offset As Size = Size.Subtract(Cursor.Size, New Size(Cursor.HotSpot.X, Cursor.HotSpot.Y)) + lvi.Position = Point.Subtract(desktopicons.PointToClient(New Point(e.X, e.Y)), Offset) + e.Effect = DragDropEffects.Move + End Sub End Class
\ No newline at end of file |
