home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / windows / ocx / ipack.exe / FTPFILE.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-17  |  5.3 KB  |  181 lines

  1. VERSION 4.00
  2. Begin VB.Form frmFileTransfers 
  3.    BorderStyle     =   0  'None
  4.    ClientHeight    =   2505
  5.    ClientLeft      =   5235
  6.    ClientTop       =   5595
  7.    ClientWidth     =   7830
  8.    ControlBox      =   0   'False
  9.    Height          =   2910
  10.    Left            =   5175
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   2505
  17.    ScaleWidth      =   7830
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   5250
  20.    Visible         =   0   'False
  21.    Width           =   7950
  22.    Begin VB.CommandButton Command2 
  23.       Caption         =   "..."
  24.       Height          =   300
  25.       Left            =   3975
  26.       TabIndex        =   12
  27.       Top             =   840
  28.       Width           =   315
  29.    End
  30.    Begin VB.CommandButton Command1 
  31.       Caption         =   "..."
  32.       Height          =   300
  33.       Left            =   7095
  34.       TabIndex        =   11
  35.       Top             =   360
  36.       Width           =   315
  37.    End
  38.    Begin VB.TextBox txtGetDstFilename 
  39.       Height          =   285
  40.       Left            =   4440
  41.       TabIndex        =   10
  42.       Top             =   360
  43.       Width           =   2655
  44.    End
  45.    Begin VB.TextBox txtGetSrcFilename 
  46.       Height          =   285
  47.       Left            =   1320
  48.       TabIndex        =   7
  49.       Top             =   360
  50.       Width           =   2655
  51.    End
  52.    Begin VB.CommandButton cmdAbort 
  53.       Caption         =   "Abort"
  54.       Height          =   375
  55.       Left            =   240
  56.       TabIndex        =   6
  57.       Top             =   1800
  58.       Width           =   975
  59.    End
  60.    Begin VB.CommandButton cmdGetFile 
  61.       Caption         =   "GetFile"
  62.       Height          =   375
  63.       Left            =   240
  64.       TabIndex        =   5
  65.       Top             =   360
  66.       Width           =   975
  67.    End
  68.    Begin VB.CommandButton cmdPutFile 
  69.       Caption         =   "PutFile"
  70.       Height          =   375
  71.       Left            =   240
  72.       TabIndex        =   4
  73.       Top             =   840
  74.       Width           =   975
  75.    End
  76.    Begin VB.TextBox txtPutSrcFilename 
  77.       Height          =   285
  78.       Left            =   1320
  79.       TabIndex        =   3
  80.       Top             =   840
  81.       Width           =   2655
  82.    End
  83.    Begin VB.TextBox txtPutDstFilename 
  84.       Height          =   285
  85.       Left            =   4440
  86.       TabIndex        =   2
  87.       Top             =   840
  88.       Width           =   2655
  89.    End
  90.    Begin VB.CommandButton cmdSetType 
  91.       Caption         =   "SetType"
  92.       Height          =   375
  93.       Left            =   240
  94.       TabIndex        =   1
  95.       Top             =   1320
  96.       Width           =   975
  97.    End
  98.    Begin VB.CheckBox chkBinary 
  99.       Caption         =   "Binary"
  100.       Height          =   375
  101.       Left            =   1320
  102.       TabIndex        =   0
  103.       Top             =   1320
  104.       Value           =   1  'Checked
  105.       Width           =   735
  106.    End
  107.    Begin MSComDlg.CommonDialog CommonDialog1 
  108.       Left            =   2520
  109.       Top             =   1440
  110.       _ExtentX        =   847
  111.       _ExtentY        =   847
  112.       _Version        =   327680
  113.       FontSize        =   8.6217e-39
  114.    End
  115.    Begin VB.Label Label3 
  116.       Caption         =   "DstFilename:"
  117.       Height          =   255
  118.       Left            =   4440
  119.       TabIndex        =   9
  120.       Top             =   120
  121.       Width           =   1335
  122.    End
  123.    Begin VB.Label Label2 
  124.       Caption         =   "SrcFilename:"
  125.       Height          =   255
  126.       Left            =   1320
  127.       TabIndex        =   8
  128.       Top             =   120
  129.       Width           =   1575
  130.    End
  131. Attribute VB_Name = "frmFileTransfers"
  132. Attribute VB_Creatable = False
  133. Attribute VB_Exposed = False
  134. Option Explicit
  135. Private Sub cmdSetType_Click()
  136.     If (chkBinary.Value = 1) Then
  137.         MainForm.Ftp1.Type = 1
  138.     Else
  139.         MainForm.Ftp1.Type = 0
  140.     End If
  141.     MainForm.Ftp1.SendType MainForm.Ftp1.Type
  142. End Sub
  143. Private Sub cmdGetFile_Click()
  144.     Dim s As String
  145.     MainForm.Ftp1.SrcFilename = txtGetSrcFilename.Text
  146.     MainForm.Ftp1.DstFilename = txtGetDstFilename.Text
  147.     Call MainForm.ExecuteCommand(FtpActionGetFile)
  148. End Sub
  149. Private Sub cmdPutFile_Click()
  150.     MainForm.Ftp1.SrcFilename = txtPutSrcFilename.Text
  151.     MainForm.Ftp1.DstFilename = txtPutDstFilename.Text
  152.     Call MainForm.ExecuteCommand(FtpActionPutFile)
  153. End Sub
  154. Private Sub cmdAbort_Click()
  155.     MsgBox "This may take a few seconds, please be patient"
  156.     Call MainForm.ExecuteCommand(FtpActionAbort)
  157. End Sub
  158. Private Sub Command1_Click()
  159.     CommonDialog1.CancelError = True
  160.     On Error Resume Next
  161.     CommonDialog1.ShowSave
  162.     If (Err <> 0) Then
  163.         Exit Sub
  164.     End If
  165.     On Error GoTo 0
  166.     txtGetDstFilename.Text = CommonDialog1.filename
  167. End Sub
  168. Private Sub Command2_Click()
  169.     CommonDialog1.CancelError = True
  170.     On Error Resume Next
  171.     CommonDialog1.ShowOpen
  172.     If (Err <> 0) Then
  173.         Exit Sub
  174.     End If
  175.     On Error GoTo 0
  176.     txtPutSrcFilename.Text = CommonDialog1.filename
  177. End Sub
  178. Private Sub Form_Load()
  179.     chkBinary.Value = MainForm.Ftp1.Type
  180. End Sub
  181.