Solved

change colors with mouse

Posted on 2002-05-04
4
140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 50 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

751 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