I need to hide a Windows form from the taskbar but I can\'t use WS_EX_TOOLWINDOW
because I need the system menu and min/max buttons on the form\'s title bar. >
There's an interesting discussion of this exact problem here (from a VB6 persepective).
The most relevant bit from your question's perspective is:
"When you create a window, the taskbar examines the window's extended style to see if either the WS_EX_APPWINDOW (&H40000) or WS_EX_TOOLWINDOW (&H80) style is turned on. If WS_EX_APPWINDOW is turned on, the taskbar shows a button for the window, and if WS_EX_ TOOLWINDOW is turned on, the taskbar does not show a button for the window. A window should never have both of these extended styles. If the window doesn't have either of these styles, the taskbar decides to create a button if the window is unowned and does not create a button if the window is owned."
Incidentally, you use the GetWindow API function with the GW_OWNER flag to determine whether a window is owned.