Window position Syncronising

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mr.Tickle

    Window position Syncronising

    Is there a better way to synchronise 2 windows positions appart from
    listening for WINDOW A Location Changed event and sendint the new location
    to WINDOW B?

    Could this be done with docking?


  • Horatiu Ripa

    #2
    Re: Window position Syncronising

    Yes but the window (form) that is contained in the second must have
    "TopLevel=false " :
    private void Form1_Load(obje ct sender, System.EventArg s e)

    {

    Form frm2 = new Form2();

    frm2.TopLevel = false;

    this.Controls.A dd(frm2);

    this.Controls[0].Dock = DockStyle.Left;

    frm2.Show();

    }

    or you can use MDI forms...


    If the Forms does not contain one another (or are not contained both in a
    parent container) there's no other way to synchronize their position than to
    do it manually.
    --
    Horatiu Ripa

    "Mr.Tickle" <MrTickle@mrmen .com> wrote in message
    news:#5i51B$iDH A.1284@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Is there a better way to synchronise 2 windows positions appart from
    > listening for WINDOW A Location Changed event and sendint the new location
    > to WINDOW B?
    >
    > Could this be done with docking?
    >
    >[/color]


    Comment

    Working...