bassystem.bas

来自「Control your PC with Mobile Phone-it con」· BAS 代码 · 共 18 行

BAS
18
字号
Attribute VB_Name = "basSystem"
Public Function LoggedInUser() As String
On Error GoTo ErrTrap
'To get logged on user
Dim strUserName As String
    'Create a buffer
    strUserName = String(100, Chr$(0))
    'Get the username
    GetUserName strUserName, 100
    'strip the rest of the buffer
    strUserName = Left$(strUserName, InStr(strUserName, Chr$(0)) - 1)
    LoggedInUser = strUserName
    Exit Function
ErrTrap:
    Exit Function
End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?