Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleGet the computer's name
Keywordscomputer name, GetComputerName
CategoriesWindows, Tips and Tricks, API
 
Use the GetComputerName API function.
 
Private Sub Form_Load()
Dim computer_name As String
Dim length As Long

    computer_name = Space$(256)
    length = Len(computer_name)
    GetComputerName computer_name, length
    computer_name = Left$(computer_name, length)

    lblComputerName.Caption = "[" & computer_name & "]"
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated