Managing Images in a Toolbar

Managing Images in a Toolbar

Question:
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.

Answer:
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:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of