?? minissc.frm
字號:
TabIndex = 19
Top = 240
Value = 127
Width = 255
End
End
Begin VB.CommandButton cmdCenter1
Caption = "Center"
Height = 375
Left = 240
TabIndex = 4
Top = 2640
Width = 735
End
Begin VB.VScrollBar VScroll1
Height = 1695
Left = 480
Max = 254
TabIndex = 2
Top = 840
Value = 127
Width = 255
End
Begin VB.CommandButton cmdExit
Caption = "&Exit"
Height = 375
Left = 3840
TabIndex = 1
Top = 3360
Width = 1095
End
Begin VB.TextBox Text1
Alignment = 2 'Center
BackColor = &H00000000&
ForeColor = &H0000FF00&
Height = 285
Left = 360
Locked = -1 'True
TabIndex = 0
TabStop = 0 'False
Top = 120
Width = 495
End
Begin MSCommLib.MSComm MSComm1
Left = 360
Top = 3960
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
End
Begin VB.Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Servo #1"
Height = 2535
Left = 120
TabIndex = 3
Top = 600
Width = 975
End
Begin VB.Frame Frame9
Height = 2775
Left = 120
TabIndex = 33
Top = 360
Width = 8535
End
Begin VB.Frame Frame10
Height = 735
Left = 120
TabIndex = 34
Top = 3120
Width = 8535
Begin VB.PictureBox Picture2
BackColor = &H00808080&
Height = 135
Left = 5040
ScaleHeight = 75
ScaleWidth = 3195
TabIndex = 36
TabStop = 0 'False
Top = 240
Width = 3255
End
Begin VB.PictureBox Picture1
BackColor = &H00808080&
Height = 135
Left = 240
ScaleHeight = 75
ScaleWidth = 3195
TabIndex = 35
Top = 240
Width = 3255
End
End
Begin VB.Menu nmnSelcetPort
Caption = "Select ComPort"
Begin VB.Menu mnuCom19600
Caption = "Com1,9600,N,8,1"
End
Begin VB.Menu mnuCom29600
Caption = "Com2,9600,N,8,1"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
MSComm1.Settings = "9600,N,8,1"
MSComm1.CommPort = 2
MSComm1.PortOpen = True
End Sub
Private Sub cmdCenter1_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(0)
MSComm1.Output = Chr$(127)
Text1.Text = Str(127)
VScroll1.Value = Text1.Text
End Sub
Private Sub cmdCenter2_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(1)
MSComm1.Output = Chr$(127)
Text2.Text = Str(127)
VScroll2.Value = Text2.Text
End Sub
Private Sub cmdCenter3_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(2)
MSComm1.Output = Chr$(127)
Text3.Text = Str(127)
VScroll3.Value = Text3.Text
End Sub
Private Sub cmdCenter4_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(3)
MSComm1.Output = Chr$(127)
Text4.Text = Str(127)
VScroll4.Value = Text4.Text
End Sub
Private Sub cmdCenter5_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(4)
MSComm1.Output = Chr$(127)
Text5.Text = Str(127)
VScroll5.Value = Text5.Text
End Sub
Private Sub cmdCenter6_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(5)
MSComm1.Output = Chr$(127)
Text6.Text = Str(127)
VScroll6.Value = Text6.Text
End Sub
Private Sub cmdCenter7_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(6)
MSComm1.Output = Chr$(127)
Text7.Text = Str(127)
VScroll7.Value = Text7.Text
End Sub
Private Sub cmdCenter8_Click()
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(7)
MSComm1.Output = Chr$(127)
Text8.Text = Str(127)
VScroll8.Value = Text8.Text
End Sub
Private Sub mnuCom19600_Click()
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
MSComm1.Settings = "9600,N,8,1"
MSComm1.CommPort = 1
MSComm1.PortOpen = True
End Sub
Private Sub mnuCom29600_Click()
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
MSComm1.Settings = "9600,N,8,1"
MSComm1.CommPort = 2
MSComm1.PortOpen = True
End Sub
Private Sub VScroll1_Change()
Text1.Text = Str(VScroll1.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(0)
MSComm1.Output = Chr$(Text1.Text)
End Sub
Private Sub VScroll1_Scroll()
VScroll1_Change
End Sub
Private Sub VScroll2_Change()
Text2.Text = Str(VScroll2.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(1)
MSComm1.Output = Chr$(Text2.Text)
End Sub
Private Sub VScroll2_Scroll()
VScroll2_Change
End Sub
Private Sub VScroll3_Change()
Text3.Text = Str(VScroll3.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(2)
MSComm1.Output = Chr$(Text3.Text)
End Sub
Private Sub VScroll3_Scroll()
VScroll3_Change
End Sub
Private Sub VScroll4_Change()
Text4.Text = Str(VScroll4.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(3)
MSComm1.Output = Chr$(Text4.Text)
End Sub
Private Sub VScroll4_Scroll()
VScroll4_Change
End Sub
Private Sub VScroll5_Change()
Text5.Text = Str(VScroll5.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(4)
MSComm1.Output = Chr$(Text5.Text)
End Sub
Private Sub VScroll5_Scroll()
VScroll5_Change
End Sub
Private Sub VScroll6_Change()
Text6.Text = Str(VScroll6.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(5)
MSComm1.Output = Chr$(Text6.Text)
End Sub
Private Sub VScroll6_Scroll()
VScroll6_Change
End Sub
Private Sub VScroll7_Change()
Text7.Text = Str(VScroll7.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(6)
MSComm1.Output = Chr$(Text7.Text)
End Sub
Private Sub VScroll7_Scroll()
VScroll7_Change
End Sub
Private Sub VScroll8_Change()
Text8.Text = Str(VScroll8.Value)
MSComm1.Output = Chr$(255)
MSComm1.Output = Chr$(7)
MSComm1.Output = Chr$(Text8.Text)
End Sub
Private Sub VScroll8_Scroll()
VScroll8_Change
End Sub
Private Sub CmdExit_Click()
MSComm1.PortOpen = False
End
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -