From: Bob Butler on

"Phil Hunt" <aaa(a)aaa.com> wrote in message
news:%23UIv%23IzqKHA.3536(a)TK2MSFTNGP06.phx.gbl...
> Duke,
> Thanks. Simple and very effective. Personally I like the visual better
> than the lame button click.
> FYI, I use
> img.BorderStyle = img.BorderStyle Xor 0
> on both up and down event, for the most deiscerning eye.

IIRC, the sequence for double-click is
down,up,click,down,doubleclick

that would leave your button showing the wrong state; also, if anything else
prevents the mouseup from firing then your button would show wrong.

From: Mike Williams on
"Phil Hunt" <aaa(a)aaa.com> wrote in message
news:%23UIv%23IzqKHA.3536(a)TK2MSFTNGP06.phx.gbl...

> Personally I like the visual better than the lame button click. FYI, I use
> img.BorderStyle = img.BorderStyle Xor 0
> on both up and down event, for the most
> deiscerning eye.

Img.BorderStyle Xor 0 will have no effect, so presumably you mean
img.BorderStyle Xor 1? Personally that effect is not my own view of how a
button should behave, although it looks reasonable and if you like it
yourself then I'm sure it's okay. I would suggest though that if you are
going to use img.BorderStyle Xor 1 in both the mouse down and mouse up
events (as you have said you are doing) instead of the suggestion made by
Duke then I would advise you to place the same code in the Double Click
event, otherwise the up / down button views will reverse whenever the user
double clicks your button, as users are often inclined to do.

Mike



From: Phil Hunt on
Yes, I menat Xor 1.
I see your point about dbl click. Duke's suggestion is very appreciated. But
hardcoding the borderStyle could show nothing on the first click (depending
on the initial state), then it will flip flop correctly.
I had no problem with the button visual until I do something for touch
screen appl. Some finger would block the view. In this app, I actuall loop
thru all the button to assign a color background to the down picture.
GUI is like internal engine, hard to change. Look at the log in screen of
Win 7, prefilling the textbox is really good idea, but I don't know whay it
takes so long for people to come out with it. Also a grey out command button
that becomes active when you click it anyway. That would be a no no, not
long ago.

"Mike Williams" <Mike(a)WhiskyAndCoke.com> wrote in message
news:eLou0rzqKHA.1800(a)TK2MSFTNGP02.phx.gbl...
> "Phil Hunt" <aaa(a)aaa.com> wrote in message
> news:%23UIv%23IzqKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>
>> Personally I like the visual better than the lame button click. FYI, I
>> use
>> img.BorderStyle = img.BorderStyle Xor 0
>> on both up and down event, for the most
>> deiscerning eye.
>
> Img.BorderStyle Xor 0 will have no effect, so presumably you mean
> img.BorderStyle Xor 1? Personally that effect is not my own view of how a
> button should behave, although it looks reasonable and if you like it
> yourself then I'm sure it's okay. I would suggest though that if you are
> going to use img.BorderStyle Xor 1 in both the mouse down and mouse up
> events (as you have said you are doing) instead of the suggestion made by
> Duke then I would advise you to place the same code in the Double Click
> event, otherwise the up / down button views will reverse whenever the user
> double clicks your button, as users are often inclined to do.
>
> Mike
>
>
>