📄 modlogin.bas
字号:
Attribute VB_Name = "modLogin"
Public Function CheckDiff(TextBox1 As TextBox, TextBox2 As TextBox, ByVal AllowNull As Boolean) As Boolean
Select Case AllowNull
Case True
If TextBox1.text = TextBox2.text Then
CheckDiff = True
Else
CheckDiff = False
End If
Case False
If TextBox1.text = "" Or TextBox2.text = "" Then
Err.Raise 9394, , "Null String Entered! Please Enter Password!"
Exit Function
End If
If TextBox1.text = TextBox2.text Then
CheckDiff = True
Else
CheckDiff = False
End If
End Select
End Function
Public Sub SavePassword(ByVal appiname As String, ByVal Section As String, ByVal Key As String, ByVal Password As String)
Dim a2s As String
a2s = DE(appiname)
SaveSetting a2s, DE("Option"), DE("Password"), DE(DE(Password))
SaveSetting a2s, DE("Option"), DE("PasswordSaved"), PassSaved(True)
End Sub
Public Function LoadPassword(ByVal appiname As String, ByVal Section As String, ByVal Key As String) As String
Dim a2l As String
a2l = DE(appiname)
LoadPassword = DD(DD(GetSetting(a2l, DE("Option"), DE("Password"), "")))
End Function
Public Function PassSaved(Saved As Boolean) As Double
Select Case Saved
Case False
Randomize
PassSaved = Int(Rnd * 709394) * 17
Case True
Randomize
PassSaved = Int(Rnd * 709394) * 17 + (Int(Rnd * 16) + 1)
End Select
End Function
Public Function ReadPassSaved(ByVal appiname As String, ByVal Section As String, ByVal Key As String) As Boolean
Dim n As Double, r As Integer
n = GetSetting(DE(appiname), DE("Option"), DE("PasswordSaved"), PassSaved(False))
r = n Mod 17
Select Case r
Case 0
ReadPassSaved = False
Case 1 To 16
ReadPassSaved = True
End Select
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -