Click here to Skip to main content
15,917,328 members
Home / Discussions / C#
   

C#

 
QuestionThread Synchronization Pin
topksharma198221-Aug-07 4:14
topksharma198221-Aug-07 4:14 
AnswerRe: Thread Synchronization Pin
Luc Pattyn21-Aug-07 5:27
sitebuilderLuc Pattyn21-Aug-07 5:27 
QuestionApplication terminates when window gets closed Pin
MarioMARTIN21-Aug-07 3:59
MarioMARTIN21-Aug-07 3:59 
AnswerRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 5:07
MarioMARTIN21-Aug-07 5:07 
GeneralRe: Application terminates when window gets closed Pin
Not Active21-Aug-07 5:44
mentorNot Active21-Aug-07 5:44 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 5:47
MarioMARTIN21-Aug-07 5:47 
GeneralRe: Application terminates when window gets closed Pin
Not Active21-Aug-07 11:03
mentorNot Active21-Aug-07 11:03 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 19:30
MarioMARTIN21-Aug-07 19:30 
How about looking at the two DIFFERENT code samples I posted?

In the first snipped I create an App that has a window as member (only one window). When the window gets closed also the app terminates.

And in the second sample I create a hidden window that has an additional window as member (two windows). I don't say: m_window.hidden! I hide the parent!

But I think creating a hidden window just to make sure that the class itself survives when one of its members gets closed is quite ugly.

So, please have a look at the code first, before you start getting wise! Wink | ;-)

Mario M.
GeneralRe: Application terminates when window gets closed Pin
Not Active22-Aug-07 0:21
mentorNot Active22-Aug-07 0:21 
AnswerRe: Application terminates when window gets closed Pin
Luc Pattyn21-Aug-07 5:52
sitebuilderLuc Pattyn21-Aug-07 5:52 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 6:00
MarioMARTIN21-Aug-07 6:00 
GeneralRe: Application terminates when window gets closed Pin
Luc Pattyn21-Aug-07 6:23
sitebuilderLuc Pattyn21-Aug-07 6:23 
AnswerRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 6:19
MarioMARTIN21-Aug-07 6:19 
GeneralRe: Application terminates when window gets closed Pin
Martin#21-Aug-07 8:17
Martin#21-Aug-07 8:17 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 19:21
MarioMARTIN21-Aug-07 19:21 
GeneralRe: Application terminates when window gets closed Pin
Martin#21-Aug-07 21:17
Martin#21-Aug-07 21:17 
AnswerRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 19:35
MarioMARTIN21-Aug-07 19:35 
Questionc# Pin
lankaudaranga21-Aug-07 2:40
lankaudaranga21-Aug-07 2:40 
AnswerRe: c# Pin
Justin Perez21-Aug-07 2:43
Justin Perez21-Aug-07 2:43 
GeneralRe: c# Pin
leckey21-Aug-07 3:54
leckey21-Aug-07 3:54 
GeneralRe: c# Pin
Justin Perez21-Aug-07 3:57
Justin Perez21-Aug-07 3:57 
GeneralRe: c# Pin
Martin#21-Aug-07 4:02
Martin#21-Aug-07 4:02 
GeneralRe: c# Pin
J4amieC21-Aug-07 4:38
J4amieC21-Aug-07 4:38 
GeneralIt leads to nothing but bad spirit! Pin
Martin#21-Aug-07 21:27
Martin#21-Aug-07 21:27 
GeneralRe: c# Pin
Talal Sultan21-Aug-07 5:34
Talal Sultan21-Aug-07 5:34 

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.