home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
- Begin VB.Form frmMain
- Caption = "FTP Client "
- ClientHeight = 4605
- ClientLeft = 60
- ClientTop = 585
- ClientWidth = 8730
- LinkTopic = "Form1"
- LockControls = -1 'True
- ScaleHeight = 4605
- ScaleWidth = 8730
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton Command2
- Caption = "Upload File"
- Height = 375
- Left = 2340
- TabIndex = 12
- Top = 3480
- Width = 1395
- End
- Begin VB.Frame Frame2
- Caption = "Local Files System"
- Height = 4575
- Left = 3960
- TabIndex = 8
- Top = 0
- Width = 4695
- Begin VB.FileListBox File1
- Height = 2040
- Left = 180
- TabIndex = 11
- Top = 2400
- Width = 4335
- End
- Begin VB.DirListBox Dir1
- Height = 1440
- Left = 180
- TabIndex = 10
- Top = 780
- Width = 4335
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 180
- TabIndex = 9
- Top = 300
- Width = 4335
- End
- End
- Begin VB.Frame Frame1
- Caption = "Status"
- ForeColor = &H00FF0000&
- Height = 675
- Left = 120
- TabIndex = 4
- Top = 3900
- Width = 3675
- Begin VB.Label Label2
- BorderStyle = 1 'Fixed Single
- ForeColor = &H000000FF&
- Height = 435
- Left = 60
- TabIndex = 5
- Top = 180
- Width = 3555
- End
- End
- Begin VB.CommandButton Command1
- Caption = "Download File"
- Height = 375
- Left = 180
- TabIndex = 3
- Top = 3480
- Width = 1335
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 1020
- TabIndex = 2
- Top = 3120
- Width = 2715
- End
- Begin VB.ListBox List1
- Height = 2595
- Left = 180
- Sorted = -1 'True
- TabIndex = 0
- Top = 300
- Width = 3555
- End
- Begin InetCtlsObjects.Inet Inet1
- Left = 180
- Top = 3300
- _ExtentX = 1005
- _ExtentY = 1005
- End
- Begin VB.Label Label4
- Caption = "Not Connected"
- Height = 255
- Left = 840
- TabIndex = 7
- Top = 60
- Width = 2835
- End
- Begin VB.Label Label3
- Caption = "Server:"
- Height = 255
- Left = 180
- TabIndex = 6
- Top = 60
- Width = 615
- End
- Begin VB.Label Label1
- Caption = "Selected File:"
- Height = 195
- Left = 0
- TabIndex = 1
- Top = 3120
- Width = 1035
- End
- Begin VB.Menu Options
- Caption = "Options"
- Begin VB.Menu Server
- Caption = "Edit Server Settings"
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim LocalFile As String
- If Text1.Text = "" Then
- MsgBox "No Server File Selected"
- Exit Sub
- End If
- If Right(App.Path, 1) = "\" Then
- LocalFile = App.Path & Text1.Text
- LocalFile = App.Path & "\" & Text1.Text
- End If
- Command2.Enabled = False
- Label2.Caption = "Retreiving file: " & Text1.Text
- Inet1.Execute , "GET " & Text1.Text & " " & LocalFile
- While Inet1.StillExecuting
- DoEvents
- Label2.Caption = "File Transfer Complete"
- Text1.Text = ""
- Command2.Enabled = True
- File1.Refresh
- End Sub
- Private Sub Command2_Click()
- Dim LocalFile As String
- If Text1.Text = "" Then
- MsgBox "No File Selected to Upload!"
- Exit Sub
- End If
- If Right(File1.Path, 1) = "\" Then
- LocalFile = File1.Path & Text1.Text
- LocalFile = File1.Path & "\" & Text1.Text
- End If
- Command1.Enabled = False
- Label2.Caption = "Sending File: " & Text1.Text
- frmMain.Inet1.Execute , "PUT " & LocalFile & " " & Text1.Text
- While frmMain.Inet1.StillExecuting
- DoEvents
- Label2.Caption = "File Transfer Complete - Ready"
- RefreshServer
- Command2.Enabled = True
- End Sub
- Private Sub File1_Click()
- Command1.Enabled = False
- Command2.Enabled = True
- Text1.Text = File1.List(File1.ListIndex)
- End Sub
- Private Sub Form_Load()
- GoOnline = True
- Me.Show
- DoEvents
- If Dir(App.Path & "\login.dat", vbNormal) = "" Then
- frmServer.Show 1
- LogIn
- LogIn
- End If
- Drive1.Drive = App.Path
- Dir1.Path = App.Path
- GoOnline = False
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- On Error Resume Next
- Inet1.Execute , "CLOSE"
- End Sub
- Private Sub List1_Click()
- Command2.Enabled = False
- Command1.Enabled = True
- Text1.Text = List1.List(List1.ListIndex)
- Label2.Caption = "Press Download Button now to retreive file"
- End Sub
- Private Sub Server_Click()
- frmServer.Show 1
- LogIn
- End Sub
- Private Sub Drive1_Change()
- Dir1.Path = Drive1.Drive ' Set directory path.
- End Sub
- Private Sub Dir1_Change()
- File1.Path = Dir1.Path ' Set file path.
- End Sub
-