Setfocus windows api




















I need the window to have keyboard input set to it, but keep it's original z-order. What function would i use for this? Also is there a way i can add a style to a window so it keeps it's z-order when the user clicks it, but still has keyboard input directed to it? December 16th, , PM Re: SetFocus not working I never found out what was wrong, but i was able to acomplish what i needed with parent functions. December 17th, , AM December 17th, , PM NET Framework. How hard would it really be to port to Windows 8?

All times are GMT The time now is PM. Copyright TechnologyAdvice. CodeGuru Home. Visual Basic. VB Forums. You may have to register or Login before you can post: click the register link above to proceed. SetFocus HadFocus ; Easy eh? I have tried everything I can think of, and perhaps I have no clue, or I'm missing something simple. However, I am trying to click a button on a child form of another app from Delphi 2. But when I send the external app messages from my program, I get no visual response ie, the button does not do its thing.

Please help, here is the code I'm working with. I have no declarations other than the standard declarations when selecting the "OnKeyUp" event. I would be happy to use Delphi "TKey" conventions if I knew how. SetForegroundWindow MyChild end; end; PS, it appears that switching Focus between my program and the target external application has each application running their code when they have focus exclusively.

Improve this question. Martin Martin 45 1 1 silver badge 5 5 bronze badges. How do you verify that it doesn't have the focus? What does GetFocus return, if not button? Add a comment. Active Oldest Votes. Though I can't imagine how, I hope that helped somewhat. Improve this answer. What's the difference between a function and a procedure? As far as I can see I may be wrong , I am calling it as a function. They aren't. Thanks for the suggestion. Martin: a function call has a return value, like CreateWindowEx.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread's message queue.



0コメント

  • 1000 / 1000