?? form3.frm
字號:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Form3
Caption = "自動發送事件接收 "
ClientHeight = 4140
ClientLeft = 60
ClientTop = 450
ClientWidth = 7440
LinkTopic = "Form3"
ScaleHeight = 4140
ScaleWidth = 7440
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 2760
Top = 3240
End
Begin VB.CommandButton Command1
Caption = "Start"
Height = 495
Left = 480
TabIndex = 2
Top = 3240
Width = 1215
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2295
Left = 3720
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 480
Width = 2535
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2295
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 495
Width = 2655
End
Begin MSCommLib.MSComm MSComm1
Left = 3960
Top = 3240
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
CommPort = 2
DTREnable = -1 'True
RThreshold = 1
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Timer1.Enabled = Not Timer1.Enabled
End Sub
Private Sub Form_Load()
MSComm1.PortOpen = True
End Sub
Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
Case comEvReceive ' 收到 RThreshold
Text2.Text = Text2.Text & MSComm1.Input & Chr(13) + Chr(10) '
End Select
End Sub
Private Sub Timer1_Timer()
Randomize (Now)
Text1.Text = Int(Rnd * 100)
MSComm1.Output = Text1.Text
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -