Removing windows from the taskbar, Windows 7

后端 未结 1 1615
野的像风
野的像风 2021-01-15 16:04

I have a little Tkinter application here, as well as a handle to the Tkinter window. What I\'m trying to do is remove the window from the taskbar using some combination of W

相关标签:
1条回答
  • 2021-01-15 16:53

    I hope this helps, or at least guides you somehow. I'm not sure how to do this in python, but speaking for the winapi part, this has to do with the window ex style. This is what MSDN says:

    The Shell creates a button on the taskbar whenever an application creates a window that isn't owned. To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style. To prevent the window button from being placed on the taskbar, create the unowned window with the WS_EX_TOOLWINDOW extended style. As an alternative, you can create a hidden window and make this hidden window the owner of your visible window.

    Complete reference here|

    In C or C++ you specify the ex style when you create the window with CreateWindowEx. You can also modify the style after a window is created with SetWindowLongPtr.

    Edit: I found this very promising python method: PyCWnd.ModifyStyleEx

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