|
This event is occurs when a menu item is selected.
Syntax
| Private Sub object |
_ShowMenuHelp( |
ByVal mnuItem As CMenuItem, _
ByRef sHelpMessage As String) |
The ShowMenuHelp event syntax has these parts:
|
Part |
Description |
| object |
An object expression that evaluates to an object of VLMenuPlus type. |
| mnuItem |
A CMenuItem object corresponding to the menuitem that needs to be drawn. For
details refer to CMenuItem documentation. |
| sHelpMessage |
Help message string that will be displayed on the statusbar. If you want to
display a different message, specify a new value for this parameter. |
Remarks
Following code snippets shows the use of this event :
Sample 1
Private Sub VLMenuPlus1_ShowMenuHelp(ByVal mnuItem As CMenuItem, _
sHelpMessage As String)
Select case menuItem.Caption
Case "Account"
sHelpMessage = "Opens a new account"
End Select
End Sub
Sample 2
Private Sub VLMenuPlus1_ShowMenuHelp(ByVal mnuItem As CMenuItem, _
sHelpMessage As String)
lblStatus.Caption = sHelpMessage
End Sub
As you can see, even for a non-standard statusbar, you need just one line of
code to ensure appropriate help message display when a menu item is selected
|