Click here to Skip to main content
16,011,778 members
Home / Discussions / C#
   

C#

 
GeneralRe: Open my website with FireFox navigator Pin
Pierre besquent3-Aug-11 23:25
Pierre besquent3-Aug-11 23:25 
GeneralRe: Open my website with FireFox navigator Pin
Shameel4-Aug-11 0:30
professionalShameel4-Aug-11 0:30 
GeneralRe: Open my website with FireFox navigator Pin
Pierre besquent4-Aug-11 0:41
Pierre besquent4-Aug-11 0:41 
QuestionDevComponents problem Pin
md_refay3-Aug-11 21:31
md_refay3-Aug-11 21:31 
AnswerRe: DevComponents problem Pin
eqtidar8-Aug-11 18:29
eqtidar8-Aug-11 18:29 
QuestionOpening a form to a different mdi container [modified] Pin
MAW303-Aug-11 15:50
MAW303-Aug-11 15:50 
AnswerRe: Opening a form to a different mdi container Pin
OriginalGriff3-Aug-11 21:48
mveOriginalGriff3-Aug-11 21:48 
AnswerRe: Opening a form to a different mdi container [modified] Pin
Shameel3-Aug-11 22:42
professionalShameel3-Aug-11 22:42 
The problem is, you are creating a new instance of FormContainerB() and making it the parent of your form. You must have one instance of FormContainerB for the entire application. You can acheive this using the Singleton patten like this:
C#
public class FormContainerB : Form {
    private FormContainerB _instance;
    private FormContainerB() {
    }
    internal static FormContainerB Instance {
        get {
            if (_instance == null) {
                _instance = new FormContainerB();
            }
            return _instance;
        }
    }
}


And then you can set it as parent to your forms like this:
C#
this.MdiParent = FormContainerB.Instance;


modified on Thursday, August 4, 2011 5:01 AM

QuestionHelp with wmi enumerator for exchange Pin
turbosupramk33-Aug-11 10:36
turbosupramk33-Aug-11 10:36 
QuestionSearch Engine Pin
Software20073-Aug-11 8:55
Software20073-Aug-11 8:55 
AnswerRe: Search Engine Pin
jschell3-Aug-11 9:55
jschell3-Aug-11 9:55 
GeneralRe: Search Engine Pin
Software20073-Aug-11 9:59
Software20073-Aug-11 9:59 
GeneralRe: Search Engine Pin
Alan Balkany4-Aug-11 4:38
Alan Balkany4-Aug-11 4:38 
GeneralRe: Search Engine Pin
jschell4-Aug-11 8:10
jschell4-Aug-11 8:10 
GeneralRe: Search Engine Pin
Alan Balkany4-Aug-11 8:41
Alan Balkany4-Aug-11 8:41 
GeneralRe: Search Engine Pin
jschell5-Aug-11 11:38
jschell5-Aug-11 11:38 
GeneralRe: Search Engine Pin
jschell4-Aug-11 8:14
jschell4-Aug-11 8:14 
QuestionRepetitive calling of code in web application Pin
vanikanc3-Aug-11 4:37
vanikanc3-Aug-11 4:37 
AnswerRe: Repetitive calling of code in web application Pin
Matt Meyer3-Aug-11 4:56
Matt Meyer3-Aug-11 4:56 
AnswerRe: Repetitive calling of code in web application [modified] Pin
Keith Barrow3-Aug-11 5:24
professionalKeith Barrow3-Aug-11 5:24 
Questionlist collections Pin
Satish_S3-Aug-11 2:06
Satish_S3-Aug-11 2:06 
AnswerRe: list collections Pin
BobJanova3-Aug-11 2:17
BobJanova3-Aug-11 2:17 
AnswerREPOST Pin
Not Active3-Aug-11 2:26
mentorNot Active3-Aug-11 2:26 
GeneralRe: REPOST Pin
BobJanova3-Aug-11 2:28
BobJanova3-Aug-11 2:28 
AnswerRe: list collections Pin
PIEBALDconsult3-Aug-11 2:45
mvePIEBALDconsult3-Aug-11 2:45 

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.