Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill Woodruff - 15 Mar 2008 10:24 GMT
.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 - 15 Mar 2008 19:58 GMT
> 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.

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

--Rob
Bill Woodruff - 16 Mar 2008 09:13 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.