Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2004, 01:26 PM
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default MDI vs. modeless and floating windows

I've finally started coding again. I need a floating window so that my users can see a list of triangles, and the display of such triangles. I've come up with two ways to do this. I've thought about switching over from an SDI to an MDI. I've also thought about using modeless dialogs instead of MDI.

Your suppose to be able to interact with your application and the modeless dialog box at the same time, right?

I found documentation for visual foxpro that talks about creating and MDI app. with child windows that will float outside of the parent window. How can one do this in C# using MDI?

My last question is what are the pros and cons of using MDI floating windows vs. modeless dialogs?

I also noticed that there are two overloads for ShowDialog(). Why would you want to use one or the other?

Thanks,
Jon


 
Old July 7th, 2004, 05:47 PM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, you can interact with your app while a modaless form is visible. But you may want to set topmost property to true so the form is always visible.

A MDI child form will always be inside the bounds of the MDI parent. It will not float outside of the parent. If you tried to move the MDI child beyond the borders of the parent, scroll bars should appear on the parent form and the portions outside of the parent form will not be visible. Perhaps this is what you meant by float outside?

Can't tell you the pros/cons of MDI versus SDI forms. You should pick the one that works best with your app. A MDI modal form is the same as SDI modal form except for some visual cues and related properties. A dialog cannot be modaless.

The 1 parameter version of ShowDialog is used to specify the owner of the dialog. Certain changes to the owner form will affect all the owned forms. Like if you miminize the owner form, then all the owned form should miminize too.

I also have a feeling what you are really looking for is the TopMost property. Check MSDN for more details.

 
Old July 7th, 2004, 08:16 PM
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found out about the idea of a floating window in an MDI application by searching my home MSDN library and finding with visual foxpro a reference to a child window that would float outside of an MDI application. It actually can be moved out of the parent window. I don't know whawt visual foxpro is?

Jon

 
Old July 9th, 2004, 12:15 PM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

MDI child window cannot float outside the parent (container) window. That's the defination of MDI. You need to actually see what the author meant by 'moved out of the parent window'. Imagine the window you are reading this from. Now move the window completely off your visible screen aka desktop. So now you moved it out of the parent desktop but it is still on (inside) the desktop. You think the desktop is limited to whatever the screen resolution happens to be, but that really is just the visible portion of the desktop. Same with MDI. The MDI parent defines the visible portion. You can place MDI child 1000000 pixels off the left. You simply have to slide the visible portion over so that the hidden child comes into view.

There is also nothing preventing you from using both MDI and SDI forms in the same app.

If all you need is a floating window for the users to select the triangles, use a modaless SDI form with TopMost set to True.

Foxpro used to be a database. It used compitable syntax as Dbase. It became Visual Foxpro after MS bought it for its RUSHMORE technology.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying MDI Child Form Menus with MDI Parent ashu_from_india Pro VB 6 3 June 10th, 2008 11:01 PM
Controlling MDI child form from MDI parent panel LuxCoder Pro Visual Basic 2005 1 May 25th, 2007 12:20 PM
Controlling MDI child form from MDI parent panel LuxCoder VB.NET 2002/2003 Basics 7 April 11th, 2007 02:38 PM
Controlling MDI child form from MDI parent panel LuxCoder VB How-To 1 April 9th, 2007 03:25 PM
Controlling MDI child form from MDI parent panel LuxCoder Visual Basic 2005 Basics 2 April 9th, 2007 03:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.