呵呵,我来告诉你用API来解决这个问题吧。
你试试
[DllImport("user32.dll")]
public static extern int SetWindowPos(int hwnd,int hWndInsertAfter,int x,int y,int cx,int cy,int wFlags);
最前:
private void Form1_Load(object sender, System.EventArgs e)
{
SetWindowPos((int)this.Handle,-1,0,0,0,0,3);
}
取消:
private void button1_Click(object sender, System.EventArgs e)
{
SetWindowPos((int)this.Handle,1,0,0,0,0,3);
}