Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 7th, 2004, 01:26 PM
Registered User
 
Join Date: Jul 2004
Location: , , .
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


Reply With Quote
  #2 (permalink)  
Old July 7th, 2004, 05:47 PM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Location: , , .
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.

Reply With Quote
  #3 (permalink)  
Old July 7th, 2004, 08:16 PM
Registered User
 
Join Date: Jul 2004
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old July 9th, 2004, 12:15 PM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Location: , , .
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:08 AM.


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