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
Post a Comment