?
Solved

How to display menu help

Posted on 1998-09-24
6
Medium Priority
?
228 Views
Last Modified: 2010-04-30
VB provides only one menu event i.e. click. I want to show the menu description in the status bar when mouse is moved over a menu item.
Does anybody know how this can be done ?
Thanks
0
Comment
Question by:sgarg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:shogi
ID: 1436526
You just have to call WinHelp for API when you want.

It's very simple to use

Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long


And you call it like

RC = WinHelp (me.hwnd, "MyHelp.hlp", uCommand, dwData )

uCommand
Specifies the type of help requested. For a list of possible values and how they affect the value to place in the dwData parameter.

dwData
Specifies additional data. The value used depends on the value of the uCommand parameter.







0
 

Expert Comment

by:TT
ID: 1436527
Instead of calling API function, You can try the mousemove event

Private Sub Toolbar1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   
    Dim iCnt As Integer
    Dim iIdx As Integer
       
    For iCnt = 1 To 5 // 5 buttons on toolbar
        If X > Toolbar1.Buttons(iCnt).Left And _
           X < Toolbar1.Buttons(iCnt).Left + Toolbar1.Buttons(iCnt).Width And _
           Y > Toolbar1.Buttons(iCnt).Top And _
           Y < Toolbar1.Buttons(iCnt).Top + Toolbar1.Buttons(iCnt).Height Then
            StatusBar1.SimpleText = Toolbar2.Buttons(iCnt).ToolTipText
          Exit For
        End If
    Next
0
 

Expert Comment

by:TT
ID: 1436528
Instead of calling API function, You can try the mousemove event

Private Sub Toolbar1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   
    Dim iCnt As Integer
    Dim iIdx As Integer
       
    For iCnt = 1 To 5 // 5 buttons on toolbar
        If X > Toolbar1.Buttons(iCnt).Left And _
           X < Toolbar1.Buttons(iCnt).Left + Toolbar1.Buttons(iCnt).Width And _
           Y > Toolbar1.Buttons(iCnt).Top And _
           Y < Toolbar1.Buttons(iCnt).Top + Toolbar1.Buttons(iCnt).Height Then
            StatusBar1.SimpleText = Toolbar2.Buttons(iCnt).ToolTipText
          Exit For
        End If
    Next
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:clifABB
ID: 1436529
If you want to display a message in a statusbar when a menu item is highlighted (the way explorer does), you will have to use subclassing.  To save space (and typeing) Microsoft has an article explaining *exactly* how to accomplish what you want.

Checkout -
HOWTO: Display Descriptions of Menu Items When Highlighted
(Article ID: Q185451)
Located at -
http://support.microsoft.com/support/kb/articles/q185/4/51.asp

0
 

Author Comment

by:sgarg
ID: 1436530
I was looking for displaying the menu description in the status bar and MR clifABB has answered the question. How do I give credit to clifABB.

0
 
LVL 6

Accepted Solution

by:
clifABB earned 200 total points
ID: 1436531
You do this by grading this answer.  :)

Checkout -
HOWTO: Display Descriptions of Menu Items When Highlighted
(Article ID: Q185451)
Located at -
http://support.microsoft.com/support/kb/articles/q185/4/51.asp 

Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question