Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Display System Information

Posted on 2006-11-13
2
Medium Priority
?
201 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 150 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Simple Linear Regression
Starting up a Project

618 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