Solved

change colors with mouse

Posted on 2002-05-04
4
136 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 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…

760 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

23 Experts available now in Live!

Get 1:1 Help Now