Results 1 to 3 of 3

Thread: [2.0] AcceptButton Property

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    [2.0] AcceptButton Property

    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!
    Attached Images Attached Images  

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2.0] AcceptButton Property

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2.0] AcceptButton Property

    For example, Aim and Msn Messenger. Basically, for chat programs. It is known. Well, if anyone knows. Please respond.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width