home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / rsgage21.zip / RESGAUGE.TXT < prev    next >
Text File  |  1994-01-27  |  8KB  |  150 lines

  1. ResGauge v2.1
  2. January 27, 1994
  3. Richard Franklin Albury
  4. Songdog Software
  5. 1124 Toppe Ridge Court
  6. Raleigh, NC 27615-6039
  7. CompuServe ID: 76477,534
  8. Internet: 76477,534@compuserve.com
  9. America Online: Developer
  10.  
  11.  
  12. What is ResGauge?
  13. -----------------
  14. ResGauge is a simple, nonintrusive little utility which monitors free system
  15. resources in Windows 3.1.  ResGauge can easily be configured to alert you when
  16. free system resources drop too low, permitting you to save your work before
  17. problems occur.  Best of all, ResGauge is free, relieving you of the annoyance
  18. of nag screens and the guilt of unregistered shareware.
  19.  
  20. What are free system resources anyway?
  21. --------------------------------------
  22. I'm glad you asked that.  The core of Windows is implemented in three distinct
  23. modules: the system kernel, the GDI (Graphics Device Interface) module, and
  24. the User (interface) module.  The GDI and User modules each have a local heap,
  25. an area of memory in which they allocate memory for their own use.  Since a
  26. local heap can't exceed 64 KB, each module is limited in the amount of memory
  27. it can allocate for its own use.  This gives rise to the notion of free system
  28. resources, usually expressed as the unallocated percentage of the GDI or User
  29. modules' local heap.  The number you see in the About Program Manager...
  30. dialog is the smaller of these two percentages, and this number will change as
  31. programs load and free menus, icons, and other interface resources.  Not
  32. surprisingly, Program Manager in Windows 3.0 was one of the worst offenders in
  33. exhausting free system resources: every time you opened a group window,
  34. Program Manager would load the program icons but it wouldn't free them when
  35. the window was subsequently closed.  This behavior has been fixed in Windows
  36. 3.1.
  37.  
  38. How does it work?
  39. -----------------
  40. ResGauge has been designed to work like Clock in Windows 3.1.  You can iconize
  41. the program and still get information, you can hide the title bar for a
  42. cleaner look, you can set the colors, etc.  Unlike Clock, however, you can run
  43. more than one copy of ResGauge.  For this reason, ResGauge doesn't save its
  44. window location.  Otherwise, each new copy you started would come up over any
  45. existing copies.
  46.  
  47. What's on the system menu?
  48. --------------------------
  49. o   "Always on top" allows you to keep ResGauge "floating" above other
  50.     windows, much like Clock does.  This is most useful when ResGauge is
  51.     iconized.
  52.  
  53. What's on the "Settings" menu?
  54. ------------------------------
  55. o   "Monitor System/GDI/User heap" allows you select which heap you want
  56.     ResGauge to monitor.  The "Monitor System" heap setting reports the smaller
  57.     of the two values reported for the GDI and User heaps.  This is also the
  58.     same number reported by Program Manager.
  59. o   "No Title" removes the menu bar and the title bar from the window.
  60.     Double-clicking on the window or pressing the Escape key allows you to
  61.     toggle between states (this behavior was slavishly copied from Clock).
  62.     With the title bar gone, mouse users can still size the window, and the
  63.     window can be moved by dragging the window contents.  Keyboard users,
  64.     however, will have to hit Escape to get the title bar back and use the
  65.     system menu to size or move the window.
  66. o   "Set alarm..." brings up a dialog for setting alarm options.  The
  67.     threshold value - the value at or below which the alarm goes off - can be
  68.     set as high as 99% or as low as 1%, but the default value of 10% seems a
  69.     good number.  ResGauge can be set to beep and/or flash when the alarm is
  70.     triggered, but if this annoys you, you can disable it at your own risk.
  71. o   "Set color..." brings up a dialog for setting the gauge color for the heap
  72.     you're currently monitoring.  If the default gauge colors - pure red for
  73.     System, pure green for GDI, and pure blue for User - don't appeal to you,
  74.     you can set them to whatever colors you like.
  75.  
  76. What's on the "Help" menu?
  77. --------------------------
  78. o   About... is the usual shameless blurb.
  79.  
  80. How (and why) do I run more than one copy of ResGauge?
  81. ------------------------------------------------------
  82. ResGauge will either read its configuration file when it starts or use default
  83. settings if the file doesn't exist.  This scheme obviously doesn't lend itself
  84. to running different configurations simultaneously, so version 1.3 of ResGauge
  85. added support for command line arguments.  Starting with version 2.0 of
  86. ResGauge, the command line support was simplified.  ResGauge monitors the
  87. system heap by default, and command line arguments of GDI and User can be used
  88. to have ResGauge monitor the GDI heap or the User heap respectively.  The case
  89. of the argument doesn't matter, but the spelling does, and an invalid argument
  90. will result in a warning, as will more than one argument.
  91.  
  92. How do I install ResGauge?
  93. --------------------------
  94. The installation procedure is extremely simple: copy the executable to a
  95. convenient location, create a program item - an icon, in English - for
  96. ResGauge in Program Manager (or whatever shell you use), and you're done.  In
  97. my case, I have two icons of ResGauge in my Startup group, one for the GDI
  98. heap and one for the User heap.  In most cases, however, a single icon in the
  99. Startup group is sufficient.
  100.  
  101. How do I get rid of it?
  102. -----------------------
  103. If you're really sure you don't like ResGauge - although I can't imagine why!
  104. :) - the "deinstallation" procedure is also extremely simple: delete the
  105. Program Manager icon, delete the ResGauge executable resgauge.exe, and delete
  106. the ResGauge initialization file resgauge.ini in your Windows directory.
  107.  
  108. Who helped you?
  109. -----------------------
  110. I wrote this program by myself.  Honestly!  I did have some helpful
  111. suggestions from the following folks, though:
  112. o   Anthony W. Rairden for the USER/GDI/Both options and the alarm threshold
  113.     idea
  114. o   Greg Saddler for the Always on top option
  115. o   Edward Bauman for the color configuration idea
  116. o   David Hoos for the no-float/flash fix, some coding suggestions, and the
  117.     correct spelling of "threshold"  :)
  118. o   Larry LaBella for displaying both USER and GDI data
  119. o   Charlie Wathen for putting the code back in to bring the window up when
  120.     the alarm goes off
  121. o   Juan M. Aguirregabiria and Julio Pons in the January 1994 "Windows/DOS
  122.     Developer's Journal" for their letter about how to drag a window by its
  123.     contents
  124.  
  125. Aren't you done yet?
  126. --------------------
  127. Almost.  I'd like to say in closing that if you have any comments, kudos,
  128. complaints, or suggestions, I'd like to hear them.  If you have any ideas for
  129. any other utilities you'd like to see, please let me know: I'd love to see
  130. them.
  131.  
  132. Version history
  133. ---------------
  134. 1.0     initial release
  135. 1.1     added configuration code, changed display
  136. 1.2     converted to medium model - still under 10 KB!
  137. 1.3     converted to Windows 3.1 STRICT compliance, added Windows-3.1
  138.         compliant "floating," made gauge configuration more informative, added
  139.         color configuration, removed the restriction to a single instance,
  140.         added command line support, and fixed the no-float/flash situation -
  141.         all this in less than 12 KB!
  142. 2.0     made ResGauge behave like Clock, made the dialogs less fancy and more
  143.         portable, and added version-checking code - all this in an additional
  144.         3 KB!
  145. 2.1     rewrote in C++ (no MFC, that's why it's so small!), cleaned up the
  146.         painting of the "gauge," stripped out unnecessary code, put code back
  147.         in to bring window to top when alarm goes off - now as small as version
  148.         1.3!
  149.  
  150.