Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

change colors with mouse

Posted on 2002-05-04
4
Medium Priority
?
143 Views
Last Modified: 2010-05-02
Is there any way to change the color of an object (like a command button) when you pass the mouse icon over the object??
Thanks fou your help.
0
Comment
Question by:jags_77
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 200 total points
ID: 6989989
sure:

Private Sub Command1_MouseMove(button As Integer, shift As Integer, x As Single, y As Single)
   
    Command1.BackColor = &HFF0000

End Sub

'' make sure to set the button color back to whatever when you aren't in the button
Private Sub Form_MouseMove(button As Integer, shift As Integer, x As Single, y As Single)

    Command1.BackColor = &HC0C0C0

End Sub

just make sure you set the button's style to graphical
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6997930
why the 'b'?

didn't my solution work?
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6998102
Accepted comment is complete and to the point. Grade changed accordingly.

jags_77,

The Experts here are giving you their time and knowledge at no charge to you; the only reward they get is your thanks and the grade you give them along with your points.

Please consider the grading system like the "10-point Must" system in boxing; a response should be considered an A if it answers the question. If it requires you to do a little more research, or follow a couple of links, then you might drop it down to a B. You should always give the Experts the opportunity to give you a response that deserves an A.

For more on grading, please see http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3

Netminder
CS Moderator
0
 
LVL 2

Author Comment

by:jags_77
ID: 6999498

I´m sorry...it surely was a complete answer and I think I made a misclicking.....of course the comment of bobbit31 deserves the 'A'..thanks for giving him the grade his answer deserves...

Thanks again boobit31..please accept my apologize...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

877 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