Issue with SetForegroundWindow in .NET

后端 未结 4 816
伪装坚强ぢ
伪装坚强ぢ 2021-01-02 07:17

I\'m using SetForegroundWindow API in .NET using PInvoke.

When I use the API while debugging in Visual Studio its works perfectly. But it doesn\'t work always when

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-02 07:37

    David was right and led me to the right direction . Followed the code project article which says "The system automatically enables calls to SetForegroundWindow if the user presses the ALT key or takes some action that causes the system itself to change the foreground window"

    How to bring window to top with SetForegroundWindow()

提交回复
热议问题