I write simple XBMC script to launch my application (C#) ,My C# app will hidden XBMC by call ShowWindow (w32 api).
Between XBMC was hidden it also gain focus, when press any key all action occure in XBMC.
I also try following code but it not work
System.Diagnostics.Process[] xbmc = System.Diagnostics.Process.GetProcessesByName("XBMC");
IntPtr hWnd = xbmc[0].MainWindowHandle;
ShowWindow(hWnd,0);
this.FormBorderStype = ForeBorderStype.None;
this.WindowState = FormWindowState.Maximized;
this.BringToFront();
Any one can help , How to set my app to run as foreground over XBMC.
Thank.