home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{58D2DE86-6020-11D2-A7E0-9216E5AFB27B}#1.1#0"; "cr_sfd32.ocx"
- Begin VB.Form frmSimpleFileDrop
- Caption = "SimpleFileDrop Demo"
- ClientHeight = 3015
- ClientLeft = 1095
- ClientTop = 1770
- ClientWidth = 3615
- ForeColor = &H80000008&
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3015
- ScaleWidth = 3615
- Begin VB.ListBox lstDroppedFiles
- Height = 1980
- IntegralHeight = 0 'False
- Left = 90
- TabIndex = 0
- Top = 360
- Width = 3405
- End
- Begin cr_sfd32.SimpleFileDrop sfdDemo
- Left = 480
- Top = 2460
- _ExtentX = 847
- _ExtentY = 847
- DebugMode = -1 'True
- End
- Begin VB.Label lblDemo
- AutoSize = -1 'True
- Caption = "No Files Dropped"
- Height = 195
- Left = 90
- TabIndex = 1
- Top = 135
- Width = 1230
- End
- Begin VB.Menu mnuFile
- Caption = "File"
- Begin VB.Menu mnuFileItem
- Caption = "Exit"
- End
- End
- Attribute VB_Name = "frmSimpleFileDrop"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Resize()
- On Error Resume Next
- If WindowState <> 1 Then
- lstDroppedFiles.Move lstDroppedFiles.Left, lstDroppedFiles.Top, ScaleWidth - 2 * lstDroppedFiles.Left, ScaleHeight - lstDroppedFiles.Top - lstDroppedFiles.Left
- End If
- End Sub
- Private Sub mnuFileItem_Click()
- Unload Me
- End Sub
- Private Sub sfdDemo_DropFiles()
- Dim lCount As Long
- 'Reset the listbox
- lstDroppedFiles.Clear
- 'Show filecount
- lblDemo.Caption = CStr(sfdDemo.FileCount) & " File(s) Dropped at point "
- '...and file drop position
- lblDemo.Caption = lblDemo.Caption & sfdDemo.x & ", " & sfdDemo.y
- '...and weather it is inside the client area
- lblDemo.Caption = lblDemo.Caption & " and InClient is " & IIf(sfdDemo.InClient, "True", "False")
- 'Retrieve each file and add to the listbox
- For lCount = 0 To (sfdDemo.FileCount - 1)
- lstDroppedFiles.AddItem sfdDemo.filename(lCount)
- Next
- End Sub
-