Click to See Complete Forum and Search --> : memoery


December 16th, 1999, 03:54 PM
how do i check how much memory is left in a computer?

Jean Spector
December 18th, 1999, 07:05 AM
What memory are you talking (writing) about?

If you mean Hard Disk then go to
'My Computer'
Right Click on the drive you want to ckeck
Choose Properties and there you are...

If you mean RAM, then I think that only NT has info on it's RAM. In Win 9x you can use MemTurbo wich not only shows but even frees up memory for you. You can download trial version from www.memturbo.com

Jean Spector
Tech Support Team Leader, CET
mage@lycosmail.com
(in VB from 11/1999)

Dr_Michael
December 18th, 1999, 07:09 AM
On Windows 2000 and Windows NT, right click on the task bar and select from the pop up menu: Task Manager. Then click on the Performance Tab where you can see graphically all the info you need!

Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece

Mikesc
December 18th, 1999, 11:38 AM
You can get the memory status through code with the GlobalMemoryStatus API. And don't forget to copy the MEMORYSTATUS type from the api viewer ;)

PanasonicSubz
December 19th, 1999, 11:35 AM
YOU GUYS ARE A BUNCH OF STUPIDASSES!!!!! he is talking about the code to get the (ram)random access memory from the computer. sorry i dont no the code for that, sorry

PanasonicSubz

Chris Eastwood
December 19th, 1999, 02:19 PM
You really do endear yourself to the rest of the VB community don't you ?

So what if these people have given different answers to the guys question ? You don't have to (try and) insult anyone on this group just because they bothered to answer in the first place. The forum exists because people need help, and other people try to help out - it's a two way thing where people on both sides learn from posting.

I've not had to ban anyone from this forum yet, so be a good little boy and apologise huh ?

As for the original question - you used to be able to use the 'GetMemoryInfo' (? or similar) API call under windows 3.1 but since the change to 32bit windows, this feature isn't as accurate anymore due to the virtual memory that windows uses all the time (ie. switching to disk). I'll dig out an old example if I can find one.


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Chris Eastwood
December 20th, 1999, 04:07 AM
Mike was on the correct track, here's some code I just tried out on NT4
(may work on Win98). Again though, you shouldn't believe everything that
you get back from this call (for instance, you can still run out of GDI
resources no matter what this api call returns):


Take a form (FORM1) with a command button (Command1) and paste in the
following code :


option Explicit
'
private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer as MEMORYSTATUS)
private 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 Command1_Click()
Dim ms as MEMORYSTATUS
'
ms.dwLength = len(ms)
'
Call GlobalMemoryStatus(ms)
'
With ms
Debug.print "memory load : " & .dwMemoryLoad
Debug.print "Total Phys : " & .dwTotalPhys
Debug.print "Avail Phys : " & .dwAvailPhys
Debug.print "Total Page File : " & .dwTotalPageFile
Debug.print "Avail Page File : " & .dwAvailPageFile
Debug.print "Total Virtual : " & .dwTotalVirtual
Debug.print "Avail Virtual : " & .dwAvailVirtual
End With
'
End Sub





Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Jean Spector
December 20th, 1999, 02:05 PM
Hi there! I've found an answer on some VB site, I just can't remember where. Because you're Anonymous, I can't send it to you. Send me email with your address and you'll have it.
P.S. If you're afraid of spammers you can create special address for this one. Keep in touch.

Jean Spector
Tech Support Team Leader, CET
mage@lycosmail.com
(in VB from 11/1999)