Solved

Animated Buttons

Posted on 1998-12-07
5
162 Views
Last Modified: 2010-05-03
Can anyone out there suggest and easy way to do the following (eg and a vb control for doing it):
Make a button (or icon) that when you hold your mouse over it changes (eg "pops out") and when you click it changes on the when the mouse button goes down and changes again when the mouse button goes up. Its hard to do this with only one click event.
0
Comment
Question by:Jhunt
5 Comments
 
LVL 2

Expert Comment

by:JiaH
Comment Utility
How this is what you want. Set the command button's style to 1, and set the picture, dowpicture and disablepicture to the picture you want. You can change the picture and any time when you needed.
0
 
LVL 1

Author Comment

by:Jhunt
Comment Utility
This is not quite what I wanted. I do not want any button in the background. I wanted to use this for animation type program where you see a "Map" and then you move your mouse around and when you move over an object eg. a house it "pops up" and when you click on the down strock it "pops down" and then when the mouse is let up it goes back to normal before following through to the form associated with the house.
0
 
LVL 13

Expert Comment

by:Mirkwood
Comment Utility
Try the hot track sample at the Microsoft site.

http://premium.microsoft.com/vbasic/browse.asp

0
 

Accepted Solution

by:
TomKid2004 earned 100 total points
Comment Utility
To make this animated button, VB comes with several events including MouseUp, MouseDown, MouseOver and of course, Click.  It would also help to have an ImageList control for ease of use.  Then all you need to do is set the picture for the button every time one of the events is triggered like this:

Private Sub MouseOver
     Button.Picture = IL1.ListImages(1).Picture
End Sub

That should solve your problem.
0
 
LVL 2

Expert Comment

by:JiaH
Comment Utility
Is the answer same as my??????
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 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

10 Experts available now in Live!

Get 1:1 Help Now