📄 registry.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "简单用户注册程序"
ClientHeight = 1545
ClientLeft = 60
ClientTop = 345
ClientWidth = 4815
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 1545
ScaleWidth = 4815
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "取消"
Height = 375
Left = 3720
TabIndex = 5
Top = 1080
Width = 975
End
Begin VB.CommandButton Command3
Caption = "应用"
Enabled = 0 'False
Height = 375
Left = 2520
TabIndex = 4
Top = 1080
Width = 975
End
Begin VB.CommandButton Command2
Caption = "更改"
Height = 375
Left = 1320
TabIndex = 3
Top = 1080
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
Height = 375
Left = 120
TabIndex = 0
Top = 1080
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 120
TabIndex = 1
Top = 480
Width = 4575
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "Label2"
Height = 255
Left = 120
TabIndex = 6
Top = 540
Width = 4575
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "本程序使用权属于"
Height = 255
Left = 120
TabIndex = 2
Top = 120
Width = 4575
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetProfileString Lib "kernel32" Alias "GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long
Private Declare Function WriteProfileString Lib "kernel32" Alias "WriteProfileStringA" (ByVal lpszSection As String, ByVal lpszKeyName As String, ByVal lpszString As String) As Long
Private user As String * 16000
Dim bz As Integer
Private Sub command1_click()
If bz = 1 Then
Call WriteProfileString("Bqxx", "user", Text1.Text)
End
Else
End
End If
End Sub
Private Sub Command2_Click()
bz = 1
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Label2.Visible = False
Text1.Text = ""
Text1.Visible = True
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Command3.Enabled = False
If bz = 1 Then
Call WriteProfileString("Bqxx", "user", Text1.Text)
End If
End Sub
Private Sub Command4_Click()
Unload Form1
End
End Sub
Private Sub Form_Load()
Call GetProfileString("Bqxx", "user", Space(10), user, 16000) '16000是在'win.ini里"[Bqxx]"下"user="后的文字'在程序里所能显示的上限16000个字节
If user = String(16000, 0) Then
Command1.Enabled = False
Label2.Visible = False
Text1.Text = ""
Text1.Visible = True
bz = 1
Else
Command1.Enabled = True
Label2.Visible = True
Label2.Caption = user
Text1.Visible = False
bz = 0
End If
End Sub
Private Sub text1_change()
If LTrim(RTrim(Text1.Text)) <> "" Then
Command1.Enabled = True
Command3.Enabled = True
Else
Command1.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -