Solved

Animated Buttons

Posted on 1998-12-07
5
163 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
ID: 1448673
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
ID: 1448674
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
ID: 1448675
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
ID: 1448676
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
ID: 1448677
Is the answer same as my??????
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 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

27 Experts available now in Live!

Get 1:1 Help Now