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

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

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -