c# - How to set focus to another window? -


i have problem program loses focus. it's not program. how can write second program set focus window every 1-2 seconds? is possible that?

you can use following win32 api if want bring other program/process

        [dllimport("coredll.dll")]         static extern bool setforegroundwindow (intptr hwnd);           private void bringtofront(process ptemp)          {            setforegroundwindow(ptemp.mainwindowhandle);          } 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -