Solved

Faint VB5 Menu Bar in Win98

Posted on 1998-09-02
6
227 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:dougr
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now