Vertical Menu (aka Outlook Bar)

Created by:
Robert L. Kubelka, MCSE
WinResources Computing, Inc.
140 Marine View Avenue, Suite 220
Solana Beach, CA  92075
Phone:	(619) 794-2902
FAX:	(619) 794-5336
Email:	rkubelka@winresources.com
Site:	www.winresources.com

This control was created as an exercise to duplicate the look and feel of the Outlook Bar in Microsoft's Outlook '97.  The Outlook Bar is basically a vertical menu.  We intend to use the control for a customer's EIS project to allow customers to view/print various statistical/financial reports easily both from a stand-alone EXE or over the company's Intranet using Active Server Pages and ADO technology.
The various menus will be for report category and the items on the menu itself will represent the actual report.  We have the control displayed at our web site (www.winresources.com) and go to HotVB.  Enclosed is a sample VB5 project containing the control.  Note that this must be run using VB5 because VB5CCE does not allow EXE's to be made and I can't send you an EXE made from the Release Candidate 1 beta because of NDA.  The sample gives a taste as to possible uses.  The first three menus have items that display articles from VB's KnowledgeBase.  The fourth menu runs programs from the Accessories program group (NT V4.0).  To install the VB5 sample project, just unzip 'VertMenu.zip' into a directory, load the project and run it.  To view the control in a browser, please go to our web site.  Note that our Web page also shows a MaskedEdit control we have developed.  This control has the usual types of masked fields.

The control uses 2 picture boxes, one for the surface of the control and one as a cache for the icons.  Also, 2 image controls are used for the up and down arrows.  The control paints itself and uses several API calls, primarily BitBlt and DrawEdge functions.  By using a minimum of controls and designing the control to paint itself, the size of the control is only 81K (pcode) – not bad for an ActiveX control for the Internet.  Note that clicking by on one of the menu bars, the menus "slide" just like the Outlook Bar.  The control can be configured at design-time using Property Pages or at run-time under code control. In using the control on an html page, the control is configured using named parameters in the html object.  The ActiveX Control Pad was not able to allow the icons to be assigned at design time; embedding the icons in the html page greatly confused IE 3.0 and produced GPF's.  Named parameters get around this problem and point to a URL .

Custom Properties:
MenusMax	The number of menus.	
MenuCur	The current menu being worked on (at design-time) or the current menu displayed (at run-time).	
MenuCaption	The caption of the current menu.	
MenuItemsMax	The number of items on the current menu.	
MenuItemCur	The current menu item being wroked on (at design-time or run-time).	
MenuItemIcon	The path\filename of the icon for the current MenuItem.	
MenuItemPictureURL	The URL of the icon.	
MenuItemCaption	The caption of the current MenuItem.	
MenuStartup	The menu number to display at startup.	

Note that the icons can be assigned to a menu item either by pointing to the icon using a path\icon.ico or using a URL for use in a browser.

Custom Event:
Sub MenuItemClick(Menu as Long, MenuItem as Long)
This event is fired when the user clicks on a MenuItem.  The Menu parameter corresponds to the current menu displayed and the MenuItem corresponds to the item clicked.

The structure of the control uses the following classes:
Menus	A collection of the menus.  This class also paints the control (except for the menu items, which paint themselves) because it "knows" about the state of the menu and because we want the painting to be done as fast as possible.	
VMenu	The menus.	
MenuItems	A collection of the MenuItems for each menu.	
MenuItem	The menu items.	
Arrow	The up/down arrows for each menu.