Solved

change colors with mouse

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

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

Suggested Solutions

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…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

685 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