开发者

windows 'switch to' implementation

Hi how can i 开发者_如何学运维 implement "switch to" functional in my app like in windows task explorer, can any one give me useful link or response how to do it? Tnaks a lot for all


SetForegroundWindow is the normal way to change "current task", for "task switcher" apps, SwitchToThisWindow is a better solution since it does not require your app to be "foreground" (But please, don't abuse SwitchToThisWindow just to bring your own apps to the foreground)

If this is a alt-tab like application, you can use RegisterHotKey to register for a special key press, and EnumWindows to enumerate top-level windows...


Use the SwitchToThisWindow() Windows API function in User32.dll. Get a handle to the window using EnumWindows() or FindWindow(), then pass it to SwitchToThisWindow() to switch to the app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜