窗体跟随

主窗口里面:
        Form1 frmleft ;
        Form frmdown;
     private void video_Move(object sender, EventArgs e)
        {
            if(frmleft ==null)
            frmleft = new test1(this );
            if (frmdown ==null )
            frmdown = new test2(this );
            frmleft.Left = Convert.ToInt16(this.Width.ToString()) + Convert.ToInt16(this.Location.X.ToString());
            frmleft.Top = this.Top;
            frmdown.Left = this.Left;
            frmdown.Top = Convert.ToInt16(this.Height.ToString()) + Convert.ToInt16(this.Location.Y.ToString());
        }




你可能感兴趣的:(窗体跟随)