📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
BackColor = &H00C0C0C0&
Caption = "用软盘给程序加密"
ClientHeight = 2745
ClientLeft = 60
ClientTop = 345
ClientWidth = 5775
LinkTopic = "Form1"
ScaleHeight = 2745
ScaleWidth = 5775
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 570
Left = 3000
TabIndex = 2
Top = 1710
Width = 1410
End
Begin VB.CommandButton Command1
Caption = "进入"
Height = 570
Left = 1530
TabIndex = 1
Top = 1710
Width = 1410
End
Begin VB.TextBox Text1
Height = 285
Left = 1650
TabIndex = 0
Text = "Text1"
Top = 195
Visible = 0 'False
Width = 2970
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "请插入附带软盘!"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 825
Left = 105
TabIndex = 3
Top = 675
Width = 5580
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 GetVolumeInformation Lib "kernel32.dll" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Integer, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Private Sub Form_Load()
Label1.FontSize = 18
Label1.Alignment = 2
End Sub
Private Sub Command1_Click() '进入
Dim ral As Long
Dim mystr As String, mystr1 As String
mystr = String$(255, Chr$(0))
mystr1 = String$(255, Chr$(0))
ral = GetVolumeInformation("a:\", mystr, Len(mystr), lSerialNum, 0, 0, mystr1, Len(mystr1))
Text1.Text = CStr(lSerialNum)
If Text1 = 0 Then
MsgBox ("请插入附带盘!")
Else
If Text1 <> "1043077335" Then ' "1043077335" 为加密磁盘序列号
MsgBox ("磁盘错误,请插入整确磁盘!!")
Else
If i = "1043077335" Then
Label1.Caption = "通过密码检测,可以成功登录!!"
End If
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -