Faint VB5 Menu Bar in Win98

Posted on 1998-09-02
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?

Question by:dougr
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
  • 3
  • 3

Accepted Solution

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.

Author Comment

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??)


Expert Comment

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.
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


Author Comment

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.


Expert Comment

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


Author Comment

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!


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

705 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