Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/06/2003, 10:38
Avatar de Jorge_Mota
Jorge_Mota
 
Fecha de Ingreso: diciembre-2002
Ubicación: Chapinlandia :-D
Mensajes: 725
Antigüedad: 21 años, 5 meses
Puntos: 11
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Usuario = String(100, Chr$(0))
GetUserName Usuario, 100
Usuario= Left$(Usuario, InStr(Usuario, Chr$(0)) - 1)
MsgBox "Hola! " + Usuario

****** esto es para el nombre del pc
Private Const MAX_COMPUTERNAME_LENGTH As Long = 31
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
Dim dwLen As Long
Dim strString As String
'Create a buffer
dwLen = MAX_COMPUTERNAME_LENGTH + 1
strString = String(dwLen, "X")
'Get the computer name
GetComputerName strString, dwLen
'get only the actual data
strString = Left(strString, dwLen)
'Show the computer name
MsgBox strString
End Sub



para el usuario, luego te paso lo del domain

Por cierto, esto no iria en Programacion ?

que tiene que ver esto con bases de datos ?
__________________
Jorge Mota
Blog
Gubiz estafa