奇怪的问题,改变窗口的大小,button就看不到了
窗体里面有listView和button.listView填充整个窗口,button在右下角显示,
private void Form1_Resize(object sender, EventArgs e)
{
listView.Size = new Size(this.Width, this.Height);
button.Location = new Point(this.Width - button.Width, this.Height-button.Height);
}
一改变窗口大小,button就看不到了,又做了测试,如果只改变button的横坐标,就没问题。
------解决方案--------------------应该对应客户区的高宽
button1.Location = new Point(ClientSize.Width - button1.Width, ClientSize.Height - button1.Height);