home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 April
/
ChipCD_498.iso
/
software
/
ftp
/
quickftp
/
quickft2.frm
< prev
next >
Wrap
Text File
|
1996-01-30
|
6KB
|
251 lines
VERSION 2.00
Begin Form Get_file
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Get File"
ClientHeight = 2085
ClientLeft = 1650
ClientTop = 2775
ClientWidth = 5595
ControlBox = 0 'False
Height = 2490
Left = 1590
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2085
ScaleWidth = 5595
Top = 2430
Width = 5715
Begin PictureBox Picture1
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 480
Index = 1
Left = 360
Picture = QUICKFT2.FRX:0000
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 10
Top = 360
Width = 480
End
Begin PictureBox Picture1
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 480
Index = 0
Left = 360
Picture = QUICKFT2.FRX:0302
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 9
Top = 360
Width = 480
End
Begin CheckBox ChkAscii
Caption = "ASCII transfer"
Height = 255
Left = 3120
TabIndex = 8
Top = 1200
Width = 2295
End
Begin TextBox txtCycle
Height = 285
Left = 2160
TabIndex = 6
Text = "40"
Top = 1200
Width = 735
End
Begin CommandButton Cancelget
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 4440
TabIndex = 4
Top = 1560
Width = 975
End
Begin CommandButton GetFile
Caption = "Get"
Height = 375
Left = 3240
TabIndex = 3
Top = 1560
Width = 975
End
Begin TextBox LocalFile
Height = 285
Left = 2160
TabIndex = 2
Text = "LocalFile"
Top = 720
Width = 3255
End
Begin TextBox HostFile
Height = 285
Left = 2160
TabIndex = 1
Text = "HostFile"
Top = 240
Width = 3255
End
Begin Label Label3
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Cycle Time (sec):"
Height = 255
Left = 360
TabIndex = 7
Top = 1200
Width = 1695
End
Begin Label Label2
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Local File :"
Height = 255
Left = 960
TabIndex = 5
Top = 720
Width = 1095
End
Begin Label Label1
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Host File :"
Height = 255
Left = 960
TabIndex = 0
Top = 240
Width = 1095
End
End
Sub Cancelget_Click ()
'
OKDialog = False
Unload Get_file
'
End Sub
Sub Form_Activate ()
'__
'__ Get_file Form_Activate
'__ calls GLOBAL switch_to
'__
LocalFile = Local_File_Name
If FTP_form.Dir_list.ListIndex >= 0 Then
HostFile = FTP_form.Dir_list.List(FTP_form.Dir_list.ListIndex)
switch_to LocalFile
Else
HostFile = Host_File_Name
switch_to HostFile
End If
If putmode Then
Rem 'put clicked
If HostFile = src_name And LocalFile = dest_name Then switch_to txtCycle
Else
Rem 'get clicked
If HostFile = dest_name And LocalFile = src_name Then switch_to txtCycle
End If
End Sub
Sub Form_Load ()
picture1(0).Visible = Not putmode
picture1(1).Visible = putmode
If putmode Then
Caption = "Put File to " & HostName
Getfile.Caption = "Put"
Else
Caption = "Get File from " & HostName
Getfile.Caption = "Get"
End If
txtCycle = FTP_form.Cycle_sec
HostFile.Text = 1
chkAscii = -(transtype = Asc("A"))
FTP_form.Timer2.Enabled = False
FTP_form.TimeLeft.Visible = False
End Sub
Sub GetFile_Click ()
If Len(Trim$(src_name)) <> 0 And Len(Trim$(dest_name)) <> 0 Then
OKDialog = True
If putmode Then
src_name = Get_file!LocalFile.Text
dest_name = Get_file!HostFile.Text
Local_File_Name = src_name
Host_File_Name = dest_name
Else
src_name = Get_file!HostFile.Text
dest_name = Get_file!LocalFile.Text
Host_File_Name = src_name
Local_File_Name = dest_name
End If
FTP_form!Cycle_sec = Val(Get_file!txtCycle)
transtype = Asc("I")
If chkAscii Then transtype = Asc("A")
If Val(txtCycle) > 0 Then
doitmode = False
cyclemode = True
End If
Unload Get_file
Else
MsgBox "You must enter Host and Local filenames", 64, "Warning"
End If
End Sub
Sub HostFile_KeyPress (keyascii As Integer)
'__
'__ Get_file HostFile_KeyPress
'__
'__ parameter keyascii As Integer
'__ calls GLOBAL switch_to
'__
If keyascii = 13 Then keyascii = 0: switch_to LocalFile
End Sub
Sub LocalFile_KeyPress (keyascii As Integer)
'__
'__ Get_file LocalFile_KeyPress
'__
'__ parameter keyascii As Integer
'__ calls GLOBAL switch_to
'__
If keyascii = 13 Then keyascii = 0: switch_to txtCycle
End Sub
Sub txtCycle_GotFocus ()
'__
'__ Get_file txtCycle_GotFocus
'__ calls GLOBAL switch_to
'__
switch_to txtCycle
End Sub
Sub txtCycle_KeyPress (keyascii As Integer)
'__
'__ Get_file txtCycle_KeyPress
'__
'__ parameter keyascii As Integer
'__
If keyascii = 13 Then keyascii = 0: Getfile.SetFocus
End Sub