diff options
| author | Jamie Mansfield <[email protected]> | 2015-03-02 16:07:13 +0000 |
|---|---|---|
| committer | Jamie Mansfield <[email protected]> | 2015-03-02 16:07:13 +0000 |
| commit | 40593f112abefbd90d9680d20c99fc4a9a158771 (patch) | |
| tree | 34a48f79eb3eaeeaf28402b453ebca3cdb5912d6 /windows 95/Windowsxp2002damaged.vb | |
| parent | 3b4c3af99d2adb63a6103d913edcfba173e313ce (diff) | |
| parent | 886804440ef3957c4fa882261d9325418d44bed6 (diff) | |
| download | histacom-40593f112abefbd90d9680d20c99fc4a9a158771.tar.gz histacom-40593f112abefbd90d9680d20c99fc4a9a158771.tar.bz2 histacom-40593f112abefbd90d9680d20c99fc4a9a158771.zip | |
Merge pull request #3 from TheUltimateHacker/master
Draggable desktop icons
Diffstat (limited to 'windows 95/Windowsxp2002damaged.vb')
| -rwxr-xr-x | windows 95/Windowsxp2002damaged.vb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/windows 95/Windowsxp2002damaged.vb b/windows 95/Windowsxp2002damaged.vb index 3a60a42..86a93df 100755 --- a/windows 95/Windowsxp2002damaged.vb +++ b/windows 95/Windowsxp2002damaged.vb @@ -36,6 +36,8 @@ commandpromptstartup.Start()
System.Windows.Forms.Application.VisualStyleState = VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled
System.Windows.Forms.Application.EnableVisualStyles()
+ desktopicons.AutoArrange = False
+ desktopicons.AllowDrop = True
End Sub
Private Sub NotePadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
@@ -424,4 +426,19 @@ showmess.errormessage.Text = "your save code is: bsdn98e5"
showmess.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 |
