Results 1 to 4 of 4

Thread: Focus Of Command Buttons

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    154

    Focus Of Command Buttons

    What I am looking for is to never have focus on a command button. So if you click on 1 it wont stay set on it at all it just clicks then loses the focus. Is there a way so that a command button can never recieve the focus? Well thanks guys I appreciate it!

  2. #2
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    All you can do is set a Timer that does a SetFocus every 500 milliseconds or so to the item you would rather it focus on
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    I assume you don't want to prevent the user from clicking them. If you want to prevent them from otherwise receiving focus just change their TabStop property to False and if you don't want focus to remain there after they are clicked, put something like Text1.Setfocus in their GotFocus event.

  4. #4
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    If it is worth the effort to you, the attached sample project shows how to do this by subclassing the button. (Read the readme file before running the project.)
    Attached Files Attached Files

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