请教一下高手们,如何让提示框无论在窗体初始化,还是在窗体最大化都处在当前窗体的右下角,而且当当前窗体关闭时,提示框也会关闭!我这里的提示框是用一个form实现的

解决方案 »

  1.   

    private void button3_Click(object sender, EventArgs e)
            {
                Form frmMsg = new Form();
                frmMsg.StartPosition = FormStartPosition.Manual;
                frmMsg.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - frmMsg.Width, Screen.PrimaryScreen.WorkingArea.Height - frmMsg.Height);
                frmMsg.Show();
            }
      

  2.   

    有几种方法的。 一是设置Form的location属性。 
    Form 还有个方便的属性,StartPoint可以用来设置Form的特殊位置。
      

  3.   

    FormMag f= new FormMag();
    f.Size = new Size(200, 100);
    int X = Screen.PrimaryScreen.Bounds.Width - f.Size.Width;
    int Y = SystemInformation.WorkingArea.Height - f.Size.Height;
    f.StartPosition = FormStartPosition.Manual;
    f.Location = new Point(X, Y);