How to show system resource percentage used ?

What VB code obtains sytem resources either left or used, like the percentage shown in Control Panel/System/Resources?
Who is Participating?
watyConnect With a Mentor Commented:
' #VBIDEUtils#************************************************************
' * Programmer Name  : Waty Thierry
' * Web Site         :
' * E-Mail           :
' * Date             : 28/06/99
' * Time             : 12:41
' **********************************************************************
' * Comments         : Determine the system resources
' *
' *
' **********************************************************************

' Wondering how To determine the values that show up In the Resource Meter that comes With Windows 9x?  Or how To Get the value displayed In Explorer's Help, About dialog?  Use the Resource Meter's own dll's, that's how.  This is useful on 9x machines.  You can let the user specify a percentage.  Then check the system resources before you shell to another application.   If the resources dip below the value set by the user, issue a warning message

Declare Function pBGetFreeSystemResources Lib "rsrc32.dll" Alias "_MyGetFreeSystemResources32@4" (ByVal iResType As Integer) As Integer

Private Sub cmdGo_Click()

   Const SR = 0
   Const GDI = 1
   Const USR = 2

   lblUser = CStr(pBGetFreeSystemResources(USR))
   lblSystem = CStr(pBGetFreeSystemResources(SR))
   lblGDI = CStr(pBGetFreeSystemResources(GDI))

End Sub
Win 9x only:
"Obtaining Memory Statistics & System Resources"
hmmm... start a new project, click 'add form', select 'About Dialog'
in form1 - add a button.
on the button click event  - add :

frmAbout.Show 1

run the prog.
click the button.
click 'System Info'

does that info satisfies you ???
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.