📄 ini.bas
字号:
Attribute VB_Name = "ini"
Sub main()
server = GetKey(App.Path + "\setup.ini", "server")
UserName = GetKey(App.Path + "\setup.ini", "username")
Password = GetKey(App.Path + "\setup.ini", "password")
If server = "" Then
frmmanageuse.lblusermanage.Enabled = False
frmmanageuse.lbldatabaseset.Enabled = False
frmmanageuse.lbldatabasemanage.Enabled = False
End If
frmWait.Show
End Sub
Function FileExist(fname As String) As Boolean
On Local Error Resume Next
FileExist = (Dir(fname) <> "")
End Function
Public Function GetKey(Tmp_file As String, Tmp_key As String) As String
Dim File As Long
File = FreeFile
If FileExist(Tmp_file) = False Then
GetKey = ""
Call WritePrivateProfileString("setup information", "server", "", App.Path + "\setup.ini")
Call WritePrivateProfileString("setup information", "username", "", App.Path + "\setup.ini")
Call WritePrivateProfileString("setup information", "password", "", App.Path + "\setup.ini")
Exit Function
End If
Open Tmp_file For Input As File
Do While Not EOF(1)
Line Input #File, buffer
If Left(buffer, Len(Tmp_key)) = Tmp_key Then
pos = InStr(buffer, "=")
GetKey = Trim(Mid(buffer, pos + 1))
End If
Loop
Close File
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -