Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

change colors with mouse

Posted on 2002-05-04
4
Medium Priority
?
142 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
Suggested Courses

705 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