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 / December 2005

Tip: Looking for answers? Try searching our database.

Z-Order: How to determine and then persist?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jules Winfield - 28 Dec 2005 14:41 GMT
I've developed a WinForms application that allows users to create a number
of child forms within a larger parent form. The child forms can be dragged
around within the bounds of the parent. They can also be resized.

When the user closes the application, I want the size and position of the
child forms to be persisted. I've figured out how to do this. The only thing
I'm lacking is the z-order. How do I determine the z-order of each child
form relative to its siblings? If I could find a way to persist this
information, then when the app starts up again, I could arrange the forms
with the same z-order that the user used in the previous session.

Thanx..
Sergey Poberezovskiy - 28 Dec 2005 22:10 GMT
The ActiveForm will always be on top - so when you close your application
just record the activeform's order as you close them - hope it makes sense.

> I've developed a WinForms application that allows users to create a number
> of child forms within a larger parent form. The child forms can be dragged
[quoted text clipped - 8 lines]
>
> Thanx..
Tim Scott - 29 Dec 2005 03:52 GMT
Jules,

The Z-Order is controlled by the order of the controls in the parent
control's Control collection.   As long as you serialize out and then
back in with the same order, the Z-Order should be preserved.

See this post:
http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms/br
owse_thread/thread/21ba1a662a032356/


-- Tim Scott
  http://geekswithblogs.net/tscott
Jules Winfield - 29 Dec 2005 12:33 GMT
Thanks -- that's precisely what I was looking for!

> Jules,
>
[quoted text clipped - 7 lines]
> -- Tim Scott
>   http://geekswithblogs.net/tscott

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.