By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,224 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,224 IT Pros & Developers. It's quick & easy.

Custom Buttons

P: n/a
Hi All,
I have 3 images stored which are to imitate a button. One for Normal,
one for Depressed and another for Highlighted.

The 'Normal' button is placed on the form.
The Mousedown event changes the button to 'Depressed'
The MouseUp event changes the button to 'Normal'

How can I change the button to 'Highlighted when the mouse is over the
image? I could use the mouseOver event to change this but when I move the
mouse from being over the image, it is still highlighted!!!
Could anyone offer me any ideas on how to achieve this?
TIA

Mark
Mar 8 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Mark" <ma*********@ntlworld.com> wrote in message
news:qJ*******************@newsfe5-win.ntli.net...
Hi All,
I have 3 images stored which are to imitate a button. One for Normal,
one for Depressed and another for Highlighted.

The 'Normal' button is placed on the form.
The Mousedown event changes the button to 'Depressed'
The MouseUp event changes the button to 'Normal'

How can I change the button to 'Highlighted when the mouse is over the
image? I could use the mouseOver event to change this but when I move the
mouse from being over the image, it is still highlighted!!!


Just a hunch but have you tried undoing the highlighting in the form's
background mouse-over event?

Keith.
www.keithwilby.com
Mar 8 '06 #2

P: n/a
LOL how stupid do feel?

Thanks Keith,

Mark

"Keith Wilby" <he**@there.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
"Mark" <ma*********@ntlworld.com> wrote in message
news:qJ*******************@newsfe5-win.ntli.net...
Hi All,
I have 3 images stored which are to imitate a button. One for Normal,
one for Depressed and another for Highlighted.

The 'Normal' button is placed on the form.
The Mousedown event changes the button to 'Depressed'
The MouseUp event changes the button to 'Normal'

How can I change the button to 'Highlighted when the mouse is over the
image? I could use the mouseOver event to change this but when I move the
mouse from being over the image, it is still highlighted!!!


Just a hunch but have you tried undoing the highlighting in the form's
background mouse-over event?

Keith.
www.keithwilby.com

Mar 8 '06 #3

P: n/a
"Mark" <ma*********@ntlworld.com> wrote in message
news:lH*******************@newsfe4-win.ntli.net...
LOL how stupid do feel?

Thanks Keith,

Mark


We all have those days Mark, glad to help.

:-)
Mar 9 '06 #4

P: n/a
On Wed, 8 Mar 2006 14:10:21 -0000, "Keith Wilby" <he**@there.com>
wrote:
"Mark" <ma*********@ntlworld.com> wrote in message
news:qJ*******************@newsfe5-win.ntli.net...
Hi All,
I have 3 images stored which are to imitate a button. One for Normal,
one for Depressed and another for Highlighted.

The 'Normal' button is placed on the form.
The Mousedown event changes the button to 'Depressed'
The MouseUp event changes the button to 'Normal'

How can I change the button to 'Highlighted when the mouse is over the
image? I could use the mouseOver event to change this but when I move the
mouse from being over the image, it is still highlighted!!!


Just a hunch but have you tried undoing the highlighting in the form's
background mouse-over event?


Interesting comment Keith. I'm embarrassed to admit that I missed
this somehow. When you say, "undoing the highlighting in the form's
background mouse-over event", do you mean there is a global setting we
can make via VBA code? If so, please let me know what it is -- or
just elaborate a bit on how your suggestion can be implemented.

Thanks for sharing,

-- LW
Mar 10 '06 #5

P: n/a
Lauren,

I used the forms MouseMove event to set the image's source to normal.
This works perfectly on a small form where I am only trying to change the
one image. I have tried it on a larger form where I have several buttons I
am trying to change back to default but I have noticed something of a
flicker on the screen!!!

Hope this helps,

Mark

"Lauren Wilson" <no****@nospam.com> wrote in message
news:aq********************************@4ax.com...
On Wed, 8 Mar 2006 14:10:21 -0000, "Keith Wilby" <he**@there.com>
wrote:
"Mark" <ma*********@ntlworld.com> wrote in message
news:qJ*******************@newsfe5-win.ntli.net...
Hi All,
I have 3 images stored which are to imitate a button. One for Normal,
one for Depressed and another for Highlighted.

The 'Normal' button is placed on the form.
The Mousedown event changes the button to 'Depressed'
The MouseUp event changes the button to 'Normal'

How can I change the button to 'Highlighted when the mouse is over the
image? I could use the mouseOver event to change this but when I move
the
mouse from being over the image, it is still highlighted!!!


Just a hunch but have you tried undoing the highlighting in the form's
background mouse-over event?


Interesting comment Keith. I'm embarrassed to admit that I missed
this somehow. When you say, "undoing the highlighting in the form's
background mouse-over event", do you mean there is a global setting we
can make via VBA code? If so, please let me know what it is -- or
just elaborate a bit on how your suggestion can be implemented.

Thanks for sharing,

-- LW

Mar 15 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.