Setting focus to MP window after focus loss (1 Viewer)

htpcNoob

Portal Pro
January 23, 2005
52
0
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.
 

Users who are viewing this thread

Top Bottom