Bringing Window to the Front in C# using Win32 API

前端 未结 6 1702
生来不讨喜
生来不讨喜 2020-12-09 01:46

I am writing an application that needs to bring window of an external app to the foreground, and not necessarily steal focus (there is a setting the user can toggle to steal

6条回答
  •  -上瘾入骨i
    2020-12-09 02:15

    You could use FindWindow to get the HWND of the window, then use the BringWindowToTop function found in the Win32 API.

提交回复
热议问题