Results 1 to 5 of 5

Thread: Retrieving System Information

  1. #1

    Thread Starter
    Frenzied Member mxnmx's Avatar
    Join Date
    Dec 2001
    Location
    I'm back...now!!!
    Posts
    1,396

    Retrieving System Information

    Hi! All,
    I would like to retrive these things using VB, please help:
    ComputerName
    RAM
    HDD
    Processor
    And the Operating System that is running...

    Thanks!!!
    Can't Remember Birthdays or Important Dates- Never Miss any Important Date(s)

  2. #2
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    You can use the GetSystemInfo API to get some of the things you listed.
    This is an example how to use it:
    VB Code:
    1. Private Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)
    2. Private Type SYSTEM_INFO
    3.     dwOemID As Long
    4.     dwPageSize As Long
    5.     lpMinimumApplicationAddress As Long
    6.     lpMaximumApplicationAddress As Long
    7.     dwActiveProcessorMask As Long
    8.     dwNumberOrfProcessors As Long
    9.     dwProcessorType As Long
    10.     dwAllocationGranularity As Long
    11.     dwReserved As Long
    12. End Type
    13. Private Sub Form_Load()
    14.     Dim SInfo As SYSTEM_INFO
    15.     'KPD-Team 1998
    16.     'URL: [url]http://www.allapi.net/[/url]
    17.     'Set the graphical mode to persistent
    18.     Me.AutoRedraw = True
    19.     'Get the system information
    20.     GetSystemInfo SInfo
    21.     'Print it to the form
    22.     Me.Print "Number of procesor:" + str$(SInfo.dwNumberOrfProcessors)
    23.     Me.Print "Processor:" + str$(SInfo.dwProcessorType)
    24.     Me.Print "Low memory address:" + str$(SInfo.lpMinimumApplicationAddress)
    25.     Me.Print "High memory address:" + str$(SInfo.lpMaximumApplicationAddress)
    26. End Sub

    It has more potential.....

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    here is another way , very easy though

    open new project then add form ------choose Frmabout form then run your project , click System Info button then you're done!

    cheers

  4. #4
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    That's possible too. But it gives you wayyyyy to much information if all he needs are just the 5 things he mentioned.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    so nice job Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width