Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: 95/98
Expertise: Beginner
Oct 1, 1996



Building the Right Environment to Support AI, Machine Learning and Deep Learning

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.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date