Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
A code sample of how to access the computers memor...
Author:
John (JohnCo.)
E-mail:
Click to e-mail author
Website:
http://www.crosswinds.net/~kriscsc
Submitted:
8/10/2000
Version:
VB6
Compatibility:
VB6
Category:
Windows API
Views:
9224
A code sample of how to access the computers memory. Not very useful but i use it.
Declarations:
Public Declare Sub GlobalMemoryStatus Lib "kernel32" _ (lpBuffer As MemoryStatus) Public Type MemoryStatus dwLength As Long dwMemoryLoad As Long dwTotalPhys As Long dwAvailPhys As Long dwTotalPageFile As Long dwAvailPageFile As Long dwTotalVirtual As Long dwAvailVirtual As Long End Type Public memInfo As MemoryStatus
Code:
'Example of Physical Memory Private Sub Form1_Load Timer1.Enabled = True End Sub Private Sub Timer1_Timer Dim physical physical = memInfo.dwTotalPhys - memInfo.dwAvailPhys label1.caption = "Total Physical Memory: " &_ memInfo.dwTotalPhys label2.caption = "Physical Memory being used: " &_ physical label3.caption = "Percentage of usage: " &_ physical / memInfo.dwTotalPhys * 100 & "%" End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement