📄 全站仪通讯.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{D14FD2DC-9318-11D3-9CB7-000021ECAA5D}#5.0#0"; "MovingChar.ocx"
Begin VB.Form form1
BackColor = &H00FFFF80&
BorderStyle = 4 'Fixed ToolWindow
Caption = "通讯"
ClientHeight = 6795
ClientLeft = 3645
ClientTop = 1920
ClientWidth = 10455
FillColor = &H00FF00FF&
ForeColor = &H00000000&
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 453
ScaleMode = 3 'Pixel
ScaleWidth = 697
ShowInTaskbar = 0 'False
Begin VB.Timer Timer1
Left = 1200
Top = 6000
End
Begin MSComctlLib.ProgressBar ProcBar1
Height = 375
Left = 0
TabIndex = 25
Top = 6480
Width = 10455
_ExtentX = 18441
_ExtentY = 661
_Version = 393216
Appearance = 1
End
Begin MovingChar.MovingText MovingText1
Height = 855
Left = 0
TabIndex = 24
Top = 0
Width = 10455
_ExtentX = 18441
_ExtentY = 1508
MsgChar = "全站仪通讯--王金丰制作"
CharColor = 255
BackColor = 16777088
FontSize = 20.25
MousePointer = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 20.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.TextBox Text1
Height = 375
Left = 3720
MultiLine = -1 'True
TabIndex = 23
Text = "全站仪通讯.frx":0000
Top = 5880
Width = 4935
End
Begin RichTextLib.RichTextBox RichTextBox1
Height = 4815
Left = 3720
TabIndex = 22
Top = 1080
Width = 4935
_ExtentX = 8705
_ExtentY = 8493
_Version = 393217
ScrollBars = 2
TextRTF = $"全站仪通讯.frx":0009
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComDlg.CommonDialog 文件保存
Left = 600
Top = 5880
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DialogTitle = "保存文件"
Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*"
End
Begin VB.CommandButton Command7
Caption = "清除窗口"
Height = 615
Left = 8880
TabIndex = 21
Top = 3120
Width = 1095
End
Begin VB.Frame Frame3
BackColor = &H00C0FFC0&
Caption = "发送区"
Height = 1935
Left = 8760
TabIndex = 18
Top = 3840
Width = 1335
Begin VB.CommandButton Command6
Caption = "文件打开"
Height = 495
Left = 120
TabIndex = 20
Top = 360
Width = 1095
End
Begin VB.CommandButton command5
Caption = "上传"
Height = 495
Left = 120
TabIndex = 19
Top = 1320
Width = 1095
End
End
Begin VB.Frame Frame2
BackColor = &H00C0FFC0&
Caption = "接收区"
Height = 1935
Left = 8760
TabIndex = 15
Top = 960
Width = 1335
Begin VB.CommandButton Command4
Caption = "文件保存"
Height = 495
Left = 120
TabIndex = 17
Top = 1320
Width = 1095
End
Begin VB.CommandButton Command3
BackColor = &H00FF8080&
Caption = "下传"
Height = 495
Left = 120
MaskColor = &H00FF8080&
TabIndex = 16
Top = 360
Width = 1095
End
End
Begin MSCommLib.MSComm MSComm1
Left = 0
Top = 5880
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
InputLen = 1
EOFEnable = -1 'True
InputMode = 1
End
Begin VB.Frame Frame1
BackColor = &H00FF8080&
Caption = "串口设置"
Height = 4935
Left = 120
TabIndex = 0
Top = 960
Width = 3375
Begin VB.CommandButton Command2
BackColor = &H00FF8080&
Caption = "关闭串口"
CausesValidation= 0 'False
Height = 375
Left = 1800
TabIndex = 14
Top = 4080
Width = 1095
End
Begin VB.CommandButton Command1
BackColor = &H00FF8080&
Caption = "打开串口"
CausesValidation= 0 'False
Height = 375
Left = 360
TabIndex = 13
Top = 4080
Width = 1095
End
Begin VB.ComboBox Combo6
ForeColor = &H000000FF&
Height = 300
ItemData = "全站仪通讯.frx":00C3
Left = 1200
List = "全站仪通讯.frx":00D0
TabIndex = 12
Text = "无"
Top = 2640
Width = 1935
End
Begin VB.ComboBox Combo5
ForeColor = &H000000FF&
Height = 300
ItemData = "全站仪通讯.frx":00EB
Left = 1200
List = "全站仪通讯.frx":00FE
TabIndex = 11
Text = "无"
Top = 2160
Width = 1935
End
Begin VB.ComboBox Combo4
ForeColor = &H000000FF&
Height = 300
ItemData = "全站仪通讯.frx":0122
Left = 1200
List = "全站仪通讯.frx":012F
TabIndex = 10
Text = "1"
Top = 1680
Width = 1935
End
Begin VB.ComboBox Combo3
ForeColor = &H000000FF&
Height = 300
ItemData = "全站仪通讯.frx":013E
Left = 1200
List = "全站仪通讯.frx":014B
TabIndex = 9
Text = "8"
Top = 1200
Width = 1935
End
Begin VB.ComboBox Combo2
ForeColor = &H000000FF&
Height = 300
ItemData = "全站仪通讯.frx":0158
Left = 1200
List = "全站仪通讯.frx":0168
TabIndex = 8
Text = "9600"
Top = 720
Width = 1935
End
Begin VB.ComboBox Combo1
ForeColor = &H000000FF&
Height = 300
ItemData = "全站仪通讯.frx":0185
Left = 1200
List = "全站仪通讯.frx":0195
TabIndex = 2
Text = "Com1"
Top = 240
Width = 1935
End
Begin VB.Label Label6
BackColor = &H00FF8080&
Caption = "流量控制:"
Height = 255
Left = 240
TabIndex = 7
Top = 2760
Width = 975
End
Begin VB.Label Label5
BackColor = &H00FF8080&
Caption = "校 验:"
Height = 255
Left = 240
TabIndex = 6
Top = 2280
Width = 855
End
Begin VB.Label Label4
BackColor = &H00FF8080&
Caption = "停止位:"
Height = 255
Left = 240
TabIndex = 5
Top = 1800
Width = 1095
End
Begin VB.Label Label3
BackColor = &H00FF8080&
Caption = "数据位:"
Height = 255
Left = 240
TabIndex = 4
Top = 1320
Width = 855
End
Begin VB.Label Label2
BackColor = &H00FF8080&
Caption = "波特率:"
Height = 255
Left = 240
TabIndex = 3
Top = 840
Width = 735
End
Begin VB.Label Label1
BackColor = &H00FF8080&
Caption = "选择串口:"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 1095
End
End
Begin VB.Menu edit
Caption = "编辑"
Visible = 0 'False
Begin VB.Menu cut
Caption = "剪切"
Shortcut = ^X
End
Begin VB.Menu copy
Caption = "复制"
Shortcut = ^C
End
Begin VB.Menu paste
Caption = "粘贴"
Shortcut = ^V
End
Begin VB.Menu all
Caption = "全选"
Shortcut = ^A
End
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim num As Double
Dim ck As String
Dim c As Integer
Dim bbbb As Integer
Dim p As String
Dim msg As Integer
Dim length As String
Dim d As String
Dim s As String
Dim jsdata() As Byte
Dim js() As String
Dim fsdata() As Byte
Dim fs() As String
Dim zx() As String
Dim zy() As String
Dim zz() As String
Dim zdh() As String
Dim unsave As Integer
Dim m As Integer
Dim filenum As Integer
Private Sub all_Click()
Dim chd As Long
RichTextBox1.SelStart = 0
chd = Len(RichTextBox1.Text)
RichTextBox1.SelLength = chd
Clipboard.Clear
Clipboard.SetText RichTextBox1.SelText
End Sub
Private Sub Command1_Click()
Command3.Enabled = True
command5.Enabled = True
bbbb = Combo2.Text
d = Combo3.Text
s = Combo4.Text
p = Combo5.Text
If bbbb = 2400 Then
MSComm1.Settings = " 2400 , n, 8 , 1"
End If
If bbbb = 4800 Then
MSComm1.Settings = " 4800 , n, 8 , 1"
End If
If bbbb = 9600 Then
MSComm1.Settings = " 9600 , n, 8 , 1"
End If
If bbbb = 19200 Then
MSComm1.Settings = " 19200 , n, 8 , 1"
End If
Command1.Enabled = False
Command2.Enabled = True
End Sub
Private Sub Command2_Click()
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
command5.Enabled = False
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
End Sub
Private Sub Command3_Click()
If MSComm1.PortOpen = False Then MSComm1.PortOpen = True
Text1.Text = "正在下载数据..."
RichTextBox1.Text = ""
MSComm1.InputMode = comInputModeBinary
MSComm1.InputLen = 1
MSComm1.RThreshold = 1
MSComm1.SThreshold = 0
End Sub
Private Sub Command4_Click()
文件保存.FileName = ""
文件保存.DialogTitle = "文件保存"
文件保存.Action = 2
If 文件保存.FileName = "" Then Exit Sub
length = Dir(文件保存.FileName)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -