|
|
|
|
|
Dicas
|
|
Visual Basic (Windows)
|
|
|
Título da Dica: Pegando o nome do computador
|
|
|
|
Postada em 1/9/2003 por Ð@®l@n
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Command1_Click() Dim strBuffer As String Dim lngBufSize As Long Dim lngStatus As Long lngBufSize = 255 strBuffer = String$(lngBufSize, " ") lngStatus = GetComputerName(strBuffer, lngBufSize) If lngStatus <> 0 Then MsgBox ("Computer Name Is: " & Left(strBuffer, lngBufSize)) End If End Sub
|
|
|
|
|