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

  1. VERSION 2.00
  2. Begin Form frmFileTransfers 
  3.    BackColor       =   &H00C0C0C0&
  4.    ClientHeight    =   2625
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1530
  7.    ClientWidth     =   7425
  8.    ControlBox      =   0   'False
  9.    Height          =   3030
  10.    Left            =   1035
  11.    LinkTopic       =   "Form4"
  12.    MaxButton       =   0   'False
  13.    MDIChild        =   -1  'True
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2625
  16.    ScaleWidth      =   7425
  17.    Top             =   1185
  18.    Width           =   7545
  19.    WindowState     =   2  'Maximized
  20.    Begin CommonDialog CommonDialog1 
  21.       Left            =   2880
  22.       Top             =   1665
  23.    End
  24.    Begin CheckBox chkBinary 
  25.       BackColor       =   &H00C0C0C0&
  26.       Caption         =   "Binary"
  27.       FontBold        =   0   'False
  28.       FontItalic      =   0   'False
  29.       FontName        =   "MS Sans Serif"
  30.       FontSize        =   8.25
  31.       FontStrikethru  =   0   'False
  32.       FontUnderline   =   0   'False
  33.       Height          =   375
  34.       Left            =   1170
  35.       TabIndex        =   10
  36.       Top             =   1260
  37.       Width           =   735
  38.    End
  39.    Begin CommandButton cmdSetType 
  40.       Caption         =   "Set Type"
  41.       FontBold        =   0   'False
  42.       FontItalic      =   0   'False
  43.       FontName        =   "MS Sans Serif"
  44.       FontSize        =   8.25
  45.       FontStrikethru  =   0   'False
  46.       FontUnderline   =   0   'False
  47.       Height          =   375
  48.       Left            =   90
  49.       TabIndex        =   9
  50.       Top             =   1260
  51.       Width           =   975
  52.    End
  53.    Begin TextBox txtPutDstFilename 
  54.       Height          =   285
  55.       Left            =   4290
  56.       TabIndex        =   8
  57.       Top             =   780
  58.       Width           =   2655
  59.    End
  60.    Begin TextBox txtPutSrcFilename 
  61.       Height          =   285
  62.       Left            =   1170
  63.       TabIndex        =   7
  64.       Top             =   780
  65.       Width           =   2655
  66.    End
  67.    Begin CommandButton cmdPutFile 
  68.       Caption         =   "Put File"
  69.       FontBold        =   0   'False
  70.       FontItalic      =   0   'False
  71.       FontName        =   "MS Sans Serif"
  72.       FontSize        =   8.25
  73.       FontStrikethru  =   0   'False
  74.       FontUnderline   =   0   'False
  75.       Height          =   375
  76.       Left            =   90
  77.       TabIndex        =   6
  78.       Top             =   780
  79.       Width           =   975
  80.    End
  81.    Begin CommandButton cmdGetFile 
  82.       Caption         =   "Get File"
  83.       FontBold        =   0   'False
  84.       FontItalic      =   0   'False
  85.       FontName        =   "MS Sans Serif"
  86.       FontSize        =   8.25
  87.       FontStrikethru  =   0   'False
  88.       FontUnderline   =   0   'False
  89.       Height          =   375
  90.       Left            =   105
  91.       TabIndex        =   5
  92.       Top             =   300
  93.       Width           =   975
  94.    End
  95.    Begin CommandButton cmdAbort 
  96.       Caption         =   "Abort"
  97.       FontBold        =   0   'False
  98.       FontItalic      =   0   'False
  99.       FontName        =   "MS Sans Serif"
  100.       FontSize        =   8.25
  101.       FontStrikethru  =   0   'False
  102.       FontUnderline   =   0   'False
  103.       Height          =   375
  104.       Left            =   90
  105.       TabIndex        =   4
  106.       Top             =   1740
  107.       Width           =   975
  108.    End
  109.    Begin TextBox txtGetSrcFilename 
  110.       Height          =   285
  111.       Left            =   1170
  112.       TabIndex        =   3
  113.       Top             =   300
  114.       Width           =   2655
  115.    End
  116.    Begin TextBox txtGetDstFilename 
  117.       Height          =   285
  118.       Left            =   4290
  119.       TabIndex        =   2
  120.       Top             =   300
  121.       Width           =   2655
  122.    End
  123.    Begin CommandButton Command1 
  124.       Caption         =   "..."
  125.       FontBold        =   0   'False
  126.       FontItalic      =   0   'False
  127.       FontName        =   "MS Sans Serif"
  128.       FontSize        =   8.25
  129.       FontStrikethru  =   0   'False
  130.       FontUnderline   =   0   'False
  131.       Height          =   300
  132.       Left            =   6945
  133.       TabIndex        =   1
  134.       Top             =   300
  135.       Width           =   315
  136.    End
  137.    Begin CommandButton Command2 
  138.       Caption         =   "..."
  139.       FontBold        =   0   'False
  140.       FontItalic      =   0   'False
  141.       FontName        =   "MS Sans Serif"
  142.       FontSize        =   8.25
  143.       FontStrikethru  =   0   'False
  144.       FontUnderline   =   0   'False
  145.       Height          =   300
  146.       Left            =   3825
  147.       TabIndex        =   0
  148.       Top             =   780
  149.       Width           =   315
  150.    End
  151.    Begin Label Label2 
  152.       BackColor       =   &H00C0C0C0&
  153.       Caption         =   "SrcFilename:"
  154.       FontBold        =   0   'False
  155.       FontItalic      =   0   'False
  156.       FontName        =   "MS Sans Serif"
  157.       FontSize        =   8.25
  158.       FontStrikethru  =   0   'False
  159.       FontUnderline   =   0   'False
  160.       Height          =   255
  161.       Left            =   1170
  162.       TabIndex        =   12
  163.       Top             =   60
  164.       Width           =   1575
  165.    End
  166.    Begin Label Label3 
  167.       BackColor       =   &H00C0C0C0&
  168.       Caption         =   "DstFilename:"
  169.       FontBold        =   0   'False
  170.       FontItalic      =   0   'False
  171.       FontName        =   "MS Sans Serif"
  172.       FontSize        =   8.25
  173.       FontStrikethru  =   0   'False
  174.       FontUnderline   =   0   'False
  175.       Height          =   255
  176.       Left            =   4290
  177.       TabIndex        =   11
  178.       Top             =   60
  179.       Width           =   1335
  180.    End
  181. Option Explicit
  182. Dim foo As Integer
  183. Sub chkBinary_Click ()
  184.     mainform.FTP1.Type = chkBinary.Value
  185. End Sub
  186. Private Sub cmdAbort_Click ()
  187.     MsgBox "Be patient, this may take quite a few seconds"
  188.     foo = ExecuteCommand(FtpActionAbort)
  189. End Sub
  190. Private Sub cmdGetFile_Click ()
  191.     mainform.FTP1.SrcFilename = txtGetSrcFilename.Text
  192.     mainform.FTP1.DstFilename = txtGetDstFilename.Text
  193.     foo = ExecuteCommand(FtpActionGetFile)
  194. End Sub
  195. Private Sub cmdPutFile_Click ()
  196.     mainform.FTP1.SrcFilename = txtPutSrcFilename.Text
  197.     mainform.FTP1.DstFilename = txtPutDstFilename.Text
  198.     foo = ExecuteCommand(FtpActionPutFile)
  199. End Sub
  200. Private Sub cmdSetType_Click ()
  201.     If (chkBinary.Value = 1) Then
  202.         mainform.FTP1.Type = 1
  203.     Else
  204.         mainform.FTP1.Type = 0
  205.     End If
  206.     foo = ExecuteCommand(FtpActionSendType)
  207. End Sub
  208. Private Sub Command1_Click ()
  209.     CommonDialog1.CancelError = True
  210.     On Error Resume Next
  211.     CommonDialog1.Action = 2
  212.     If (Err <> 0) Then
  213.         Exit Sub
  214.     End If
  215.     On Error GoTo 0
  216.     txtGetDstFilename.Text = CommonDialog1.Filename
  217. End Sub
  218. Private Sub Command2_Click ()
  219.     CommonDialog1.CancelError = True
  220.     On Error Resume Next
  221.     CommonDialog1.Action = 1
  222.     If (Err <> 0) Then
  223.         Exit Sub
  224.     End If
  225.     On Error GoTo 0
  226.     txtPutSrcFilename.Text = CommonDialog1.Filename
  227. End Sub
  228. Sub Form_Load ()
  229.     chkBinary.Value = mainform.FTP1.Type
  230. End Sub
  231.