📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "USB Thermostat"
ClientHeight = 4230
ClientLeft = 3090
ClientTop = 1995
ClientWidth = 6450
Icon = "form1.frx":0000
KeyPreview = -1 'True
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
OLEDropMode = 1 'Manual
ScaleHeight = 4230
ScaleWidth = 6450
Begin VB.CommandButton Command16
Caption = "Close"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 336
Left = 5130
TabIndex = 24
Top = 3750
Width = 1155
End
Begin VB.CommandButton Command15
Caption = "About"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 336
Left = 3660
TabIndex = 23
Top = 3750
Width = 1155
End
Begin VB.Frame Frame5
Caption = "Format"
ForeColor = &H00FF0000&
Height = 975
Left = 3570
TabIndex = 20
Top = 2640
Width = 1305
Begin VB.OptionButton Option5
Caption = "Fahrenheit"
Height = 240
Left = 120
TabIndex = 22
Top = 600
Width = 1065
End
Begin VB.OptionButton Option4
Caption = "Celsius"
Height = 300
Left = 120
TabIndex = 21
Top = 270
Width = 930
End
End
Begin VB.Frame Frame4
Caption = "LED2"
ForeColor = &H00FF0000&
Height = 1455
Left = 2190
TabIndex = 19
Top = 2640
Width = 1305
Begin VB.CommandButton Command18
Caption = "Put Out"
Height = 270
Left = 150
TabIndex = 28
Top = 720
Width = 1056
End
Begin VB.CommandButton Command17
Caption = "Lighteness"
Height = 270
Left = 150
TabIndex = 27
Top = 1110
Width = 1056
End
Begin VB.CommandButton Command19
Caption = "Light"
Height = 270
Left = 120
TabIndex = 29
Top = 300
Width = 1056
End
End
Begin VB.Frame Frame2
Caption = "USB"
ForeColor = &H00FF0000&
Height = 2040
Left = 5010
TabIndex = 14
Top = 396
Width = 1272
Begin VB.CommandButton Command14
Caption = "Read Dev"
Height = 336
Left = 120
TabIndex = 18
Top = 270
Width = 1056
End
Begin VB.CommandButton Command13
Caption = "Read Conf"
Height = 336
Left = 120
TabIndex = 17
Top = 710
Width = 1056
End
Begin VB.CommandButton Command12
Caption = "Read Stri"
Height = 336
Left = 120
TabIndex = 16
Top = 1590
Width = 1056
End
Begin VB.CommandButton Command11
Caption = "Read Inte"
Height = 336
Left = 120
TabIndex = 15
Top = 1150
Width = 1056
End
End
Begin VB.Frame Frame3
Caption = "CY7C63001"
ForeColor = &H00FF0000&
Height = 2040
Left = 3570
TabIndex = 9
Top = 396
Width = 1272
Begin VB.CommandButton Command10
Caption = "Read IO"
Height = 336
Left = 120
TabIndex = 13
Top = 1590
Width = 1056
End
Begin VB.CommandButton Command9
Caption = "Write RAM"
Height = 336
Left = 120
TabIndex = 12
Top = 1150
Width = 1056
End
Begin VB.CommandButton Command8
Caption = "Read RAM"
Height = 336
Left = 120
TabIndex = 11
Top = 710
Width = 1056
End
Begin VB.CommandButton Command4
Caption = "Read ROM"
Height = 336
Left = 120
TabIndex = 10
Top = 270
Width = 1056
End
End
Begin VB.Frame Frame1
Caption = "DS1620"
ForeColor = &H00FF0000&
Height = 2040
Left = 2160
TabIndex = 4
Top = 396
Width = 1272
Begin VB.CommandButton Command7
Caption = "Set THigh"
Height = 336
Left = 120
TabIndex = 8
Top = 1590
Width = 1056
End
Begin VB.CommandButton Command6
Caption = "Set TLow"
Height = 336
Left = 120
TabIndex = 7
Top = 1150
Width = 1056
End
Begin VB.CommandButton Command5
Caption = "Read TLow"
Height = 336
Left = 120
TabIndex = 6
Top = 270
Width = 1056
End
Begin VB.CommandButton Command3
Caption = "Read THigh"
Height = 336
Left = 120
TabIndex = 5
Top = 710
Width = 1056
End
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 500
Left = 1380
Top = 3300
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1000
Left = 90
Top = 3300
End
Begin VB.CommandButton Command2
Caption = "Close Setting"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 36
TabIndex = 2
Top = 3816
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "Open Setting"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 36
TabIndex = 1
Top = 3816
Width = 1815
End
Begin VB.Image Image4
Height = 360
Left = 1440
Picture = "form1.frx":0CFA
Top = 2370
Visible = 0 'False
Width = 360
End
Begin VB.Image Image3
Height = 360
Left = 1440
Picture = "form1.frx":0E5C
Top = 1860
Visible = 0 'False
Width = 360
End
Begin VB.Image Image2
Height = 435
Left = 1410
Top = 1080
Width = 435
End
Begin VB.Image Image1
Height = 435
Left = 1410
Top = 450
Width = 435
End
Begin VB.Label Label2
BackColor = &H8000000A&
Caption = "℃"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 285
Left = 90
TabIndex = 26
Top = 420
Width = 255
End
Begin VB.Label Label4
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "USB THERMOSTAT VER 2.05"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 660
Left = 5010
TabIndex = 25
Top = 2850
Width = 1350
End
Begin VB.Label Label3
Caption = " System Setting"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 345
Left = 3210
TabIndex = 3
Top = 120
Width = 2130
End
Begin VB.Line Line3
BorderColor = &H00FF0000&
BorderWidth = 3
X1 = 2010
X2 = 2010
Y1 = 3960
Y2 = 180
End
Begin VB.Label Label1
BackColor = &H8000000A&
Caption = "DigitalThermostat"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 0
TabIndex = 0
Top = 90
Width = 1935
End
Begin VB.Shape Shape6
BackStyle = 1 'Opaque
BorderColor = &H00E0E0E0&
FillColor = &H00E0E0E0&
FillStyle = 0 'Solid
Height = 1425
Left = 810
Top = 510
Width = 375
End
Begin VB.Shape Shape4
BackStyle = 1 'Opaque
BorderColor = &H000000FF&
FillColor = &H000000FF&
FillStyle = 0 'Solid
Height = 2745
Left = 810
Top = 510
Width = 375
End
Begin VB.Shape Shape1
BackColor = &H80000004&
BorderColor = &H00E0E0E0&
FillColor = &H00E0E0E0&
FillStyle = 0 'Solid
Height = 2805
Left = 780
Top = 450
Width = 435
End
Begin VB.Shape Shape3
BorderColor = &H000000FF&
FillColor = &H000000FF&
FillStyle = 0 'Solid
Height = 1035
Left = 720
Shape = 3 'Circle
Top = 2925
Width = 555
End
Begin VB.Shape Shape2
BorderColor = &H00E0E0E0&
FillColor = &H00E0E0E0&
FillStyle = 0 'Solid
Height = 915
Left = 690
Shape = 3 'Circle
Top = 2985
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Form1.Width = 6540
Command1.Visible = False
Command2.Visible = True
End Sub
Private Sub Command10_Click()
Dim myRequest As VENDOR_REQUEST_IN
Dim bResult As Boolean
Dim ReData(8) As Byte
Dim nBytes As Long
Dim HidDevice As Long
Dim DevicePathName As String
Dim IoAddress As String
IoAddress = InputBox(" Please Input CY7C63001's I/O Address: " + _
Chr(13) & Chr(10) + _
" (Range:0-1)", "CY7C63001 Setting", "1")
If (IoAddress = "") Then
Exit Sub
Else
If (Not IsNumeric(IoAddress) Or Val(IoAddress) < 0 Or Val(IoAddress) > 1) Then
MsgBox "CY7C63001's I/O Address:0 or 1", 16, "I/O Error"
Exit Sub
End If
End If
DevicePathName = "\\.\Cyusb-0"
If (OpenDevice(HidDevice, DevicePathName) = True) Then
myRequest.bRequest = &H4
myRequest.wValue = Val(IoAddress)
myRequest.wIndex = &H0
myRequest.wLength = &H8
myRequest.bData = &H0
myRequest.direction = &H1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -