728x90
1. Form을 불러올 때 CenterToScreen() 메소드를 호출한다.
public Form()
{
InitializeComponent();
this.CenterToScreen();
}
2. Form의 StartPosition 속성을 CenterScreen으로 지정한다.
form.StartPosition = FormStartPosition.CenterScreen;
728x90
'C#' 카테고리의 다른 글
Delegate에 대한 이해 (0) | 2022.12.17 |
---|---|
BadImageFormatException 오류 (0) | 2022.12.16 |
대소문자를 구별하지 않고 문자열 비교하는 방법 (1) | 2022.12.16 |
@ 심벌 사용법 (0) | 2022.12.15 |
불변성과 가변성(공변성, 반공변성) (0) | 2022.12.15 |