frmConnect.frm
上传用户:nicktai
上传日期:2010-01-26
资源大小:40k
文件大小:8k
源码类别:

Ftp服务器

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form frmConnect 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Connect to..."
  5.    ClientHeight    =   1620
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5280
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   1620
  13.    ScaleWidth      =   5280
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   1  'CenterOwner
  16.    Begin VB.CheckBox chkAnonym 
  17.       Caption         =   "Anonymous"
  18.       BeginProperty Font 
  19.          Name            =   "Tahoma"
  20.          Size            =   8.25
  21.          Charset         =   204
  22.          Weight          =   400
  23.          Underline       =   0   'False
  24.          Italic          =   0   'False
  25.          Strikethrough   =   0   'False
  26.       EndProperty
  27.       Height          =   255
  28.       Left            =   3960
  29.       TabIndex        =   9
  30.       Top             =   1200
  31.       Value           =   1  'Checked
  32.       Width           =   1215
  33.    End
  34.    Begin VB.CommandButton cmdCancel 
  35.       Cancel          =   -1  'True
  36.       Caption         =   "Cancel"
  37.       BeginProperty Font 
  38.          Name            =   "Tahoma"
  39.          Size            =   8.25
  40.          Charset         =   204
  41.          Weight          =   400
  42.          Underline       =   0   'False
  43.          Italic          =   0   'False
  44.          Strikethrough   =   0   'False
  45.       EndProperty
  46.       Height          =   375
  47.       Left            =   3960
  48.       TabIndex        =   7
  49.       Top             =   720
  50.       Width           =   1215
  51.    End
  52.    Begin VB.CommandButton cmdOK 
  53.       Caption         =   "OK"
  54.       Default         =   -1  'True
  55.       BeginProperty Font 
  56.          Name            =   "Tahoma"
  57.          Size            =   8.25
  58.          Charset         =   204
  59.          Weight          =   400
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.       Height          =   375
  65.       Left            =   3960
  66.       TabIndex        =   6
  67.       Top             =   240
  68.       Width           =   1215
  69.    End
  70.    Begin VB.Frame Frame3 
  71.       Caption         =   "Your E-Mail Address"
  72.       BeginProperty Font 
  73.          Name            =   "Tahoma"
  74.          Size            =   8.25
  75.          Charset         =   204
  76.          Weight          =   400
  77.          Underline       =   0   'False
  78.          Italic          =   0   'False
  79.          Strikethrough   =   0   'False
  80.       EndProperty
  81.       Height          =   615
  82.       Left            =   2040
  83.       TabIndex        =   4
  84.       Top             =   840
  85.       Width           =   1815
  86.       Begin VB.TextBox txtPassword 
  87.          BeginProperty Font 
  88.             Name            =   "Tahoma"
  89.             Size            =   8.25
  90.             Charset         =   204
  91.             Weight          =   400
  92.             Underline       =   0   'False
  93.             Italic          =   0   'False
  94.             Strikethrough   =   0   'False
  95.          EndProperty
  96.          Height          =   285
  97.          IMEMode         =   3  'DISABLE
  98.          Left            =   120
  99.          PasswordChar    =   "*"
  100.          TabIndex        =   5
  101.          Text            =   "guest@unknow.com"
  102.          Top             =   240
  103.          Width           =   1575
  104.       End
  105.    End
  106.    Begin VB.Frame Frame2 
  107.       Caption         =   "User Name"
  108.       BeginProperty Font 
  109.          Name            =   "Tahoma"
  110.          Size            =   8.25
  111.          Charset         =   204
  112.          Weight          =   400
  113.          Underline       =   0   'False
  114.          Italic          =   0   'False
  115.          Strikethrough   =   0   'False
  116.       EndProperty
  117.       Height          =   615
  118.       Left            =   120
  119.       TabIndex        =   2
  120.       Top             =   840
  121.       Width           =   1815
  122.       Begin VB.TextBox txtUserName 
  123.          BeginProperty Font 
  124.             Name            =   "Tahoma"
  125.             Size            =   8.25
  126.             Charset         =   204
  127.             Weight          =   400
  128.             Underline       =   0   'False
  129.             Italic          =   0   'False
  130.             Strikethrough   =   0   'False
  131.          EndProperty
  132.          Height          =   285
  133.          Left            =   120
  134.          TabIndex        =   3
  135.          Text            =   "anonymous"
  136.          Top             =   240
  137.          Width           =   1575
  138.       End
  139.    End
  140.    Begin VB.Frame Frame1 
  141.       Caption         =   "URL"
  142.       BeginProperty Font 
  143.          Name            =   "Tahoma"
  144.          Size            =   8.25
  145.          Charset         =   204
  146.          Weight          =   400
  147.          Underline       =   0   'False
  148.          Italic          =   0   'False
  149.          Strikethrough   =   0   'False
  150.       EndProperty
  151.       Height          =   615
  152.       Left            =   120
  153.       TabIndex        =   0
  154.       Top             =   120
  155.       Width           =   3735
  156.       Begin VB.TextBox txtURL 
  157.          BeginProperty Font 
  158.             Name            =   "Tahoma"
  159.             Size            =   8.25
  160.             Charset         =   204
  161.             Weight          =   400
  162.             Underline       =   0   'False
  163.             Italic          =   0   'False
  164.             Strikethrough   =   0   'False
  165.          EndProperty
  166.          Height          =   285
  167.          Left            =   600
  168.          TabIndex        =   1
  169.          Text            =   "ftp.microsoft.com"
  170.          Top             =   240
  171.          Width           =   3015
  172.       End
  173.       Begin VB.Label Label1 
  174.          Caption         =   " ftp://"
  175.          BeginProperty Font 
  176.             Name            =   "Tahoma"
  177.             Size            =   8.25
  178.             Charset         =   204
  179.             Weight          =   400
  180.             Underline       =   0   'False
  181.             Italic          =   0   'False
  182.             Strikethrough   =   0   'False
  183.          EndProperty
  184.          Height          =   255
  185.          Left            =   120
  186.          TabIndex        =   8
  187.          Top             =   240
  188.          Width           =   855
  189.       End
  190.    End
  191. End
  192. Attribute VB_Name = "frmConnect"
  193. Attribute VB_GlobalNameSpace = False
  194. Attribute VB_Creatable = False
  195. Attribute VB_PredeclaredId = True
  196. Attribute VB_Exposed = False
  197. 'VSS: $Header:
  198. 'local variable(s) to hold property value(s)
  199. Private mvarURL As String 'local copy
  200. Private mvarPassword As String 'local copy
  201. Private mvarUserName As String 'local copy
  202. Public Enum Command
  203.     comdOK
  204.     comdCancel
  205. End Enum
  206. Private mvarAction As Command 'local copy
  207. Public Property Let Action(ByVal vData As Command)
  208.      mvarAction = vData
  209. End Property
  210. Public Property Get Action() As Command
  211. 'used when retrieving value of a property, on the right side of an assignment.
  212. 'Syntax: Debug.Print X.Action
  213.     Action = mvarAction
  214. End Property
  215. Public Property Let UserName(ByVal vData As String)
  216.     mvarUserName = vData
  217. End Property
  218. Public Property Get UserName() As String
  219.     UserName = mvarUserName
  220. End Property
  221. Public Property Let Password(ByVal vData As String)
  222.     mvarPassword = vData
  223. End Property
  224. Public Property Get Password() As String
  225.     Password = mvarPassword
  226. End Property
  227. Public Property Let URL(ByVal vData As String)
  228.     mvarURL = vData
  229. End Property
  230. Public Property Get URL() As String
  231.     URL = mvarURL
  232. End Property
  233. Private Sub chkAnonym_Click()
  234. If chkAnonym.Value Then
  235.     txtUserName = "anonymous"
  236.     txtPassword.PasswordChar = ""
  237.     txtPassword = "guest@unknow.com"
  238.     Frame3.Caption = "Your E-Mail Address"
  239. Else
  240.     txtUserName = ""
  241.     txtPassword.PasswordChar = "*"
  242.     txtPassword = ""
  243.     Frame3.Caption = "Password"
  244. End If
  245. End Sub
  246. Private Sub cmdCancel_Click()
  247. mvarAction = comdCancel
  248. Unload Me
  249. End Sub
  250. Private Sub cmdOK_Click()
  251. If Len(txtURL) = 0 Then
  252.     MsgBox "Enter a URL or click on Cancel button.", vbOKOnly + vbInformation, "Invalid URL"
  253.     Exit Sub
  254. Else
  255.     mvarURL = LCase(txtURL.Text)
  256. End If
  257. If Len(txtUserName.Text) = 0 Then
  258.     mvarUserName = vbNullString
  259. Else
  260.     mvarUserName = txtUserName.Text
  261. End If
  262. If Len(txtPassword.Text) = 0 Then
  263.     mvarPassword = vbNullString
  264. Else
  265.     mvarPassword = txtPassword.Text
  266. End If
  267. mvarAction = comdOK
  268. Unload Me
  269. End Sub