Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Java
- Maven
- MANTIS
- SpringSource Tool Suite
- Redirect
- MSsql
- Web Service
- 자바
- jsp
- scrollView
- decompiler
- STS
- varags
- MS-SQL
- asp.net
- 컬럼명
- Eclipse
- Bootstrap
- 웹뷰
- Apache Lucene
- 웹 서비스
- javascript
- html
- 이클립스
- WebView
- C#
- Android
- 자바스크립트
- TextBox
- 안드로이드
Archives
- Today
- Total
bboks.net™
C# 윈폼 트레이로 최소화 하기 본문
1. 빈 폼을 만든다.
2. 폼에 NotifyIcon 컨트롤을 추가한다.
3. 폼에 Resize 이벤트 추가
4. Resize 이벤트에 아래 코드 입력
private void Form1_Resize(object sender, EventArgs e) { //notifyIcon1.BalloonTipTitle = "Monimize to Tray App"; //notifyIcon1.BalloonTipText = "You have successfully minimized you form"; if (FormWindowState.Minimized == this.WindowState) { notifyIcon1.Visible = true; this.Hide(); } else if (FormWindowState.Normal == this.WindowState) { notifyIcon1.Visible = false; this.ShowInTaskbar = true; } }
5. NotifyIcon에 MouseDoubleClick 이벤트 추가
6. MouseDoubleClick 이벤트에 아래코드 입력
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) { this.Show(); this.WindowState = FormWindowState.Normal; }