Solved

Faint VB5 Menu Bar in Win98

Posted on 1998-09-02
6
231 Views
Last Modified: 2010-04-30
I wrote a VB% program containing a menu bar running in Win95.  I upgraded to Win98 and now my menu bar is very faint and hard to read whenever the form in which it resides loses focus.  It switches back to normal dark print when the menu has focus.

Has anyone else experienced this very light grey printing in the menu bar when switching to Win98?  If so, is there a fix?

dougr
0
Comment
Question by:dougr
  • 3
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
clifABB earned 50 total points
ID: 1432718
This is a "feature" of Windows 98.  When an app doesn't have the focus, the menu items appear disabled.
0
 

Author Comment

by:dougr
ID: 1432719
To: clifABB

My application is set up to have an attractive, full screen Main form as background "wallpaper" with smaller active windows in the foreground.

This Main form is the one with the menu bar on it and at any time the operator can click on a menu item.  Thus I want the menu bar to APPEAR to be active at all times.

With Win95 this was no problem, but in Win98 the lighter color not only is hard to read, but gives the operator the mistaken impression that the menu is NOT enabled, whereas in fact it can be used just by clicking on it in the normal manner.

If this is a change in Win98, is there any work-around or devious way to bypass this feature?  (i.e. superimposing a transparent label over the menu bar to give the appearance of a menu??)

dougr
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1432720
I don't have Win98 installed here at work so I can't test this, however you may be able to modify the disabled menu color.
Also, you do have a good idea with the transparent label the only problem is you can't overlay the menu bar with a control.  This does give me an idea, though.  Create a "phoney" menu bar (with a picturebox and labels) and use the pop-up menu feature in VB.  That way you don't have to re-create your whole menu structure.
0
Technology Partners: 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!

 

Author Comment

by:dougr
ID: 1432721
To: clifABB

That was an extremely fast response to my comment!

The "phoney" menu with popups sounds like it would work, but the coding would be a real pain - to get the popups to align correctly and all the extra labels required (I have about 10 Main Menu categories).

If there is a way to change the menu colors in one fell swoop by code, it would be simplest and best.  However I would want the change to affect just my own VB5 application and not impinge on the color scheme for the user's entire system.

Perhaps it is just one of those things in Win98 we cannot change and must accept the "Wisdom of Gates"!

However if you don't mind, I will leave the question open for a day or two for additional comments before I award the points.

Thanks for your good response.

dougr
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1432722
No problem.

In case you decide to go with the phoney menu, it's not as difficult as you might think.  Here's a quick explaination on how it's done:
(When I refer to top level menus, I'm referring to items like the "File", "Edit", "View" on the VB menu.

Add a Picture box to your main form.
Add Label controls to the picture box, the caption of each being the same as the top level menu items.
Name the labels as a control array (in the example, I name them lblMenu(0) through lblMenu(9)).
Set the visible property = False for all the top level menu items.
Make sure all the top menu items are an control array (in the example, I name them mnuMenu(0) through mnuMenu(9)).

Add the following code to the labels' MouseDown event.
Private Sub lblMenu_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)

  If Button = vbLeftButton Then
    PopupMenu mnuMenu(Index), vbPopupMenuLeftAlign, lblMenu(Index).Left, lblMenu(Index).Height
  End If
End Sub

0
 

Author Comment

by:dougr
ID: 1432723
To: clifABB

Your answer sounds good.  Thanks for the code.  I have not had time to test it yet, but unless I get some other comment about a simpler fix, I will try the phoney menu method as you proposed.

This is not a big problem with my client yet as they are still running Win95.  However I can anticipate them screaming when they switch to Win98!

dougr
0

Featured Post

Independent Software Vendors: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

697 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