📄 dlgenter.frm
字号:
VERSION 5.00
Begin VB.Form DLGENTER
BorderStyle = 3 'Fixed Dialog
Caption = "Enter"
ClientHeight = 1350
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 3675
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1350
ScaleWidth = 3675
ShowInTaskbar = 0 'False
Begin VB.TextBox Text1
Height = 435
Left = 420
MaxLength = 2
TabIndex = 1
Top = 390
Width = 1245
End
Begin VB.CommandButton OnButtonEnter
Caption = "确定"
Height = 435
Left = 1920
TabIndex = 0
Top = 390
Width = 1215
End
End
Attribute VB_Name = "DLGENTER"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Addr As Long '写入地址
Public m_Ram As Long '0:内部RAM;1:外部Ram
Function mWriteData() As Boolean
Dim C(0) As Byte
Dim m_Data As String
m_Data = Trim(Text1.Text)
If (m_Data <> "") Then
C(0) = hextobcd(m_Data)
Else
C(0) = 0
Exit Function
End If
If (m_Ram = 0) Then '写IRAM
If (CH375DBG_WriteIRAM(Addr, C, 1) = False) Then
mWriteData = False '写失败
Exit Function
End If
ElseIf (m_Ram = 1) Then '写XRAM
If (CH375DBG_WriteXRAM(Addr, C, 1) = False) Then '写失败
mWriteData = False
Exit Function
End If
End If
mWriteData = True
End Function
Private Sub OnButtonEnter_Click() ''''m
If (mWriteData() = False) Then
If m_Ram = 0 Then
MsgBox "写IRam失败", vbOKCancel, "37XDBG"
ElseIf m_Ram = 1 Then
MsgBox "写XRam失败", vbOKCancel, "37XDBG"
End If
End If
Unload Me '关闭窗口
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -