Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4335196
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:38:11+00:00 2026-05-21T10:38:11+00:00

I implement this chevron tool bar in my application and it works perfectly great;

  • 0

I implement this chevron tool bar in my application and it works perfectly great; however, when I clicked on any items on the menu, my application loses focus. Even if I move my mouse over the the corner of the form, the cursor doesn’t change to the resize handle. I need to click on the form or application in order to regain focus which I would not like to have to do. Calling MainForm.Setfocus after calling the menu item doesn’t help. I would like to have the focus be automatically on my application so my users don’t need to click on the form before doing the things they need to do.

Any idea on how to regain focus on the form and/or application?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:38:12+00:00Added an answer on May 21, 2026 at 10:38 am

    Intercept the WM_KillFocus message.

    pseudo code
    don’t have Delphi on this terminal, will fill in the blanks when home.

    type
      TForm1 = class(TForm)
      ...
      protected
        procedure WMKillFocus(message: TWM_Killfocus); message WM_KillFocus;
      ...
    
    procedure TForm1.WMKillFocus(message: TWM_Killfocus);
    begin
      //do stuff to prevent the focus from shifting.
      //do *NOT* call SetFocus, it confuses Windows/Delphi and leads to suffering
      //Call PostMessage or handle the KillFocus message
      //From MSDN
      //While processing this message, do not make any function calls that display
      //or activate a window. This causes the thread to yield control and can
      //cause the application to stop responding to messages. For more information 
      //see Message Deadlocks. 
      //Also don't use SendMessage, PostMessage is OK though.        
    
      //Suggestion:
      PostMessage(Self.handle, WM_SETFOCUS, 0, 0); 
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement this tutorial , and it works well. However, I'm trying
I'm trying to implement this pattern in my WinForms application (I don't like it,
I am trying to implement this JQuery ImageBubbles that I found here: http://www.dynamicdrive.com/dynamicindex4/imagebubbles.htm However,
i want to implement this (this application is made in flex)type of application using
How would I implement this JQuery Round Corner Plugin for 2 CSS items? Here
How do I implement this menu in the iPhone SDK?
I am trying to implement this function which works everywhere except every IE version
How do I implement this method (see below)? I'm new to Objective-C and I'm
How do you implement this in CodeIgniter?
I am trying to implement this demo on my local machine. http://bit.ly/4g4o1r I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.