   Help for MenuEv

Properties	Events

Registration Information

Order Form

Getting Custom Controls Written

Description

MenuEv provides menu selection notification.  In other words, it tells you when the user has selected a menu item and when the user has exited the menu.  This is really useful for status bar-style help.  MenuEv is really easy to use.  All you need to do is place it on your form.  There's nothing set.  Events start coming in automatically.

File Name

MENUEV3.VBX

Object Type

MenuEvent

Remarks

When the Enabled property is set to True (default), MenuEv automatically starts sending menu event notification messages when the user selects menu items at run-time.

MenuEv should be placed on all forms where its functionality is required (including MDI forms and children).  MenuEv can be placed directly on an MDI form.

Usage Note     When using MDI, MenuEv must be placed on an MDI parent form.  Do not put it on MDI children.  If MenuEv is not put on the MDI parent, it will not send your program events.

Distribution Note     When you develop and distribute an application that uses MenuEv, you should install the file MENUEV3.VBX into the users Windows SYSTEM directory.  MenuEv has version information built into it.  So, during installation, you should ensure that you are not overwriting a newer version of MenuEv.


Properties

All of the properties that apply to this control are in this table.  Properties that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

Enabled

Left

Name

Tag

Top

Enabled is the default value for the control.


Events

All of the events that apply to this control are in this table.  Events that have special meaning for this control or that only apply to this control are marked with an asterisk (*).

*MenuEvent

*MenuExit


MenuEvent Event

See Also	Example

Description

Occurs when the user high-lights a menu item.

Syntax

Sub ctlname_MenuEvent (MenuText As String, Flags As Integer, Tag As String, HelpContextID As Long )

Remarks

This event only occurs If the Enabled property is set to True (default).  Also, this event only fires for the form that the control is on.  If there are multiple forms that need menu event monitoring, you must place MenuEv on each one.

The argument MenuText holds the string displayed on the menu bar.

The argument Flags holds the flags set by the menuing system.  They are defined in FLAGS.TXT, found in the SAMPLE.ZIP file.  Here are the values:

Flag	Description

MF_BITMAP	Item is a bitmap.

MF_CHECKED	Item is checked.

MF_DISABLED	Item is disabled.

MF_GRAYED	Item is grayed.

MF_MOUSESELECT	Item was selected with a mouse.

MF_OWNERDRAW	Item is an owner-drawn item.

MF_POPUP	Item contains a pop-up menu.

MF_SYSMENU	Item is contained in the System menu.

The argument Tag holds the Tag property of the menu item selected.  This menu property can be set either at run-time or design-time (in the properties window; use the combo-box to select the appropriate menu control and fill in the Tag property).

The argument HelpContextID holds the HelpContextID property of the menu item selected.  This menu property can be set in the menu definition window or in the properties window at design-time.


MenuEvent Event Example

In this example, the labels caption is set to the tag of any menu item selected. To try this example, paste the code into the Declarations section of a form that contains a label.  Clear the labels caption.  Add a few menu items and set the Tags to something meaningful. Then press F5 and play with the menu.

Sub MenuEv1_MenuEvent (MenuText As String, Flags As Integer, Tag As String, HelpContextID As Long)

   Label1.Caption = Tag

End Sub


See Also

Events:

MenuExit


MenuExit Event

See Also	Example

Description

Occurs when the user exits the menu.

Syntax

Sub ctlname_MenuExit ( )

Remarks

This event only occurs If the Enabled property is set to True (default).  Also, this event only fires for the form that the control is on.  If there are multiple forms that need menu event monitoring, you must place MenuEv on each one.

This event fires under the following circumstances:

·	the user pressed ESC

·	the user clicked outside the menu

·	the user has selected a menu item (which means a Click event for one of the menu controls will come soon, or has already occurred)


MenuExit Event Example

In this example, the labels caption is cleared when the user exits the menu.  To try this example, paste the code into the Declarations section of a form that contains a label.  Set the labels caption to Ready.  Add a menu item or two.  Then press F5, select one of the menu items, and then click on the form.

Sub MenuEv1_MenuExit ()

  Label1.Caption = ""

End Sub


See Also

Events:

MenuEvent


Registration Information

Credits

MenuEv was written by James Shields.  Inquiries can be sent to 71231,2066 on CompuServe, or mabry@halcyon.com on Internet.  If you must send something via U.S. Mail, the address is:

Mabry Software

Post Office Box 31926

Seattle, WA  98103-1926

Registration

You can register this program by sending $10 ($12 for international orders) and your address.  CompuServe members may register by sending $5 and their account number (the registered version will be E-mailed to you).  CompuServe members may also register this package by going to the SWREG forum.  MenuEv is registered there.  MenuEvs registration ID number is 1270.

For your convenience, an order form has been provided that you can print out directly from help.

Source Code and Registration

Source code (which includes a registered copy) to this control is available for $25 ($30 for international orders).  With source code you get a registered version of the control.  If you are a CompuServe member, you may get the source code in the Software Registration forum (GO SWREG) for $20.  It's registration number is 1271.

Credit Card Orders

You can order this program with Mastercard, Visa, American Express, or Discover from Public (software) Library by calling 800-2422-PsL or 713-524-6394 or by FAX to 713-524-6398 or by CompuServe E-mail to 71355,470.  You can also mail credit card orders to PsL at Post Office Box 35705; Houston, TX 77235-5705.  THESE NUMBERS ARE FOR CREDIT CARDS ONLY.

MenuEv's ID number for this service is 11098.  This is good for both the normal registered version, and the source code version.

Any questions about the status of the shipment of the order, refunds, registration options, product details, technical support, volume discounts, dealer pricing, site licenses, etc., must be directed to Mabry Software at 206-634-1443 or FAX at 206-632-0272.

To ensure that you get the latest version, PsL will notify us the day of your order and we will ship the product directly to you.

© Copyright 1993-1994 by James Shields


Order Form
 MenuEv Order Form

Use the Print Topic.. command from the File menu to print this order form.

Mail this	Mabry Software

form to:	Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com

Where did you get this copy of MenuEv?

____________________________________________________________________

Ship to:	____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

____________________________________________________________________

Phone:	_________________________________________________________________

Fax:	_________________________________________________________________

E-Mail:	_________________________________________________________________

Disk Size:	(circle one)	 3½	5¼

qty ordered	____	REGISTRATION

$10 each, postpaid (check or money order in hard currency).  Foreign addresses add $2.00 shipping.  No additional shipping charges to Canada or Mexico.

qty ordered	____	SOURCE CODE AND REGISTRATION

$25 each, postpaid (check or money order in hard currency).  Foreign addresses add $5.00 shipping.  No additional shipping charges to Canada or Mexico.


Getting Custom Controls Written

If you or your organization would like to have custom controls written, you can contact me at the following:

James Shields

Mabry Software

Post Office Box 31926

Seattle, WA  98103-1926

Phone: 206-634-1443

Fax: 206-632-0272

BBS: WinDev BBS 206-634-0783

CompuServe: 71231,2066

Internet: mabry@halcyon.com