?? easyd12.frm
字號:
VERSION 5.00
Begin VB.Form FrmEasyD12
Caption = "D12 Smart 板 VB6.0 演示程序"
ClientHeight = 2055
ClientLeft = 60
ClientTop = 345
ClientWidth = 5310
Icon = "EasyD12.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2055
ScaleWidth = 5310
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton ComExit
Caption = "退出"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2760
TabIndex = 4
Top = 1440
Width = 1215
End
Begin VB.Frame Frame1
Caption = "發送10個字節,然后收取10個字節"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1815
Left = 120
TabIndex = 0
Top = 120
Width = 5055
Begin VB.CommandButton ComWrite
Caption = "發送"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 350
Left = 600
TabIndex = 5
Top = 1320
Width = 1215
End
Begin VB.TextBox TIncept
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 1920
MultiLine = -1 'True
TabIndex = 3
Top = 840
Width = 2775
End
Begin VB.Label Label4
Caption = "接收數據"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 240
TabIndex = 2
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "發送數據(16進制): 00 01 02 03 04 05 06 07 08 09"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 240
TabIndex = 1
Top = 360
Width = 4455
End
End
End
Attribute VB_Name = "FrmEasyD12"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' /*
' *****************************************************************************
' *
' * Copyright(c) 2002, 周立功單片機發展有限公司
' * All rights reserved.
' *
' * 文 件: FrmEasyD12
' *
' * 摘 要: 本程序主要是通過調用EasyUSB.dll動態連接庫函數
' *
' *
' * 創建日期: 2002年11月01日
' *
' ******************************************************************************
' */
Private Sub ComExit_Click()
Unload Me '退出
End Sub
Private Sub ComWrite_Click()
Dim st As Integer
Dim i As Integer
Dim Disp As String '字符串
Dim SendBuf(10) As Byte '發送緩沖區
Dim RecBuf(10) As Byte '接收緩沖區
For i = 0 To 9
SendBuf(i) = i
Next i
For i = 0 To 9
RecBuf(i) = 0
Next i
st = WriteData(3, SendBuf(0), 10, 1000) '發送數據
If st <> 10 Then
MsgBox "發送數據錯誤,請重新操作!", vbInformation, "提示"
Exit Sub
End If
st = ReadData(2, RecBuf(0), 10, 1000) '從端口2接收返回的數據
If st <> 10 Then
MsgBox "發送數據錯誤,請重新操作!", vbInformation, "提示"
Exit Sub
End If
'顯示接收到的數據
For i = 0 To 9
Disp = Disp + IIf(Len(Hex(RecBuf(i))) = 2, Hex(RecBuf(i)), "0" + Hex(RecBuf(i))) + " "
Next i
TIncept = Disp
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -