codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Vb active x controls.  Archive Import (kiranmai) at 03:00 on Monday, May 19, 2003
 

On mouse click ,i would like to get the data for memory space used & free,individual drive memory space,operating system used etc details.how to write the code for this retrival?

  Re: Vb active x controls.  Shan at 09:26 on Saturday, October 11, 2003
 

by using win32 api 'GlobalMemoryStatus'

I hope the folowing code will give you some help


.....



Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As _
MemoryStatus)

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


Private Sub Form_MouseClick()
Dim ms As MemoryStatus

ms.dwLength = Len(ms)
GlobalMemoryStatus ms
MsgBox "Total physical memory: " & Format(ms.dwTotalPhys, _
"##,##0") & vbCr & "Available physical memory: " & _
Format(ms.dwAvailPhys, "##,##0") & vbCr & "Memory load: " & _
Format(ms.dwMemoryLoad, "##,##0"), vbInformation, _
"Free Memory"
End Sub











CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo
•  Cookies and Threads C++
•  right justify a background in a table?
•  Help with Loop (C++/MFC)
•  Help with Loop (C++/MFC)


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007