home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 April / ChipCD_498.iso / software / ftp / quickftp / quickft3.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-03  |  3.3 KB  |  116 lines

  1. VERSION 2.00
  2. Begin Form Put_file 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Put File"
  6.    ClientHeight    =   2160
  7.    ClientLeft      =   3300
  8.    ClientTop       =   2055
  9.    ClientWidth     =   3210
  10.    ControlBox      =   0   'False
  11.    Height          =   2565
  12.    Left            =   3240
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   540
  17.    ScaleWidth      =   540
  18.    Top             =   1710
  19.    Width           =   3330
  20.    Begin CommandButton Cancelput 
  21.       Cancel          =   -1  'True
  22.       Caption         =   "Cancel"
  23.       Height          =   375
  24.       Left            =   2040
  25.       TabIndex        =   4
  26.       Top             =   1560
  27.       Width           =   975
  28.    End
  29.    Begin CommandButton PutFile 
  30.       Caption         =   "Put"
  31.       Height          =   375
  32.       Left            =   120
  33.       TabIndex        =   2
  34.       Top             =   1560
  35.       Width           =   975
  36.    End
  37.    Begin TextBox LocalFile 
  38.       Height          =   285
  39.       Left            =   1320
  40.       TabIndex        =   0
  41.       Text            =   "LocalFile"
  42.       Top             =   240
  43.       Width           =   1695
  44.    End
  45.    Begin TextBox HostFile 
  46.       Height          =   285
  47.       Left            =   1320
  48.       TabIndex        =   1
  49.       Text            =   "HostFile"
  50.       Top             =   840
  51.       Width           =   1695
  52.    End
  53.    Begin Label Label2 
  54.       BackColor       =   &H00C0C0C0&
  55.       Caption         =   "Local File :"
  56.       Height          =   255
  57.       Left            =   120
  58.       TabIndex        =   5
  59.       Top             =   240
  60.       Width           =   1095
  61.    End
  62.    Begin Label Label1 
  63.       BackColor       =   &H00C0C0C0&
  64.       Caption         =   "Host File :"
  65.       Height          =   255
  66.       Left            =   120
  67.       TabIndex        =   3
  68.       Top             =   840
  69.       Width           =   1095
  70.    End
  71. Sub Cancelput_Click ()
  72.   OKDialog = False
  73.   Unload Put_file
  74. End Sub
  75. Sub Form_Load ()
  76.   Put_file!HostFile.Text = ""
  77.   Put_file!LocalFile.Text = ""
  78.   switch_to LocalFile
  79. End Sub
  80. Sub HostFile_KeyPress (keyascii As Integer)
  81. If keyascii = 13 Then keyascii = 13: PutFile.SetFocus
  82. End Sub
  83. Sub LocalFile_KeyPress (keyascii As Integer)
  84. If keyascii = 13 Then keyascii = 13: switch_to HostFile
  85. End Sub
  86. Sub PutFile_Click ()
  87.   Dim Hulp As String
  88.   src_name = Put_file!LocalFile.Text
  89.   dest_name = Put_file!HostFile.Text
  90.     Host_File_Name = src_name
  91.     Local_File_Name = dest_name
  92.     putmode = False
  93.     FTP_form!Cycle_sec = Val(Get_file!txtCycle)
  94.     If Val(txtCycle) > 0 Then
  95.       doitmode = False
  96.       cyclemode = True
  97.     End If
  98.   If Len(Trim$(src_name)) <> 0 Then
  99.     If Dir$(src_name) <> "" Then
  100.       If Len(Trim$(dest_name)) = 0 Then
  101.         Hulp = src_name
  102.         While InStr(Hulp, "\") <> 0
  103.           Hulp = Right$(Hulp, Len(Hulp) - InStr(Hulp, "\"))
  104.         Wend
  105.         dest_name = Hulp
  106.       End If
  107.       OKDialog = True
  108.       Unload Put_file
  109.     Else
  110.       MsgBox "File does not exist " & Destnam, 64, "Warning"
  111.     End If
  112.   Else
  113.     MsgBox "You must at least enter a source name", 64, "Warning"
  114.   End If
  115. End Sub
  116.