📄 vbterm.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.0#0"; "comdlg32.ocx"
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.0#0"; "mscomm32.ocx"
Object = "{831FDD16-0C5C-11d2-A9FC-0000F8754DA1}#1.0#0"; "comctl32.ocx"
Begin VB.Form frmTerminal
Caption = "Visual Basic 终端"
ClientHeight = 4935
ClientLeft = 2940
ClientTop = 2055
ClientWidth = 7155
ForeColor = &H00000000&
Icon = "vbterm.frx":0000
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 4935
ScaleWidth = 7155
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 2000
Left = 210
Top = 3645
End
Begin VB.TextBox txtTerm
Height = 3690
Left = 1245
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 3
Top = 1140
Width = 5790
End
Begin MSComCtlLib.Toolbar tbrToolBar
Align = 1 'Align Top
Height = 390
Left = 0
TabIndex = 1
Top = 0
Width = 7155
_ExtentX = 12621
_ExtentY = 688
ButtonWidth = 609
ButtonHeight = 582
ImageList = "ImageList1"
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 10
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Style = 3
Value = 1
MixedState = -1 'True
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "OpenLogFile"
Description = "打开登录文件..."
Object.ToolTipText = "打开登录文件..."
ImageIndex = 1
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Enabled = 0 'False
Key = "CloseLogFile"
Description = "关闭登录文件"
Object.ToolTipText = "关闭登录文件"
ImageIndex = 2
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Style = 3
Value = 1
MixedState = -1 'True
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "DialPhoneNumber"
Description = "拨打电话号码..."
Object.ToolTipText = "拨打电话号码..."
ImageIndex = 3
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Enabled = 0 'False
Key = "HangUpPhone"
Description = "挂电话"
Object.ToolTipText = "挂电话"
ImageIndex = 4
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Style = 3
Value = 1
MixedState = -1 'True
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Properties"
Description = "属性..."
Object.ToolTipText = "属性..."
ImageIndex = 5
EndProperty
BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
Style = 3
Value = 1
MixedState = -1 'True
EndProperty
BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
Enabled = 0 'False
Key = "TransmitTextFile"
Description = "传输文本文件..."
Object.ToolTipText = "传输文本文件..."
ImageIndex = 6
EndProperty
EndProperty
MouseIcon = "vbterm.frx":030A
Begin VB.Frame Frame1
BorderStyle = 0 'None
Caption = "Frame1"
Height = 240
Left = 4000
TabIndex = 2
Top = 75
Width = 240
Begin VB.Image imgConnected
Height = 240
Left = 0
Picture = "vbterm.frx":0326
Stretch = -1 'True
ToolTipText = "切换端口"
Top = 0
Width = 240
End
Begin VB.Image imgNotConnected
Height = 240
Left = 0
Picture = "vbterm.frx":0470
Stretch = -1 'True
ToolTipText = "切换端口"
Top = 0
Width = 240
End
End
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 165
Top = 1815
End
Begin MSCommLib.MSComm MSComm1
Left = 45
Top = 510
_ExtentX = 1005
_ExtentY = 1005
DTREnable = -1 'True
NullDiscard = -1 'True
RThreshold = 1
RTSEnable = -1 'True
SThreshold = 1
InputMode = 1
End
Begin MSComDlg.CommonDialog OpenLog
Left = 105
Top = 1170
_ExtentX = 847
_ExtentY = 847
DefaultExt = "LOG"
FileName = "打开通信登录文件"
Filter = "登录文件 (*.log)|*.log;"
FilterIndex = 501
FontSize = 9.02458e-38
End
Begin MSComCtlLib.StatusBar sbrStatus
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 0
Top = 4620
Width = 7155
_ExtentX = 12621
_ExtentY = 556
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 3
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 2
Object.Width = 2540
MinWidth = 2540
Text = "状态:"
TextSave = "状态:"
Key = "status"
Object.ToolTipText = "通信端口状态"
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 8310
MinWidth = 2
Text = "设置:"
TextSave = "设置:"
Key = "setting"
Object.ToolTipText = "通信端口设置"
EndProperty
BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 2
Object.Width = 1244
MinWidth = 1244
Key = "ConnectTime"
Object.ToolTipText = "连接时间"
EndProperty
EndProperty
MouseIcon = "vbterm.frx":05BA
End
Begin MSComCtlLib.ImageList ImageList1
Left = 165
Top = 2445
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 6
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "vbterm.frx":05D6
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "vbterm.frx":08F0
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "vbterm.frx":0C0A
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "vbterm.frx":0F24
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "vbterm.frx":123E
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "vbterm.frx":1558
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuOpenLog
Caption = "打开文件(&O)..."
End
Begin VB.Menu mnuCloseLog
Caption = "关闭文件(&C)"
Enabled = 0 'False
End
Begin VB.Menu M3
Caption = "-"
End
Begin VB.Menu mnuSendText
Caption = "传输文本文件(&T)..."
Enabled = 0 'False
End
Begin VB.Menu Bar2
Caption = "-"
End
Begin VB.Menu mnuFileExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuPort
Caption = "通信端口(&C)"
Begin VB.Menu mnuOpen
Caption = "打开端口(&O)"
End
Begin VB.Menu MBar1
Caption = "-"
End
Begin VB.Menu mnuProperties
Caption = "属性..."
End
End
Begin VB.Menu mnuMSComm
Caption = "MSComm(&M)"
Begin VB.Menu mnuInputLen
Caption = "InputLen(&I)..."
End
Begin VB.Menu mnuRThreshold
Caption = "RThreshold(&R)..."
End
Begin VB.Menu mnuSThreshold
Caption = "SThreshold(&S)..."
End
Begin VB.Menu mnuParRep
Caption = "ParityReplace(&A)..."
End
Begin VB.Menu mnuDTREnable
Caption = "DTREnable(&D)"
End
Begin VB.Menu Bar3
Caption = "-"
End
Begin VB.Menu mnuHCD
Caption = "CDHolding(&C)..."
End
Begin VB.Menu mnuHCTS
Caption = "CTSHolding(&O)..."
End
Begin VB.Menu mnuHDSR
Caption = "DSRHolding(&L)..."
End
End
Begin VB.Menu mnuCall
Caption = "电话(&A)"
Begin VB.Menu mnuDial
Caption = "拨打电话号码(&D)..."
End
Begin VB.Menu mnuHangUp
Caption = "挂电话(&H)"
Enabled = 0 'False
End
End
End
Attribute VB_Name = "frmTerminal"
Attribute VB_Base = "0{3E2D207C-D67B-11CF-9BF3-00AA002FFD8F}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_TemplateDerived = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'--------------------------------------------------
' VBTerm - 这个演示程序演示了 MSComm
' 通信 ActiveX 控件。
'
' Copyright (c) 1994, Crescent Software, Inc.
' 由 Don Malin 和 Carl Franklin 编写。
'
' 由 Mike Maddox 更新
'--------------------------------------------------
Option Explicit
Dim Ret As Integer ' 设为整数。
Dim Temp As String ' 设为串。
Dim hLogFile As Integer ' 打开的登录文件句柄
Dim StartTime As Date ' 为端口计时器存储开始时间
Private Sub Form_Load()
Dim CommPort As String, Handshaking As String, Settings As String
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -