PDA

Click to See Complete Forum and Search --> : [2.0] AcceptButton Property


Fromethius
Dec 26th, 2006, 08:14 PM
I've noticed when you use this property, it adds an ugly border onto the button. Is there any way to get rid of this border? Basically, I want to be able to press Enter on my keyboard, have a button get pressed, but not have the button looked focused. Thanks!

jmcilhinney
Dec 26th, 2006, 10:07 PM
That border is a visual cue to the user that that button will be activated if the Enter key is pressed. Without it, how is the user supposed to know?

If you want to disadvantage the user that way then you'd can't use the AcceptButton property. You'd have to handle the form's KeyDown event, trap the Enter key, determine whether the currently selected control should receive the event rather than the default button, etc., etc.

Fromethius
Dec 26th, 2006, 11:23 PM
For example, Aim and Msn Messenger. Basically, for chat programs. It is known. Well, if anyone knows. Please respond.