home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / smplfldr / simplefi.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-29  |  2.5 KB  |  74 lines

  1. VERSION 5.00
  2. Object = "{58D2DE86-6020-11D2-A7E0-9216E5AFB27B}#1.1#0"; "cr_sfd32.ocx"
  3. Begin VB.Form frmSimpleFileDrop 
  4.    Caption         =   "SimpleFileDrop Demo"
  5.    ClientHeight    =   3015
  6.    ClientLeft      =   1095
  7.    ClientTop       =   1770
  8.    ClientWidth     =   3615
  9.    ForeColor       =   &H80000008&
  10.    LinkTopic       =   "Form1"
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   3015
  13.    ScaleWidth      =   3615
  14.    Begin VB.ListBox lstDroppedFiles 
  15.       Height          =   1980
  16.       IntegralHeight  =   0   'False
  17.       Left            =   90
  18.       TabIndex        =   0
  19.       Top             =   360
  20.       Width           =   3405
  21.    End
  22.    Begin cr_sfd32.SimpleFileDrop sfdDemo 
  23.       Left            =   480
  24.       Top             =   2460
  25.       _ExtentX        =   847
  26.       _ExtentY        =   847
  27.       DebugMode       =   -1  'True
  28.    End
  29.    Begin VB.Label lblDemo 
  30.       AutoSize        =   -1  'True
  31.       Caption         =   "No Files Dropped"
  32.       Height          =   195
  33.       Left            =   90
  34.       TabIndex        =   1
  35.       Top             =   135
  36.       Width           =   1230
  37.    End
  38.    Begin VB.Menu mnuFile 
  39.       Caption         =   "File"
  40.       Begin VB.Menu mnuFileItem 
  41.          Caption         =   "Exit"
  42.       End
  43.    End
  44. Attribute VB_Name = "frmSimpleFileDrop"
  45. Attribute VB_GlobalNameSpace = False
  46. Attribute VB_Creatable = False
  47. Attribute VB_PredeclaredId = True
  48. Attribute VB_Exposed = False
  49. Option Explicit
  50. Private Sub Form_Resize()
  51.     On Error Resume Next
  52.     If WindowState <> 1 Then
  53.         lstDroppedFiles.Move lstDroppedFiles.Left, lstDroppedFiles.Top, ScaleWidth - 2 * lstDroppedFiles.Left, ScaleHeight - lstDroppedFiles.Top - lstDroppedFiles.Left
  54.     End If
  55. End Sub
  56. Private Sub mnuFileItem_Click()
  57.     Unload Me
  58. End Sub
  59. Private Sub sfdDemo_DropFiles()
  60.     Dim lCount As Long
  61.     'Reset the listbox
  62.     lstDroppedFiles.Clear
  63.     'Show filecount
  64.     lblDemo.Caption = CStr(sfdDemo.FileCount) & " File(s) Dropped at point "
  65.     '...and file drop position
  66.     lblDemo.Caption = lblDemo.Caption & sfdDemo.x & ", " & sfdDemo.y
  67.     '...and weather it is inside the client area
  68.     lblDemo.Caption = lblDemo.Caption & " and InClient is " & IIf(sfdDemo.InClient, "True", "False")
  69.     'Retrieve each file and add to the listbox
  70.     For lCount = 0 To (sfdDemo.FileCount - 1)
  71.         lstDroppedFiles.AddItem sfdDemo.filename(lCount)
  72.     Next
  73. End Sub
  74.