📄 dfh.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form Form1
AutoRedraw = -1 'True
Caption = "PC与单片机串行通讯"
ClientHeight = 4935
ClientLeft = 2940
ClientTop = 2055
ClientWidth = 7155
LinkTopic = "Form1"
ScaleHeight = 4935
ScaleWidth = 7155
Visible = 0 'False
WhatsThisHelp = -1 'True
WindowState = 2 'Maximized
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 2
Top = 0
Width = 7155
_ExtentX = 12621
_ExtentY = 741
ButtonWidth = 635
ButtonHeight = 582
Appearance = 1
ImageList = "ImageList1"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 9
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "xinjian"
Object.ToolTipText = "新建文件"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "openfile"
Object.ToolTipText = "打开文件..."
Object.Tag = ""
ImageIndex = 2
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "savefile"
Object.ToolTipText = "保存文件...(*.txt)"
Object.Tag = ""
ImageIndex = 3
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "jianqie"
Object.ToolTipText = "剪切"
Object.Tag = ""
ImageIndex = 4
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "fuzhi"
Object.ToolTipText = "复制"
Object.Tag = ""
ImageIndex = 5
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "niantie"
Object.ToolTipText = "粘贴"
Object.Tag = ""
ImageIndex = 6
EndProperty
BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
EndProperty
Begin VB.TextBox Text3
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Left = 4410
TabIndex = 6
Text = "分机号:"
Top = 60
Width = 795
End
Begin VB.TextBox Text2
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 285
Left = 2430
TabIndex = 4
Text = "波特率:"
Top = 60
Width = 765
End
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 3270
Style = 2 'Dropdown List
TabIndex = 5
Top = 30
Width = 1095
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 5250
Style = 2 'Dropdown List
TabIndex = 3
Top = 30
Width = 1155
End
End
Begin VB.Timer Timer3
Enabled = 0 'False
Interval = 4000
Left = 4290
Top = 570
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 1500
Left = 1680
Top = 600
End
Begin VB.Timer Timer1
Interval = 1000
Left = 3120
Top = 600
End
Begin MSComDlg.CommonDialog savelog
Left = 120
Top = 480
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = "txt"
End
Begin MSComDlg.CommonDialog openlog
Left = 120
Top = 1080
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSCommLib.MSComm MSComm1
Left = 120
Top = 1680
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
InBufferSize = 512
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 3690
Left = 1200
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 1
Top = 1080
Width = 5790
End
Begin ComctlLib.StatusBar statusbar
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 0
Top = 4560
Width = 7155
_ExtentX = 12621
_ExtentY = 661
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 3
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 3528
MinWidth = 3528
Text = "status;"
TextSave = "status;"
Key = ""
Object.Tag = ""
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 5962
MinWidth = 5962
Text = "settings;"
TextSave = "settings;"
Key = ""
Object.Tag = ""
EndProperty
BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 2646
MinWidth = 2646
Text = "time;"
TextSave = "time;"
Key = ""
Object.Tag = ""
EndProperty
EndProperty
End
Begin ComctlLib.ImageList ImageList1
Left = 120
Top = 2520
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 6
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "dfh.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "dfh.frx":0112
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "dfh.frx":0224
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "dfh.frx":0336
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "dfh.frx":0448
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "dfh.frx":055A
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mnufile
Caption = "文件(&F)"
Begin VB.Menu mnuclear
Caption = "新建文件"
End
Begin VB.Menu l
Caption = "-"
End
Begin VB.Menu mnuopen
Caption = "打开文件..."
End
Begin VB.Menu m
Caption = "-"
End
Begin VB.Menu mnusave1
Caption = "保存文件为...(bin)"
End
Begin VB.Menu mnuv
Caption = "-"
End
Begin VB.Menu mnusave
Caption = "保存文件为...(txt)"
End
Begin VB.Menu l9
Caption = "-"
End
Begin VB.Menu mnuexit
Caption = "退出"
Shortcut = ^Q
End
End
Begin VB.Menu mnuedit
Caption = "编辑(&E)"
Begin VB.Menu mnuj
Caption = "剪切"
End
Begin VB.Menu mnuf
Caption = "复制"
End
Begin VB.Menu mnun
Caption = "粘贴"
End
Begin VB.Menu k
Caption = "-"
End
Begin VB.Menu mnuselectall
Caption = "全选"
End
Begin VB.Menu mnudate
Caption = "日期/时间"
End
End
Begin VB.Menu mnut
Caption = "波特率(&L)"
Begin VB.Menu mnubao
Caption = "设置波特率..."
End
End
Begin VB.Menu mnucong
Caption = "从机(&C)"
Begin VB.Menu mnu1
Caption = "从机1"
Index = 1
End
Begin VB.Menu mnu1
Caption = "从机2"
Index = 2
End
Begin VB.Menu mnu1
Caption = "从机3"
Index = 3
End
Begin VB.Menu mnu1
Caption = "从机4"
Index = 4
End
Begin VB.Menu mnu1
Caption = "从机5"
Index = 5
End
Begin VB.Menu mnu1
Caption = "从机6"
Index = 6
End
Begin VB.Menu mnu1
Caption = "从机7"
Index = 7
End
Begin VB.Menu mnu1
Caption = "从机8"
Index = 8
End
Begin VB.Menu mnu1
Caption = "从机9"
Index = 9
End
Begin VB.Menu mnu1
Caption = "从机10"
Index = 10
End
End
Begin VB.Menu mnumathod
Caption = "方式(&M)"
Begin VB.Menu mnureceive
Caption = "上载数据(FFH)"
End
Begin VB.Menu l0
Caption = "-"
End
Begin VB.Menu mnutransmit
Caption = "下载程序(88H)"
End
Begin VB.Menu lk
Caption = "-"
End
Begin VB.Menu mnushu
Caption = "下载数据(77H)"
End
End
Begin VB.Menu mnuhelp
Caption = "帮助(&H)"
Begin VB.Menu help
Caption = "帮助主题"
HelpContextID = 1000
End
Begin VB.Menu relation
Caption = "关于......"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' VBTerm - This is a demonstration program for the MSComm
' communications ActiveX control.
' Copyright (c) 2000,sun2000 inc.
'copied by sun zhong shen.
'----------------------------------------------
Option Explicit
Option Base 1
Dim a3 As Variant
Dim MatLab As Object
Dim MReal() As Double
Dim MImag() As Double
Dim a1(1 To 6) As Byte
Dim b1(1 To 2) As Byte
Dim f1(1 To 1) As Byte
Dim i As Integer
Dim j As Integer
Dim ret As Integer
Dim sun As Long
Dim adr
Dim a2() As Byte
Dim b3 As Integer
Dim arry() As Byte
Dim arry1() As Single
Dim temp As String
Dim temp1 As String
Dim strtime As Date
Private Sub Combo1_Click()
If randf = False Then
Exit Sub
End If
Call mnu1_Click(Combo1.ListIndex + 1)
If asd = False Then
fangshi (False)
asd = True
Else
fangshi (True)
End If
End Sub
Private Sub Combo2_Click()
speed = Val(Combo2.Text)
congji (True)
Combo1.Enabled = True
End Sub
Private Sub Form_Load()
On Error Resume Next
randf = True
cjxyf = True
asd = True
Combo2.AddItem "300"
Combo2.AddItem "600"
Combo2.AddItem "1200"
Combo2.AddItem "2400"
Combo2.AddItem "4800"
Combo2.AddItem "9600"
Combo2.AddItem "14400"
Combo2.AddItem "19200"
Combo2.AddItem "28800"
Combo1.AddItem "从机1"
Combo1.AddItem "从机2"
Combo1.AddItem "从机3"
Combo1.AddItem "从机4"
Combo1.AddItem "从机5"
Combo1.AddItem "从机6"
Combo1.AddItem "从机7"
Combo1.AddItem "从机8"
Combo1.AddItem "从机9"
Combo1.AddItem "从机10"
Text1.Text = " "
' Center Form
Form1.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
MSComm1.CommPort = 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -