Solved

Display System Information

Posted on 2006-11-13
2
197 Views
Last Modified: 2010-04-16
I am writing a small app so it will display certain information about my PC. What is the syntax. The sort of system information  would be like computername, ip address, physical memory, name of hard drive etc. I know there is a syntax out there but I have forgotten as never used it before
0
Comment
Question by:directred
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
Dimandja earned 50 total points
ID: 17930980
0
 
LVL 5

Expert Comment

by:sivachirravuri
ID: 17935772
'VB.NET Code
Dim result As String

'Retrieve the NetBIOS name.
result = System.Environment.MachineName

'Display the results to the console window.
Console.WriteLine("NetBIOS Name = {0}", result)

'Retrieve the DNS name.
result = System.Net.Dns.GetHostByName("LocalHost").HostName

'Display the results to the console window.
Console.WriteLine("DNS Name = {0}", result)


'Visual Basic - Display computer Name

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
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 262
Bot application - advice 3 79
Is online banking safe? 11 117
what Script langage can i run on Online Excel without having the installed version 3 78
This is an explanation of a simple data model to help parse a JSON feed
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question