home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmDrag
- Caption = "
- ClientHeight = 2670
- ClientLeft = 2130
- ClientTop = 3780
- ClientWidth = 6405
- ClipControls = 0 'False
- LinkTopic = "Form2"
- MDIChild = -1 'True
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2670
- ScaleWidth = 6405
- Begin VB.DriveListBox Drive1
- DragIcon = "DRAG.frx":0000
- BeginProperty Font
- Name = "
- Size = 9
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 120
- TabIndex = 2
- Top = 120
- Width = 1935
- End
- Begin VB.FileListBox File1
- BeginProperty Font
- Name = "
- Size = 9
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 2250
- Left = 2280
- Pattern = "*.txt;*.bmp;*.exe;*.hlp"
- TabIndex = 1
- Top = 120
- Width = 2052
- End
- Begin VB.DirListBox Dir1
- DragIcon = "DRAG.frx":030A
- BeginProperty Font
- Name = "
- Size = 9
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1920
- Left = 120
- TabIndex = 0
- Top = 600
- Width = 1935
- End
- Begin VB.Image Image1
- BorderStyle = 1 'Fixed Single
- Height = 2295
- Left = 4560
- Stretch = -1 'True
- Top = 120
- Width = 1725
- End
- Attribute VB_Name = "frmDrag"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Dir1_Change()
- File1.Path = Dir1.Path
- End Sub
- Private Sub Drive1_Change()
- On Error GoTo DriveErrs
- Dir1.Path = Drive1.Drive
- Exit Sub
- DriveErrs:
- Select Case Err
- Case 68
- MsgBox prompt:="
- buttons:=vbExclamation
- '
- Drive1.Drive = Dir1.Path
- Exit Sub
- Case Else
- MsgBox prompt:="
- ", buttons:=vbExclamation
- End Select
- End Sub
- Private Sub File1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- File1.DragIcon = Drive1.DragIcon
- File1.Drag
- End Sub
- Private Sub Form_Load()
- frmDrag.Width = 6525
- frmDrag.Height = 3075
- End Sub
- Private Sub Image1_DragDrop(Source As Control, X As Single, Y As Single)
- '
- temp = LCase(Right$(File1.filename, 3))
- '
- If Mid(File1.Path, Len(File1.Path)) = "\" Then
- dropfile = File1.Path & File1.filename
- '
- "\"
- Else
- dropfile = File1.Path & "\" & File1.filename
- End If
-
- Image1.Picture = LoadPicture("")
- Select Case UCase$(Trim$(temp))
- Case "TXT"
- X = Shell("Notepad " + dropfile, 1)
- Case "BMP"
- Image1.Picture = LoadPicture(dropfile)
- Case "EXE"
- X = Shell(dropfile, 1)
- Case "HLP"
- X = Shell("WinHelp " + dropfile, 1)
- Case Else
- nl = Chr$(10) + Chr$(13)
- msg = "
- msg = vbCrLf & msg & vbCrLf & vbCrLf & " .txt, .bmp, .exe, .hlp"
- MsgBox msg
- End Select
- End Sub
- Private Sub Image1_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
- Select Case State
- Case 0
- '
- File1.DragIcon = Dir1.DragIcon
- Case 1
- '
- DragIcon
- File1.DragIcon = Drive1.DragIcon
- End Select
- Dir1.DragIcon
- Drive1.DragIcon
- File1
- "Enter"
- "Leave"
- End Sub
-