📄 延时时间计算器.frm
字号:
VERSION 5.00
Begin VB.Form 延时时间计算器
Caption = "延时时间计算器"
ClientHeight = 4455
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 4455
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 2520
TabIndex = 15
Top = 3720
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 495
Left = 480
TabIndex = 14
Top = 3720
Width = 1695
End
Begin VB.TextBox Text5
Height = 495
Left = 1800
TabIndex = 12
Top = 3000
Width = 1095
End
Begin VB.TextBox Text4
Height = 495
Left = 1800
TabIndex = 9
Top = 2280
Width = 1095
End
Begin VB.TextBox Text3
Height = 495
Left = 1800
TabIndex = 7
Top = 1560
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
Left = 1800
TabIndex = 4
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 1800
TabIndex = 1
Top = 120
Width = 1095
End
Begin VB.Label Label9
Caption = "十六进制"
Height = 495
Left = 3240
TabIndex = 13
Top = 3120
Width = 735
End
Begin VB.Label Label8
Caption = "R2的值"
Height = 495
Left = 480
TabIndex = 11
Top = 3120
Width = 975
End
Begin VB.Label Label7
Caption = "十进制"
Height = 375
Left = 3240
TabIndex = 10
Top = 2400
Width = 735
End
Begin VB.Label Label6
Caption = "R2的值"
Height = 615
Left = 480
TabIndex = 8
Top = 2400
Width = 1215
End
Begin VB.Label Label5
Caption = "R3的值"
Height = 615
Left = 480
TabIndex = 6
Top = 1680
Width = 1095
End
Begin VB.Label Label4
Caption = "MS"
Height = 495
Left = 3240
TabIndex = 5
Top = 840
Width = 975
End
Begin VB.Label Label3
Caption = "延时时间"
Height = 495
Left = 360
TabIndex = 3
Top = 960
Width = 1095
End
Begin VB.Label Label2
Caption = "MHZ"
Height = 495
Left = 3240
TabIndex = 2
Top = 240
Width = 855
End
Begin VB.Label Label1
Caption = "晶振的频率"
Height = 255
Left = 360
TabIndex = 0
Top = 240
Width = 975
End
End
Attribute VB_Name = "延时时间计算器"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
M = Text1.Text
TIM = Text2.Text
R3 = Text3.Text
If R3 <= 0 Or R3 > 255 Then
MsgBox ("R3值不对!请确认")
End If
R2 = Round(TIM * 0.001 * M * 10 ^ 6) / ((2 + (2 * R3 + 1)) * 12)
If R2 <= 0 Or R2 > 256 Then
MsgBox ("R2的值不对!请确认")
End If
Text4.Text = Round(R2)
R4 = Round(R2, 0)
Text5.Text = Hex(R4)
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -