taskbar grouping in XP/Home of open windows of one app when minmized ?

  • Thread starter Thread starter Bill Woodruff
  • Start date Start date
B

Bill Woodruff

..NET 2.0 C# WinXP or Home SP2, all latest updates ... NOT an MDI
application.

In the scenario discussed here there is no "main form" : window management
is being done in code, and the first open form being closed does not
automatically close all the other forms (of course all opened forms have
their Form_Closing event handled in a way that ensures the Application exits
when there are no more open forms).

When I create a number of independent application windows at runtime (i.e.,
several winforms whose Parent == null), at a certain number of windows open
when they are all minimized they are "grouped" in the taskbar and certain
menu options appear when their task menu group is context-clicked like
"cascade," "tile horizontal," etc.

From my observations I think the underlying Windows manager is "deciding"
when to group them all together on the task bar when the number of "slots"
available on the task bar is exceeded in width. On a practical level, I
don't see this effect until I mimimize about four windows simultaneously.

I was wondering if there was any API to access the tiling functionality that
this presents for your own purposes when Forms are NOT all minimized to the
taskbar.

thanks, Bill
 
Rob wrote :

"You can't control the grouping itself (that's all up to the shell), but
your
app can pinvoke the CascadeWindows and TileWindows functions itself:
http://msdn2.microsoft.com/en-us/library/ms632674.aspx
http://msdn2.microsoft.com/en-us/library/ms633554.aspx"

Thanks for your response, Rob; I figured there was some api for this. In
this case all the windows opened by my application are toplevel (i.e.,
Parent == null), so using the PInvokes might have the undesired side-effect
of also tiling other windows belonging to other apps, but I am going to
investigate. My client is "allergic" to PInvoke :) I might be able to get
one past him, but if I have to get into the api enumerating all the
top-level windows to build an array of only those which belong to my app ...
well, we're not going ... there.

Again, thanks for your time !

best, Bill
 
Back
Top