home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Setting focus to MP window after focus loss
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="htpcNoob" data-source="post: 33782" data-attributes="member: 11157"><p>Hello. I have a custom C# Console app that I run from MP "My Programs" occasionaly. Hiding the window is not an option for me <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> as it opens calls other processes that open windows. The problem is, once the process is completed, MP has already lost focus.</p><p></p><p>Right before my custom application ends however, I tried using SetForgroundWindow, SetActiveWindow and SetFocus window functions to try and force MP to recieve focus again. For some reason they do not work. Im using a remote control to control MP btw.</p><p></p><p>So progrmatically, how can I tell my app to set focus back to mp? I used winspector to find the MediaPortal class name and window title. Then I use "FindWindow" to find the toplevel MP window. FindWindow returns a proper handle, but using any of the 3 commands up there refuses to set its keyboard focus on MP.</p></blockquote><p></p>
[QUOTE="htpcNoob, post: 33782, member: 11157"] Hello. I have a custom C# Console app that I run from MP "My Programs" occasionaly. Hiding the window is not an option for me :-) as it opens calls other processes that open windows. The problem is, once the process is completed, MP has already lost focus. Right before my custom application ends however, I tried using SetForgroundWindow, SetActiveWindow and SetFocus window functions to try and force MP to recieve focus again. For some reason they do not work. Im using a remote control to control MP btw. So progrmatically, how can I tell my app to set focus back to mp? I used winspector to find the MediaPortal class name and window title. Then I use "FindWindow" to find the toplevel MP window. FindWindow returns a proper handle, but using any of the 3 commands up there refuses to set its keyboard focus on MP. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Setting focus to MP window after focus loss
Contact us
RSS
Top
Bottom