int ScreenHight = Screen.PrimaryScreen.Bounds.Height;
int ScreenWidth = Screen.PrimaryScreen.Bounds.Width;
int location_y = ScreenHight / 2;
int location_x = (SysGlobalInfo.PicBox1_location_x +SysGlobalInfo.PicBox_width+ SysGlobalInfo.PicBox2_location_x-this.Width)/2;
int X = Convert.ToInt32(location_x);
int Y= Convert.ToInt32(location_y /1.35);
this.Location = new Point(X, Y);
定义窗体在屏幕的X,Y座标,这样不管分辨如何,它的位置始终不变
获取主窗体相对屏幕的坐标,然后就可以做加减了
可以详细说明下吗谢谢啦
好怪的需求。可以把子窗体嵌套在主窗体里。