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:
  1. While Not blnQuit
  2.        DoEvents
  3. Dim memstat As MEMORYSTATUS
  4. Call GlobalMemoryStatus(memstat)
  5.  
  6. Text30000000.Text = Format(memstat.dwAvailPhys) / 1024 / 1024 / 1024
  7. Text50000000.Text = Format(memstat.dwAvailVirtual) / 1024 / 1024 / 1024
  8. Text60000000.Text = Format(memstat.dwTotalPhys) / 1024 / 1024 / 1024
  9. Text70000000.Text = Format(memstat.dwTotalVirtual) / 1024 / 1024 / 1024
  10. 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!