frmcreat.frm

来自「本书源码主要针对目前流行的FTP、HTTP、E-mail、Telnet、ICMP」· FRM 代码 · 共 163 行

FRM
163
字号
VERSION 5.00
Begin VB.Form frmCreateConn 
   Caption         =   "新建连接"
   ClientHeight    =   4695
   ClientLeft      =   6840
   ClientTop       =   2220
   ClientWidth     =   8070
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   4695
   ScaleWidth      =   8070
   Begin VB.CheckBox chkAsync 
      Caption         =   "异步拨号"
      Height          =   255
      Left            =   3360
      TabIndex        =   13
      Top             =   3120
      Width           =   1215
   End
   Begin VB.CommandButton cmdDial 
      Caption         =   "拨号"
      Height          =   855
      Left            =   3120
      TabIndex        =   12
      Top             =   3480
      Width           =   1935
   End
   Begin VB.TextBox txtDomain 
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   4440
      TabIndex        =   11
      Top             =   2400
      Width           =   3255
   End
   Begin VB.TextBox txtPassword 
      ForeColor       =   &H000000FF&
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   4440
      PasswordChar    =   "*"
      TabIndex        =   9
      Top             =   1440
      Width           =   3255
   End
   Begin VB.TextBox txtUserName 
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   240
      TabIndex        =   7
      Top             =   1440
      Width           =   3375
   End
   Begin VB.TextBox txtCallbackNumber 
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   240
      TabIndex        =   5
      Top             =   2400
      Width           =   3375
   End
   Begin VB.TextBox txtPhoneNumber 
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   4440
      TabIndex        =   3
      Top             =   480
      Width           =   3255
   End
   Begin VB.TextBox txtEntryName 
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   480
      Width           =   3375
   End
   Begin VB.Label lblDomain 
      Caption         =   "域"
      Height          =   255
      Left            =   4440
      TabIndex        =   10
      Top             =   2040
      Width           =   1695
   End
   Begin VB.Label lblPassword 
      Caption         =   "密码(必填)"
      Height          =   255
      Left            =   4440
      TabIndex        =   8
      Top             =   1080
      Width           =   1695
   End
   Begin VB.Label lblUserName 
      Caption         =   "用户名(必填)"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   1080
      Width           =   1695
   End
   Begin VB.Label lblCallbackNumber 
      Caption         =   "回拨号码"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   2040
      Width           =   1695
   End
   Begin VB.Label lblPhoneNumber 
      Caption         =   "电话号码(必填)"
      Height          =   255
      Left            =   4440
      TabIndex        =   2
      Top             =   120
      Width           =   1695
   End
   Begin VB.Label lblEntryName 
      Caption         =   "电话簿(必填)"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   1695
   End
End
Attribute VB_Name = "frmCreateConn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'*******************************************
'该窗体的功能是新建一个拨号连接
'*******************************************
Private Sub cmdDial_Click()
   '创建一个Connection类
   Dim objNewConnection As Connection
   
   On Error GoTo errhand
   '调用主窗体的Connections类对象的AddConnection来创建一个拨号
   Set objNewConnection = frmRASMAIN.objRASEng.Connections.AddConnection(txtEntryName.Text, txtPhoneNumber.Text, txtCallbackNumber.Text, txtUserName.Text, txtPassword.Text, txtDomain.Text, chkAsync.Value)
   '卸载窗体
   Unload frmCreateConn
   On Error GoTo 0
   Exit Sub
   
errhand:
   Call frmRASMAIN.fcnErrorHandler
   Resume Next
   
End Sub

Private Sub Form_Load()

'调整窗体位置
frmCreateConn.Top = frmRASMAIN.Top + frmRASMAIN.Height - frmRASMAIN.ScaleHeight
frmCreateConn.Left = frmRASMAIN.Left + frmRASMAIN.Width - frmRASMAIN.ScaleWidth

End Sub


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?