home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 April / ChipCD_498.iso / software / ftp / quickftp / quickft3.frm < prev    next >
Text File  |  1996-01-03  |  3KB  |  140 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. End
  72.  
  73. Sub Cancelput_Click ()
  74.   '
  75.   OKDialog = False
  76.   Unload Put_file
  77.   '
  78. End Sub
  79.  
  80. Sub Form_Load ()
  81.   '
  82.   Put_file!HostFile.Text = ""
  83.   Put_file!LocalFile.Text = ""
  84.   switch_to LocalFile
  85.  
  86.   '
  87. End Sub
  88.  
  89. Sub HostFile_KeyPress (keyascii As Integer)
  90. If keyascii = 13 Then keyascii = 13: PutFile.SetFocus
  91.  
  92. End Sub
  93.  
  94. Sub LocalFile_KeyPress (keyascii As Integer)
  95. If keyascii = 13 Then keyascii = 13: switch_to HostFile
  96. End Sub
  97.  
  98. Sub PutFile_Click ()
  99.   '
  100.   Dim Hulp As String
  101.   '
  102.   src_name = Put_file!LocalFile.Text
  103.   dest_name = Put_file!HostFile.Text
  104.   '
  105.   
  106.   
  107.     Host_File_Name = src_name
  108.     Local_File_Name = dest_name
  109.     putmode = False
  110.     FTP_form!Cycle_sec = Val(Get_file!txtCycle)
  111.     If Val(txtCycle) > 0 Then
  112.       doitmode = False
  113.       cyclemode = True
  114.     End If
  115.   
  116.   
  117.   
  118.   
  119.   
  120.   If Len(Trim$(src_name)) <> 0 Then
  121.     If Dir$(src_name) <> "" Then
  122.       If Len(Trim$(dest_name)) = 0 Then
  123.         Hulp = src_name
  124.         While InStr(Hulp, "\") <> 0
  125.           Hulp = Right$(Hulp, Len(Hulp) - InStr(Hulp, "\"))
  126.         Wend
  127.         dest_name = Hulp
  128.       End If
  129.       OKDialog = True
  130.       Unload Put_file
  131.     Else
  132.       MsgBox "File does not exist " & Destnam, 64, "Warning"
  133.     End If
  134.   Else
  135.     MsgBox "You must at least enter a source name", 64, "Warning"
  136.   End If
  137.   '
  138. End Sub
  139.  
  140.