how i get computer name with vb 6?
any help will be appreciated
thanks :)
Naruse
22
Junior Poster in Training
Recommended Answers
Jump to PostPrivate Declare Function GetComputerName Lib "kernel32.dll" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long '------------------------------ 'it is also in the registry at 'HKLM \ System \ CurrentControlSet \ Control \ ComputerName \ ComputerName '--------------------------- 'Use the GetComputerName API Function . Private Sub Form_Load() Dim …
Jump to Postuse this following code :
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 GetCompName() Dim dwLen As Long Dim strString As String 'Create a buffer dwLen = MAX_COMPUTERNAME_LENGTH + …
All 5 Replies
cricket2030
4
Newbie Poster
Naruse
commented:
thx
+1
cometburn
2
Junior Poster
Naruse
commented:
:)
+1
Jx_Man
987
Nearly a Senior Poster
Featured Poster
Naruse
22
Junior Poster in Training
Jx_Man
987
Nearly a Senior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.