//调用API函数
using System.Runtime.InteropServices;
 
        //窗体层的初始位置
        public const int HWND_TOPMOST = -1;
 
程序窗体中声明方法
       //API函数
        [DllImport("user32", EntryPoint = "SetWindowPos")]
        //静态窗口保持的位置
        public static extern bool SetWindowPos(int hwnd, int hWndInsertAfter, int x, int y, int cx, int cy, uint wFlags);
 
添加timer控件,在tick事件中写窗体的位置
            //timer启动后的保持窗口位置。
            SetWindowPos(this.Handle.ToInt32(), HWND_TOPMOST, 420, 300, 300, 300, 1);
 
在窗体load中启动timer
            //启动timer控件
            timer1.Start();