Search Tools Links Login

Get Free Resources


Gets Free Resources WITHOUT using a class module or a third party DLL as someone used below...

Original Author: i

Returns

Free Resources

API Declarations

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

Code

Public Function SystemResources() As String
GDI$ = CStr(pBGetFreeSystemResources(1))
Sys$ = CStr(pBGetFreeSystemResources(0))
User$ = CStr(pBGetFreeSystemResources(2))
SystemResources$ = "GDI: " + GDI$ + "%"
SystemResources$ = SystemResources$ + vbCrLf + "System: " + Sys$ + "%"
SystemResources$ = SystemResources$ + vbCrLf + "User: " + User$ + "%"
End Function
'--------------------
'To use this code in a Message Box, use:
MsgBox SystemResources$, vbSystemModal, "System Resources"
'--------------------
'To use this code in a Text Box, use:
Text1 = SystemResources$
'Text1 being your Text Box name
'--------------------
'The SystemResources function was made to be placed in a module; if you would like it to be placed in your form... copy the declaration and function, paste it in your form coding, and change the Public to Private.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 96 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.