按代码定位.C#

Hay*_*Sim 3 c# location datagridview

我想将dataGridView的Y位置更改为75,我试图通过单击按钮将其向上移动.

已经尝试过了

this.dataGridView1.Location = new Point(
 this.dataGridView1.Location.X,
 this.dataGridView1.Location.Y
);
Run Code Online (Sandbox Code Playgroud)

Mit*_*eat 5

大概你的意思是:

this.dataGridView1.Location = new Point(this.dataGridView1.Location.X, 75);
Run Code Online (Sandbox Code Playgroud)