home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / tool20 / readme.txt < prev    next >
Text File  |  1993-04-08  |  9KB  |  209 lines

  1. README.TXT for ToolButton 2.0
  2. December 2, 1992
  3.  
  4. ********************************************************************************
  5. * WARNING *
  6. *
  7. * Users of ToolButton 1.0 or 1.1 must follow these steps to use Version 2.0:
  8. *
  9. *    . Load your project(s) into VB 2.0
  10. *    . Save all forms with ContextHelp controls as Text
  11. *    . Save the project
  12. *    . Quit VB
  13. *    . Manually edit your .MAK file(s) to change the name of the custom
  14. *      control from TOOLBUTT.VBX to TOOLBUTN.VBX
  15. *
  16. * The ContextHelp control had an unavoidable change which is not binary
  17. * compatible with the previous version.  If you do not save your forms
  18. * with ContextHelp controls as Text, you will get an "Invalid file format"
  19. * message when you attempt to load the project.
  20. *
  21. * ToolButton 2.0 is *NOT* compatible with VB 1.0.
  22. *
  23. * WARNING *
  24. ********************************************************************************
  25.  
  26. ----------------------------------------------------------------
  27. What is ToolButton?
  28. ----------------------------------------------------------------
  29. ToolButton is a custom control for Visual Basic that supports
  30. command and attribute buttons in toolbars.  You can use the
  31. standard button images supplied, and/or you can "roll your own".  A
  32. second custom control, ContextHelp, is bundled with ToolButton to
  33. facilitate implementation of "point and click" style
  34. context-sensitive help. 
  35.  
  36. Standard button images are supplied for Edit Cut, Edit Copy, Edit
  37. Paste, File New, File Open, File Save, File Print, Help, and
  38. Context Sensitive Help. 
  39.  
  40. ToolButton can generate six different button faces from one
  41. supplied bitmap.  A command button uses three (Up, Mouse Down, and
  42. Disabled), while an attribute button uses six (former plus Down,
  43. Down Disabled, and Indeterminate).  All you have to do is supply
  44. the "Up" bitmap, and ToolButton takes care of the rest. 
  45.  
  46. Another nifty feature of ToolButton is the fact that it generates
  47. MouseDown and MouseUp events, so you can put a help message in a
  48. status bar when the user presses a button.  These events are
  49. generated even when the button is disabled. 
  50.  
  51. Microsoft Word for Windows 2.0 was used as a model for the behavior
  52. of ToolButton and ContextHelp.  Command buttons behave like Word
  53. toolbar buttons, attribute buttons behave like Word ribbon buttons,
  54. and context-sensitive help behaves in a similar fashion to Shift+F1
  55. in Word. 
  56.  
  57. ToolButton uses the "Buttons & Cursors" (v1.01) code from
  58. Microsoft.  This code is currently downloadable as BTNCR2.ZIP from
  59. the WINSDK forum.  I do not use the DLL version of this code
  60. because source changes were required to make it compatible with
  61. Windows 3.0. 
  62.  
  63. As mentioned above, ToolButton is compatible with Windows 3.0.
  64. However, the Help Reference requires WinHelp 3.1.
  65.  
  66. ToolButton is Freeware.  You can freely distribute it with your
  67. applications.  However, if you distribute source for your
  68. applications, please include an unmodified TOOLBT.ZIP and/or its
  69. component files.
  70.  
  71. ----------------------------------------------------------------
  72. ToolButton Demo
  73. ----------------------------------------------------------------
  74. If you would like to see a demonstration of some of ToolButton's
  75. capabilities, load the TOOLDEMO project into Visual Basic.  See
  76. "ToolButton Help Reference" below for instructions on how to view
  77. the Help Reference. 
  78.  
  79. TOOLDEMO is a just a dumb Notepad clone.  However, it does
  80. demonstrate most of the cool features of ToolButton.  Among the
  81. supported features it does *not* demonstrate are: 
  82.  
  83.     . Non-standard sized buttons
  84.     . Indeterminate attribute button state
  85.     . Colorful buttons
  86.  
  87. ----------------------------------------------------------------
  88. ToolButton Help Reference
  89. ----------------------------------------------------------------
  90. A complete help reference is provided for ToolButton.  You can
  91. access it by double-clicking with the right mouse button on a
  92. ToolButton or ContextHelp control in design mode, by pressing the
  93. help button in TOOLDEMO, or by starting WinHelp manually. 
  94.  
  95. For all standard VB properties, events, and methods, ToolButton
  96. help is linked to the standard VB help file.  For this to work,
  97. VB.HLP has to be somewhere on your PATH. 
  98.  
  99. ----------------------------------------------------------------
  100. Tips
  101. ----------------------------------------------------------------
  102. The ContextHelp control passes the HelpContextID of the control
  103. which the user wants help on.  However, if that control doesn't
  104. have a HelpContextID property, or its HelpContextID is 0,
  105. ContextHelp attempts to use its container, then its container's
  106. container, etc.  This is similar to the logic used by VB when you
  107. press F1 in your application.  You can use this to your advantage
  108. if you have a group of controls which all use the same section of
  109. the help file.  For example, if you have a frame containing a bunch
  110. of option buttons, you can assign the HelpContextID of the frame,
  111. and leave the HelpContextID of the option buttons empty.  If the
  112. user clicks the frame itself or any of the option buttons, the
  113. result will be the same. 
  114.  
  115. If you want to display a help message in a status bar for each
  116. ToolButton, put the message in the HintMessage property at design
  117. time.  Print the help message in the MouseDown event, and clear it
  118. in the MouseUp event.  If you have to worry about multiple
  119. languages, load the message at runtime. 
  120.  
  121. Use a control array for all the ToolButtons on a particular toolbar.
  122. This will save you a lot of code.  Toolbar buttons are supposed to
  123. just be shortcuts for menu items, so you can put a Select Case on
  124. the index in the Click event, and call the appropriate menu click
  125. subroutine.
  126.  
  127. Look at the source code for TOOLDEMO.  Some tricks are there which
  128. I haven't described above, like sizing and positioning all the
  129. controls based on the display device and the Visual Design Guide;
  130. and interfacing with WinHelp. 
  131.  
  132. ----------------------------------------------------------------
  133. Known problems and limitations
  134. ----------------------------------------------------------------
  135. No MouseDown or MouseUp events are generated for the middle or
  136. right mouse buttons.  This is because I didn't want Click to be
  137. generated for these buttons.  I may fix this later by adding a
  138. parameter to the Click and DblClick functions which lets you know
  139. which button was pressed (the standard event functions don't tell
  140. you this). 
  141.  
  142. A few of the links from ToolButton help to VB help aren't quite
  143. right.  For example, if you click on Index, you don't get the Index
  144. reference page in VB help.  The reason for this is that I am using
  145. a simple JumpKeyword macro, and it just goes to the first topic
  146. containing that keyword (in this case, ListIndex). 
  147.  
  148. ----------------------------------------------------------------
  149. Version History
  150. ----------------------------------------------------------------
  151.  
  152. 2.0:
  153.     . Takes advantage of new VB 2.0 features
  154.     . New HelpContextID property for both controls
  155.     . ToolButton is now a "graphical" control, to reduce resource
  156.       consumption
  157.     . ToolButton has new HintMessage property
  158.     . ToolButton converts button colors to user preference, based
  159.       on Control Panel settings (see Preserve property)
  160.     . Contexthelp permits Esc to cancel
  161.     . HelpContextID passed instead of Tag in ControlClick event
  162.     . ContextHelp now has Index property
  163.     . ContextHelp now ignores keystrokes other than Esc, F1
  164.     . Bug fix: if multiple applications used Version 1.1 at the
  165.       same time, exiting one of them would cause the button faces
  166.       on the rest to become blank
  167.  
  168. 1.1:
  169.     . ContextHelp custom control added
  170.     . Compatible with Windows 3.0
  171.     . Sample bitmap for custom buttons supplied
  172.     . MouseDown/MouseUp generated for disabled buttons
  173.     . Access help reference with double-click of right mouse
  174.       button instead of single click
  175.     . (About) property 
  176.     . Over 900 downloads from CompuServe MSBASIC forum
  177.  
  178. 1.0:
  179.     . First version
  180.     . Over 800 downloads from CompuServe MSBASIC forum
  181.  
  182. ----------------------------------------------------------------
  183. Credits
  184. ----------------------------------------------------------------
  185. ToolButton was created by:
  186.  
  187.     Brett Foster [CompuServe: 70444,135]
  188.     Fulcrum Technologies, Inc.
  189.  
  190. Please send comments and questions via Section 6 (VB/Win 3rd Party)
  191. of the CompuServe MSBASIC forum (preferred), or CompuServe mail. 
  192.  
  193. All feedback is GREATLY appreciated!
  194.  
  195. ----------------------------------------------------------------
  196. Supplied Files
  197. ----------------------------------------------------------------
  198. TOOLBT.ZIP contains the following files:
  199.  
  200. . ATTRIBS.BMP    - Sample bitmap of custom button faces used in TOOLDEMO
  201. . README.TXT    - This file
  202. . TOOLBUTN.HLP    - Help reference for ToolButton
  203. . TOOLBUTN.VBX    - The ToolButton custom controls
  204. . TOOLCONS.TXT    - Global constants
  205. . TOOLDEMO.BAS    - BAS file for TOOLDEMO
  206. . TOOLDEMO.FRM    - ASCII Form file for TOOLDEMO
  207. . TOOLDEMO.FRX    - Binary form info for TOOLDEMO
  208. . TOOLDEMO.MAK    - VB project file for TOOLDEMO
  209.