C#에서 Winform으로 만든 프로그램의 창이 항상 열려져 있게 하는 방법이다.
아래와 같이 Form을 초기화하는 곳 아래에 같은 Source code 로 작성하여 놓는다.
public Form1()
{
InitializeComponent();
this.MaximizeBox = false;
this.MinimizeBox = false;
this.TopMost = true;
}
참고한 곳은 Stack overflow 이다.
https://stackoverflow.com/questions/3025923/disabling-minimize-maximize-on-winform
Disabling Minimize & Maximize On WinForm?
WinForms have those three boxes in the upper right hand corner that minimize, maximize, and close the form. What I want to be able to do is to remove the minimize and maximize, while keeping the c...
stackoverflow.com
더하여서 this.TopMost = true 를 추가하는 것이 더 좋을 것 같다.
결과적으로 아래의 코드 3줄이 필요하다.
this.MaximizeBox = false;
this.MinimizeBox = false;
this.TopMost = true
'C# 언어' 카테고리의 다른 글
| C# echo 프로그램 만들기 (0) | 2021.11.12 |
|---|---|
| C#으로 메모장(Notepad) 만들기 (1) | 2021.09.19 |
| C#으로 만든 스티커 메모 (소스코드 없음) (0) | 2021.09.19 |
| C#으로 메모리 매칭 게임 만들기 (0) | 2021.09.16 |
| C#으로 스도쿠 만들기 (0) | 2021.09.16 |
댓글