Click here to Skip to main content
15,897,135 members
Home / Discussions / C#
   

C#

 
QuestionC# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff23-Oct-13 0:15
professionalBillWoodruff23-Oct-13 0:15 
AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
GuyThiebaut23-Oct-13 2:02
professionalGuyThiebaut23-Oct-13 2:02 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
N8tiv23-Oct-13 13:04
N8tiv23-Oct-13 13:04 
AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
Richard MacCutchan23-Oct-13 3:27
mveRichard MacCutchan23-Oct-13 3:27 
AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
Eddy Vluggen23-Oct-13 5:12
professionalEddy Vluggen23-Oct-13 5:12 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
Ravi Bhavnani23-Oct-13 12:06
professionalRavi Bhavnani23-Oct-13 12:06 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
Eddy Vluggen23-Oct-13 20:41
professionalEddy Vluggen23-Oct-13 20:41 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff23-Oct-13 18:39
professionalBillWoodruff23-Oct-13 18:39 
Thanks, Eddy, I hoped someone would respond who would advocate the position that it's okay to put Forms in Forms, or, at least, okay in some circumstances.

I do not understand this statement: "One can set a new parent, and could choose to set the apps' parent to a button," but it's provocative in a fascinating way: would you care to give an example of why you would implement this, and how you would use this type of relationship ?

I also fail to see how using a Form within a Form inherently promotes "Encapsulation and re-use" in a way that a Form that is not contained in another Form does not.

I also believe, but have not verified through any formal analysis, that if you had an Application whose Main Form contained many other Forms, and the Opacity properties of the Main Form, and contained Forms, were different, that you could well have a significant performance hit depending on your memory, CPU, GPU, etc.

I adhere to William of Occam's idea (Occam's Razor, Latin: lex parsimoniae) that parsimony in design is a very good thing: why use a Form instead of a Panel or other ContainerControl unless using the Form provides some significant functionality the Panel does not ?

Using a Form within a Form in WinForms means you sacrifice the ability to do design-time layout of the Form's position in its containing Form.

Another thing a Form in a Form offers is ... if it has a TitleBar ... instant movability, but WinForms provides no "easy" way to constrain a contained Form's location in its Parent Form.

I look at an Application (in WinForms) as a "totality" that includes Objects that have Windows, Forms, UserControls, other Controls with UI's, etc., and other Objects that do not have Windows: Classes, Enumerations, Structs, Interfaces, etc.

While you are free to dismiss my bias against MDI architecture with the ad hominem argument that it's a "skin deep" point-of-view on my part, I assert that MDI architecture has the effect of diminished productivity compared to other multi-window management strategies, and I do not believe there's any inherent "efficiency" in MDI compared to managing multi-documents with a Tabbed UI (TDI).

It is interesting to review the current state of window management of many of the most widely used Applications: [^]. It's a "mixed-bag," as you might expect. But, a trend away from MDI seems apparent ... the "kicker" being that if you regard a tabbed multi-window management application as a form of MDI: well, then MDI is going strong.

I suspect one thing you and I could completely agree on would be the idea that one cannot make any absolute rule about application design Smile | :)

Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview

AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
Eddy Vluggen23-Oct-13 22:34
professionalEddy Vluggen23-Oct-13 22:34 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff24-Oct-13 17:49
professionalBillWoodruff24-Oct-13 17:49 
AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
Ravi Bhavnani23-Oct-13 12:12
professionalRavi Bhavnani23-Oct-13 12:12 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff23-Oct-13 18:52
professionalBillWoodruff23-Oct-13 18:52 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
joost.versteegen24-Oct-13 3:23
joost.versteegen24-Oct-13 3:23 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff24-Oct-13 17:48
professionalBillWoodruff24-Oct-13 17:48 
AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
WuRunZhe30-Oct-13 14:50
WuRunZhe30-Oct-13 14:50 
Questionclosing second form without closing first form Pin
alfie.max1522-Oct-13 23:34
alfie.max1522-Oct-13 23:34 
AnswerRe: closing second form without closing first form Pin
BillWoodruff23-Oct-13 2:20
professionalBillWoodruff23-Oct-13 2:20 
GeneralRe: closing second form without closing first form Pin
alfie.max1524-Oct-13 7:21
alfie.max1524-Oct-13 7:21 
QuestionSQL Server Connection Pin
Member 1035350322-Oct-13 17:43
Member 1035350322-Oct-13 17:43 
AnswerRe: SQL Server Connection Pin
Ron Beyer22-Oct-13 18:06
professionalRon Beyer22-Oct-13 18:06 
AnswerRe: SQL Server Connection Pin
Nicholas Marty22-Oct-13 23:27
professionalNicholas Marty22-Oct-13 23:27 
QuestionC# Open Windows 8 Keyboard Pin
Kevin Marois22-Oct-13 13:15
professionalKevin Marois22-Oct-13 13:15 
AnswerRe: C# Open Windows 8 Keyboard Pin
BillWoodruff22-Oct-13 21:37
professionalBillWoodruff22-Oct-13 21:37 
QuestionParsing an XML File Pin
MarkB12322-Oct-13 9:18
MarkB12322-Oct-13 9:18 
AnswerRe: Parsing an XML File Pin
Richard Deeming22-Oct-13 9:38
mveRichard Deeming22-Oct-13 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.