?? frmmain.frm
字號(hào):
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmMain
BorderStyle = 3 'Fixed Dialog
Caption = "串口編程調(diào)試精靈"
ClientHeight = 7260
ClientLeft = 4515
ClientTop = 2820
ClientWidth = 9750
BeginProperty Font
Name = "宋體"
Size = 8.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "frmCommWizard"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7260
ScaleWidth = 9750
Begin VB.Timer ctrTimer
Left = 4560
Top = 120
End
Begin VB.Frame Frame3
Caption = "發(fā)送內(nèi)容"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 600
TabIndex = 2
Top = 5880
Width = 8175
Begin VB.ComboBox cboHexAscii
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
ItemData = "frmMain.frx":0000
Left = 6240
List = "frmMain.frx":000A
Style = 2 'Dropdown List
TabIndex = 14
Top = 480
Width = 1455
End
Begin VB.TextBox txtSend
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 8
Width = 5535
End
End
Begin VB.Frame Frame2
Caption = "接收回顯"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3735
Left = 480
TabIndex = 1
Top = 1800
Width = 8415
Begin VB.VScrollBar vsclHexEdit
Height = 2535
Left = 5640
Max = 5
TabIndex = 21
Top = 480
Value = 2
Visible = 0 'False
Width = 200
End
Begin VB.HScrollBar hsclHexEdit
Height = 200
Left = 960
Max = 5
TabIndex = 20
Top = 3120
Value = 2
Width = 3495
End
Begin VB.Frame fraHexEditBackground
Height = 2535
Left = 600
TabIndex = 16
Top = 480
Width = 4575
Begin VB.TextBox txtBlank
BorderStyle = 0 'None
Height = 1935
Left = 3240
TabIndex = 22
Top = 240
Width = 855
End
Begin VB.TextBox txtHexEditText
BorderStyle = 0 'None
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1935
Left = 2280
MultiLine = -1 'True
TabIndex = 19
Top = 240
Width = 735
End
Begin VB.TextBox txtHexEditHex
BorderStyle = 0 'None
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1935
Left = 1200
MultiLine = -1 'True
TabIndex = 18
Top = 240
Width = 735
End
Begin VB.TextBox txtHexEditAddress
BorderStyle = 0 'None
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1935
Left = 240
MultiLine = -1 'True
TabIndex = 17
Top = 240
Width = 615
End
End
Begin MSComctlLib.Slider sldLenth
Height = 375
Index = 0
Left = 6600
TabIndex = 15
Top = 2760
Width = 1335
_ExtentX = 2355
_ExtentY = 661
_Version = 393216
Min = 1
Max = 32
SelStart = 8
TickFrequency = 2
Value = 8
End
Begin VB.CheckBox chkAddress48
Caption = "4/8位地址"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6720
TabIndex = 13
Top = 1920
Width = 1215
End
Begin VB.CheckBox chkAddress
Caption = "地址"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6720
TabIndex = 12
Top = 1440
Width = 1215
End
Begin VB.CheckBox chkAscii
Caption = "ASCII碼"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6720
TabIndex = 11
Top = 960
Width = 1215
End
Begin VB.CheckBox chkHex
Caption = "十六進(jìn)制碼"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 6720
TabIndex = 10
Top = 480
Width = 1215
End
Begin VB.TextBox txtReceive
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3240
Left = 200
MultiLine = -1 'True
TabIndex = 9
Top = 300
Width = 6060
End
End
Begin VB.Frame Frame1
Caption = "操作提示"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 480
TabIndex = 0
Top = 360
Width = 8415
Begin VB.CommandButton cmdClear
Caption = "清除"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5640
TabIndex = 7
Top = 360
Width = 1335
End
Begin VB.CommandButton cmdSetting
Caption = "設(shè)置參數(shù)"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4560
TabIndex = 6
Top = 360
Width = 1095
End
Begin VB.CommandButton cmdReceive
Caption = "開(kāi)始接收"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3600
TabIndex = 5
Top = 360
Width = 975
End
Begin VB.CommandButton cmdManualSend
Caption = "手動(dòng)發(fā)送"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
TabIndex = 4
Top = 360
Width = 1095
End
Begin VB.CommandButton cmdAutoSend
Caption = "自動(dòng)發(fā)送"
BeginProperty Font
Name = "宋體"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 3
Top = 360
Width = 1215
End
End
Begin MSCommLib.MSComm ctrMSComm
Left = 6720
Top = 0
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
InputLen = 8
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**********************************
'字符表示的十六進(jìn)制數(shù)轉(zhuǎn)化為相應(yīng)的整數(shù)
'錯(cuò)誤則返回 -1
'**********************************
Function ConvertHexChr(str As String) As Integer
Dim test As Integer
test = Asc(str)
If test >= Asc("0") And test <= Asc("9") Then
test = test - Asc("0")
ElseIf test >= Asc("a") And test <= Asc("f") Then
test = test - Asc("a") + 10
ElseIf test >= Asc("A") And test <= Asc("F") Then
test = test - Asc("A") + 10
Else
test = -1 '出錯(cuò)信息
End If
ConvertHexChr = test
End Function
'**********************************
'字符串表示的十六進(jìn)制數(shù)據(jù)轉(zhuǎn)化為相應(yīng)的字節(jié)串
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -