home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / likene1a / myprog3.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-24  |  6.2 KB  |  201 lines

  1. VERSION 5.00
  2. Begin VB.Form DirControls 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "My Prog"
  5.    ClientHeight    =   2805
  6.    ClientLeft      =   4515
  7.    ClientTop       =   2805
  8.    ClientWidth     =   3735
  9.    ControlBox      =   0   'False
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2805
  14.    ScaleWidth      =   3735
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.CommandButton Command25 
  17.       Appearance      =   0  'Flat
  18.       BackColor       =   &H00C0C0C0&
  19.       Caption         =   "Exit"
  20.       BeginProperty Font 
  21.          Name            =   "MS Sans Serif"
  22.          Size            =   8.25
  23.          Charset         =   0
  24.          Weight          =   700
  25.          Underline       =   0   'False
  26.          Italic          =   0   'False
  27.          Strikethrough   =   0   'False
  28.       EndProperty
  29.       Height          =   375
  30.       Left            =   1920
  31.       TabIndex        =   6
  32.       Top             =   2400
  33.       Width           =   1095
  34.    End
  35.    Begin VB.CommandButton Command2 
  36.       Caption         =   "Open"
  37.       BeginProperty Font 
  38.          Name            =   "Arial"
  39.          Size            =   8.25
  40.          Charset         =   0
  41.          Weight          =   700
  42.          Underline       =   0   'False
  43.          Italic          =   0   'False
  44.          Strikethrough   =   0   'False
  45.       EndProperty
  46.       Height          =   375
  47.       Left            =   720
  48.       TabIndex        =   4
  49.       Top             =   2400
  50.       Width           =   1095
  51.    End
  52.    Begin VB.DriveListBox Drive1 
  53.       BeginProperty Font 
  54.          Name            =   "Arial"
  55.          Size            =   8.25
  56.          Charset         =   0
  57.          Weight          =   700
  58.          Underline       =   0   'False
  59.          Italic          =   0   'False
  60.          Strikethrough   =   0   'False
  61.       EndProperty
  62.       Height          =   330
  63.       Left            =   0
  64.       TabIndex        =   3
  65.       Top             =   0
  66.       Width           =   1815
  67.    End
  68.    Begin VB.DirListBox Dir1 
  69.       BeginProperty Font 
  70.          Name            =   "Arial"
  71.          Size            =   8.25
  72.          Charset         =   0
  73.          Weight          =   700
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       Height          =   1290
  79.       Left            =   0
  80.       TabIndex        =   2
  81.       Top             =   480
  82.       Width           =   1815
  83.    End
  84.    Begin VB.FileListBox File1 
  85.       BeginProperty Font 
  86.          Name            =   "Arial"
  87.          Size            =   8.25
  88.          Charset         =   0
  89.          Weight          =   700
  90.          Underline       =   0   'False
  91.          Italic          =   0   'False
  92.          Strikethrough   =   0   'False
  93.       EndProperty
  94.       Height          =   1350
  95.       Left            =   1800
  96.       TabIndex        =   1
  97.       Top             =   465
  98.       Width           =   1935
  99.    End
  100.    Begin VB.TextBox Text1 
  101.       BeginProperty Font 
  102.          Name            =   "Arial"
  103.          Size            =   8.25
  104.          Charset         =   0
  105.          Weight          =   700
  106.          Underline       =   0   'False
  107.          Italic          =   0   'False
  108.          Strikethrough   =   0   'False
  109.       EndProperty
  110.       Height          =   285
  111.       Left            =   1080
  112.       TabIndex        =   0
  113.       Top             =   1920
  114.       Width           =   2655
  115.    End
  116.    Begin VB.Label Label1 
  117.       Caption         =   "Remte file:"
  118.       BeginProperty Font 
  119.          Name            =   "Arial"
  120.          Size            =   8.25
  121.          Charset         =   0
  122.          Weight          =   700
  123.          Underline       =   0   'False
  124.          Italic          =   0   'False
  125.          Strikethrough   =   0   'False
  126.       EndProperty
  127.       Height          =   255
  128.       Left            =   120
  129.       TabIndex        =   5
  130.       Top             =   1920
  131.       Width           =   975
  132.    End
  133. Attribute VB_Name = "DirControls"
  134. Attribute VB_GlobalNameSpace = False
  135. Attribute VB_Creatable = False
  136. Attribute VB_PredeclaredId = True
  137. Attribute VB_Exposed = False
  138. Dim mmflag As Boolean
  139. Dim sax As Integer
  140. Dim Say As Integer
  141. Private Declare Function mciSendString Lib "winmm.dll" Alias _
  142. "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
  143. lpstrReturnString As String, ByVal uReturnLength As Long, _
  144. ByVal hwndCallback As Long) As Long
  145. Private Type RECT
  146.     Left As Long
  147.     Top As Long
  148.     Right As Long
  149.     Bottom As Long
  150. End Type
  151. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
  152.    (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  153.  Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, _
  154.    ByVal nCmdShow As Long) As Long
  155.  Private Const SW_HIDE = 0
  156.  Private Const SW_SHOWNORMAL = 1
  157. Private Sub Command25_Click()
  158.     Call ImplodeForm(Me, 2, 500, 1)
  159.     Unload DirControls
  160.     Form12.Show
  161. End Sub
  162. Private Sub Dir1_Change()
  163. File1 = Dir1
  164. End Sub
  165. Private Sub Drive1_Change()
  166. Dir1 = Drive1
  167. End Sub
  168. Private Sub File1_Click()
  169. Text1.Text = File1
  170. End Sub
  171. Private Sub Text1_KeyPress(KeyAscii As Integer)
  172. If KeyAscii = 13 Then
  173.     KeyAscii = 0
  174.     File1.Pattern = Text1.Text
  175. End If
  176. End Sub
  177. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  178.    Dim fml As Long
  179.    Dim fmt As Long
  180.    Dim a As Integer
  181.    If mmflag = True Then
  182.       fml = Me.Left: fmt = Me.Top
  183.       If X > sax Then Me.Left = fml + (X - sax)
  184.         If X < sax Then Me.Left = fml - (sax - X)
  185.       If Y > Say Then Me.Top = fmt + (Y - Say)
  186.       If Y < Say Then Me.Top = fmt - (Say - Y)
  187.    End If
  188.    End Sub
  189. Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  190. If mmflag = False Then
  191.       sax = X
  192.       Say = Y
  193.       mmflag = True
  194.    End If
  195.    Me.MousePointer = vbSizePointer
  196.    End Sub
  197. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  198.     mmflag = False
  199.    Me.MousePointer = vbDefault
  200. End Sub
  201.