|
-
Feb 24th, 2008, 11:33 PM
#1
Thread Starter
PowerPoster
Stopping code?
Hey guys I have this code that I have no idea what it does, I think it gives me the information on avlaible and total physical and virtual memory.
VB Code:
While Not blnQuit
DoEvents
Dim memstat As MEMORYSTATUS
Call GlobalMemoryStatus(memstat)
Text30000000.Text = Format(memstat.dwAvailPhys) / 1024 / 1024 / 1024
Text50000000.Text = Format(memstat.dwAvailVirtual) / 1024 / 1024 / 1024
Text60000000.Text = Format(memstat.dwTotalPhys) / 1024 / 1024 / 1024
Text70000000.Text = Format(memstat.dwTotalVirtual) / 1024 / 1024 / 1024
Wend
The prob is it appears to be a tad cpu intnsive, is there a way to stop this code by pressing a button, so that the users have a choice to run it or not.
thanks!
-
Feb 25th, 2008, 12:08 AM
#2
Frenzied Member
Re: Stopping code?
Code:
While blnQuit = False
DoEvents
Dim memstat As MEMORYSTATUS
Call GlobalMemoryStatus(memstat)
Text30000000.Text = Format(memstat.dwAvailPhys) / 1024 / 1024 / 1024
Text50000000.Text = Format(memstat.dwAvailVirtual) / 1024 / 1024 / 1024
Text60000000.Text = Format(memstat.dwTotalPhys) / 1024 / 1024 / 1024
Text70000000.Text = Format(memstat.dwTotalVirtual) / 1024 / 1024 / 1024
Wend
In a command button's sub, insert this:
blnQuit = True
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|