?? modunixinfo.bas
字號:
Attribute VB_Name = "modUnixInfo"
Public strIP As String 'UNIX主機IP地址
Public strUserName As String '登錄用戶名
Public strPassword As String '登錄密碼
'---------------------
Public Const InfoFile = "\sys.dat"
'===========| 獲取UNIX主機信息 |==========
Public Function GetUnixInfo() As Boolean
Dim lngF As Long
lngF = FreeFile
On Error GoTo GET_ERR
Open App.Path + InfoFile For Input Access Read As #lngF
Input #lngF, strIP
Input #lngF, strUserName
Input #lngF, strPassword
Close #lngF
GetUnixInfo = True
Exit Function
GET_ERR:
GetUnixInfo = False
End Function
'===========| 設置UNIX主機信息 |==========
Public Sub SetUnixInfo()
Dim lngF As Long
lngF = FreeFile
On Error GoTo SET_ERR
Open App.Path + InfoFile For Output Access Write As #lngF
Print #lngF, strIP
Print #lngF, strUserName
Print #lngF, strPassword
Close #lngF
Exit Sub
SET_ERR:
MsgBox "寫入UNIX信息文件錯!", 16
End Sub
'===========| UNIX主機信息變量初始化 |==========
Public Sub InitUnixInfo()
strIP = ""
strUserName = ""
strPassword = ""
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -