Form Minimize

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Patterson

    Form Minimize

    I have an application with a main form (FormA). This form is borderless
    because we have a lot of skin action going on. The form creates and
    displays a second form (FormB) via formB.Show(). When we minimize FormA it
    also minimizes FormB. Is there any way to prevent this? I have played
    around with CreateParams with no luck.

    TIA!
    Brian



  • Marc Gravell

    #2
    Re: Form Minimize

    This is the default behaviour when ownership is specified (as illustrated by
    example below); so - do you really need the ownership, or can it be managed
    else-wise?

    static void Main(string[] args)
    {
    Form x = new Form();
    x.Text = "Parent x";
    Form y = new Form();
    y.Text = "Child y";
    y.Owner = x;
    x.Show();
    y.Show();
    Form a = new Form();
    a.Text = "Unrelated a";
    Form b = new Form();
    b.Text = "Unrelated b";
    a.Show();
    b.Show();
    Form app = new Form();
    app.Text = "Kill app";
    Application.Run (app);
    }

    "Brian Patterson" <brian@redeyepo s.com> wrote in message
    news:eISkl2FRGH A.1576@tk2msftn gp13.phx.gbl...[color=blue]
    >I have an application with a main form (FormA). This form is borderless
    >because we have a lot of skin action going on. The form creates and
    >displays a second form (FormB) via formB.Show(). When we minimize FormA it
    >also minimizes FormB. Is there any way to prevent this? I have played
    >around with CreateParams with no luck.
    >
    > TIA!
    > Brian
    >
    >
    >[/color]


    Comment

    • Brian Patterson

      #3
      Re: Form Minimize

      That is exactly my problem. I am not setting any owner information. If I
      set a breakpoint in the constructor of my FormB - and view the Owner and
      Parent properties - they are both null.

      Ideas?

      Brian Patterson
      "Marc Gravell" <marc@nonesuch. com> wrote in message
      news:OseJ2OGRGH A.4608@tk2msftn gp13.phx.gbl...[color=blue]
      > This is the default behaviour when ownership is specified (as illustrated
      > by example below); so - do you really need the ownership, or can it be
      > managed else-wise?
      >
      > static void Main(string[] args)
      > {
      > Form x = new Form();
      > x.Text = "Parent x";
      > Form y = new Form();
      > y.Text = "Child y";
      > y.Owner = x;
      > x.Show();
      > y.Show();
      > Form a = new Form();
      > a.Text = "Unrelated a";
      > Form b = new Form();
      > b.Text = "Unrelated b";
      > a.Show();
      > b.Show();
      > Form app = new Form();
      > app.Text = "Kill app";
      > Application.Run (app);
      > }
      >
      > "Brian Patterson" <brian@redeyepo s.com> wrote in message
      > news:eISkl2FRGH A.1576@tk2msftn gp13.phx.gbl...[color=green]
      >>I have an application with a main form (FormA). This form is borderless
      >>because we have a lot of skin action going on. The form creates and
      >>displays a second form (FormB) via formB.Show(). When we minimize FormA
      >>it also minimizes FormB. Is there any way to prevent this? I have played
      >>around with CreateParams with no luck.
      >>
      >> TIA!
      >> Brian
      >>
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • Marc Gravell

        #4
        Re: Form Minimize

        To be honest, there's not a lot to go on without some kind of illustrative
        code here: for instance, what is the respecitve modality of the forms? Are
        you using .Show, .ShowDialog, or Application.Run , etc? How the forms are
        being created? disposed?

        Marc
        "Brian Patterson" <brian@redeyepo s.com> wrote in message
        news:%239f$3jIR GHA.1096@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > That is exactly my problem. I am not setting any owner information. If I
        > set a breakpoint in the constructor of my FormB - and view the Owner and
        > Parent properties - they are both null.
        >
        > Ideas?
        >
        > Brian Patterson
        > "Marc Gravell" <marc@nonesuch. com> wrote in message
        > news:OseJ2OGRGH A.4608@tk2msftn gp13.phx.gbl...[color=green]
        >> This is the default behaviour when ownership is specified (as illustrated
        >> by example below); so - do you really need the ownership, or can it be
        >> managed else-wise?
        >>
        >> static void Main(string[] args)
        >> {
        >> Form x = new Form();
        >> x.Text = "Parent x";
        >> Form y = new Form();
        >> y.Text = "Child y";
        >> y.Owner = x;
        >> x.Show();
        >> y.Show();
        >> Form a = new Form();
        >> a.Text = "Unrelated a";
        >> Form b = new Form();
        >> b.Text = "Unrelated b";
        >> a.Show();
        >> b.Show();
        >> Form app = new Form();
        >> app.Text = "Kill app";
        >> Application.Run (app);
        >> }
        >>
        >> "Brian Patterson" <brian@redeyepo s.com> wrote in message
        >> news:eISkl2FRGH A.1576@tk2msftn gp13.phx.gbl...[color=darkred]
        >>>I have an application with a main form (FormA). This form is borderless
        >>>because we have a lot of skin action going on. The form creates and
        >>>displays a second form (FormB) via formB.Show(). When we minimize FormA
        >>>it also minimizes FormB. Is there any way to prevent this? I have
        >>>played around with CreateParams with no luck.
        >>>
        >>> TIA!
        >>> Brian
        >>>
        >>>
        >>>[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        Working...