📄 regkey.frm
字号:
Caption = "电话号码:"
Height = 375
Left = 240
TabIndex = 5
ToolTipText = "双击查找电话号码"
Top = 1800
Width = 1095
End
Begin VB.Label lblNM
Alignment = 1 'Right Justify
Caption = "用户名称:"
Height = 255
Left = 120
TabIndex = 4
ToolTipText = "双击查找用户名称"
Top = 1440
Width = 1215
End
Begin VB.Label lblAR
Alignment = 1 'Right Justify
Caption = "用户地址:"
Height = 255
Left = 360
TabIndex = 3
ToolTipText = "双击查找用户地址"
Top = 1080
Width = 975
End
Begin VB.Label lblPC
Alignment = 1 'Right Justify
Caption = "邮政编码:"
Height = 255
Left = 4680
TabIndex = 2
ToolTipText = "双击查找邮政编码"
Top = 720
Width = 975
End
End
Begin VB.CommandButton Command2
Caption = "打印(&P)"
Height = 375
Left = 3720
TabIndex = 0
Top = 4800
Width = 975
End
Begin VB.CommandButton Command1
Caption = "输出(&O)"
Height = 375
Left = 5160
TabIndex = 37
Top = 4800
Width = 855
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 375
Left = 6480
TabIndex = 38
Top = 4800
Width = 855
End
Begin VB.Label lblAppName
Caption = "Label1"
DataField = "程序名"
DataSource = "Data1"
Height = 255
Left = 600
TabIndex = 36
Top = 480
Visible = 0 'False
Width = 615
End
Begin VB.Label lblXLH
Alignment = 1 'Right Justify
Caption = "序列号:"
Height = 255
Left = 4920
TabIndex = 35
Top = 120
Width = 855
End
Begin VB.Label lblNumber
DataField = "序列号"
DataSource = "Data1"
Height = 255
Left = 5280
TabIndex = 17
Top = 120
Width = 1335
End
Begin VB.Label lblSerch
Caption = "查找:"
Height = 255
Left = 1440
TabIndex = 12
Top = 120
Width = 2535
End
Begin VB.Menu File
Caption = "文件(&F)"
Begin VB.Menu Print
Caption = "打印(&P)"
Shortcut = {F4}
End
Begin VB.Menu Exit
Caption = "退出(&Q)"
Shortcut = {F5}
End
End
Begin VB.Menu Set
Caption = "设置(&S)"
Begin VB.Menu Edit
Caption = "编辑名码信息库"
End
End
Begin VB.Menu About
Caption = "关于(&A)"
Begin VB.Menu Reginfo
Caption = "注册信息(&R)"
Shortcut = {F11}
End
Begin VB.Menu CopyRinfo
Caption = "版权信息(&C)"
Shortcut = {F12}
End
End
End
Attribute VB_Name = "RegKey"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub cmdOK_Click()
Frame1.Visible = False
End Sub
Private Sub Command1_Click()
Printer.EndDoc
End Sub
Private Sub Command2_Click()
Printer.Print " 序列号:"; lblNumber.Caption
Printer.Print " 用户号:"; txtName.Text; "-"; txtUserN.Text
Printer.Print " 注册号:"; lblRegNdisplay.Caption
Printer.Print " 注册日:"; lblDate.Caption
Printer.Print " 邮政编码:"; TxtPC.Text
Printer.Print " 地址:"; TxtAR.Text
Printer.Print " 名称:"; TxtNM.Text
Printer.Print " 电话:"; TxtTF.Text
Printer.Print " 传真:"; txtFax.Text
Printer.Print " 电子信箱:"; TxtEW.Text
Printer.Print " 网址:"; txtWeb.Text
Printer.Print " 备注:"; txtBZ.Text
Printer.Print " ____________________________________________________________"
Printer.Print " "
' Printer.EndDoc
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub CopyRinfo_Click()
frmAbout.Show vbModal
End Sub
Private Sub Data1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
lblSerch.Caption = "搜索序列号:"
DBCombo1.ListField = lblNumber.DataField
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
Data1.Caption = "序列号" & lblNumber.Caption
End Sub
Private Sub DBCombo1_Change()
Data1.Recordset.Bookmark = DBCombo1.SelectedItem
End Sub
Private Sub DBCombo1_Click(Area As Integer)
Data1.Recordset.Bookmark = DBCombo1.SelectedItem
End Sub
Private Sub DBCombo1_KeyUp(KeyCode As Integer, Shift As Integer)
Data1.Recordset.Bookmark = DBCombo1.SelectedItem
End Sub
Private Sub Edit_Click()
IfEdit = True
frmDL.Show vbModal, Me
End Sub
Private Sub Exit_Click()
Unload Me
End Sub
Private Sub Form_Load()
Frame1.Visible = False
Data1.DatabaseName = App.Path & "\RegKey.mdb"
frmDL.Show vbModal, Me
Data1.RecordSource = DLH
txtName.Text = InputAppname
txtAppN.Text = InputAppcode
RegKey1.AppName = InputAppname
RegKey1.AppCode = InputAppcode
lblSerch.Caption = "搜索序列号:"
DBCombo1.ListField = lblNumber.DataField
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set Form = Nothing
End Sub
Private Sub Label2_Click()
lblSerch.Caption = "搜索" & Label2.Caption
DBCombo1.ListField = lblDate.DataField
End Sub
Private Sub lblAR_Click()
lblSerch.Caption = "搜索" & lblAR.Caption
DBCombo1.ListField = TxtAR.DataField
End Sub
Private Sub lblBZ_Click()
lblSerch.Caption = "搜索" & lblBZ.Caption
DBCombo1.ListField = txtBZ.DataField
End Sub
Private Sub lblEW_Click()
lblSerch.Caption = "搜索" & lblEW.Caption
DBCombo1.ListField = TxtEW.DataField
End Sub
Private Sub lblFax_Click()
lblSerch.Caption = "搜索" & lblFax.Caption
DBCombo1.ListField = txtFax.DataField
End Sub
Private Sub lblmyweb_Click()
ShellExecute hwnd, "open", "http://danlihua.yeah.net", 0, 0, 0
End Sub
Private Sub lblNM_Click()
lblSerch.Caption = "搜索" & lblNM.Caption
DBCombo1.ListField = TxtNM.DataField
End Sub
Private Sub lblNumber_Change()
Data1.Caption = "序列号" & lblNumber.Caption
End Sub
Private Sub lblPC_Click()
lblSerch.Caption = "搜索" & lblPC.Caption
DBCombo1.ListField = TxtPC.DataField
End Sub
Private Sub lblRegN_Click()
lblSerch.Caption = "搜索" & lblRegN.Caption
DBCombo1.ListField = lblRegNdisplay.DataField
End Sub
Private Sub lblTF_Click()
lblSerch.Caption = "搜索" & lblTF.Caption
DBCombo1.ListField = TxtTF.DataField
End Sub
Private Sub lblUserN_Click()
lblSerch.Caption = "搜索" & lblUserN.Caption
DBCombo1.ListField = txtUserN.DataField
End Sub
Private Sub lblWeb_Click()
lblSerch.Caption = "搜索" & lblWeb.Caption
DBCombo1.ListField = txtWeb.DataField
End Sub
Private Sub lblXLH_Click()
lblSerch.Caption = "搜索序列号:"
DBCombo1.ListField = lblNumber.DataField
End Sub
Private Sub Print_Click()
Printer.EndDoc
End Sub
Private Sub Reginfo_Click()
Frame1.Visible = True
End Sub
Private Sub RegKey1_Finish()
lblRegNdisplay.Caption = RegKey1.RegCode
txtUserN.Text = RegKey1.UserCode
lblDate.Caption = Date
lblAppName.Caption = InputAppname
End Sub
Private Sub RegKey2_Finish()
End Sub
Private Sub txtAppN_Change()
Dim msgOK
If RegKey1.User = False Then
txtAppN.Text = CStr(RegKey1.AppCode)
Else
If Len(txtAppN.Text) = 9 Then
If txtAppN.Text = "" Or txtAppN.Text = " " Then txtAppN.Text = "0"
On Error GoTo errsub
RegKey1.AppCode = CLng(txtAppN.Text)
End If
End If
GoTo ed
errsub:
msgOK = MsgBox("检查输入错误!")
ed:
End Sub
Private Sub TxtEW_DblClick()
Dim Email As String
Email = "mailto:" & TxtEW.Text
ShellExecute hwnd, "open", Email, 0, 0, 0
End Sub
Private Sub txtName_Change()
RegKey1.AppName = txtName.Text
End Sub
Private Sub txtUserN_Change()
If Len(txtUserN.Text) = 23 Then
RegKey1.UserCode = txtUserN.Text
End If
End Sub
Private Sub txtWeb_DblClick()
Dim httpwww As String
httpwww = "http://" & txtWeb.Text
ShellExecute hwnd, "open", httpwww, 0, 0, 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -