Managing Images in a Toolbar

I’ve created a toolbar for an MDI app using a top-aligned panel and a number of image controls. When the user clicks on an “up” image, the image picture is replaced by a “down” picture. I then have code in the image Mouse_Move event so that if the mouse is dragged (button is down) off the image, the “down” picture is replaced by the “up” picture. Trouble is, if the user is dragging from the MDI area and passes over the image, the “down” image is shown (non-standard Windows behavior) and is then left in place when the user drags away from the image. The ugly result is a toolbar button that appears stuck in the down position.

What about setting a flag in the Mouse_Down event that would stay set until the MouseUp event happens? That way, in the MouseMove event you could see if the user had actually pressed the button or was just passing over it.

You might also want to try using one of the many shareware/freeware controls to do toolbars. It’s much easier than doing it manually.In VB4.0 there is a control included for Toolbars as well as one for Statusbars.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS