C#で自身のフォームのサイズを指定する
書式
this.Width = 幅
this.Height = 高さ
Widthプロパティは画面の横幅、Heightプロパティは画面の高さを指定します。
使用例
private void btnOp_Click(object sender, EventArgs e)
{
//横幅のピクセル数
this.Width = 600;
//高さのピクセル数
this.Height = 400;
}
Coding Changes the World
書式
this.Width = 幅
this.Height = 高さ
Widthプロパティは画面の横幅、Heightプロパティは画面の高さを指定します。
使用例
private void btnOp_Click(object sender, EventArgs e)
{
//横幅のピクセル数
this.Width = 600;
//高さのピクセル数
this.Height = 400;
}