Réponse acceptée !
Salut:
Vb6:
Dim NomOrdinateur As String
NomOrdinateur = Environ("COMPUTERNAME")
VB.Net
NomOrdinateur = My.Computer.Name
Public Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
API:
Private Function NomOrdinateur() As String
Dim sComputerName As String
Dim iSize As Long
GetComputerName sComputerName, iSize
sComputerName = Space(iSize)
GetComputerName sComputerName, iSize
NomOrdinateur = sComputerName
End Function
Drikce 06
Si la réponse vous convient: Réponse acceptée. Si la réponse vous convient pas: 