Win32 SetForegroundWindow unreliable

前端 未结 7 529
时光取名叫无心
时光取名叫无心 2020-12-05 08:17

I have a rather complex series of applications which depend on the ability to switch applications in the foreground.

My problem is, every 5 or 6 times of switching t

相关标签:
7条回答
  • 2020-12-05 08:53

    We had a similar problem a couple of years ago. We could solve it by the following function call:

    SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, 0, SPIF_UPDATEINIFILE);
    

    Give it a try. See the documentation here.

    0 讨论(0)
提交回复
热议问题