Private Declare Function GetComputerName Lib "kernel32"Alias "GetComputerNameA"(ByVal lpBuffer As String, nSize As Long)As LongPrivate Sub Command1_Click() Dim computername As String Dim lll As Long lll = 255 computername = Space(255) GetComputerName computername, lll MsgBox computername End Sub拉個按鈕 寫上上面的代碼 ok!買本API的書看看吧!相對其他的開發工具來說 API在VB裡的調用簡單多了!
Dim computername As String
Dim lll As Long
lll = 255
computername = Space(255)
GetComputerName computername, lll
MsgBox computername
End Sub拉個按鈕
寫上上面的代碼
ok!買本API的書看看吧!相對其他的開發工具來說
API在VB裡的調用簡單多了!