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 | 29 | 30 | 31 |
Tags
- jsp
- STS
- 컬럼명
- WebView
- 자바스크립트
- Apache Lucene
- asp.net
- 자바
- C#
- Maven
- javascript
- Web Service
- MANTIS
- Android
- TextBox
- scrollView
- decompiler
- html
- Redirect
- Eclipse
- MS-SQL
- Java
- Bootstrap
- 안드로이드
- varags
- SpringSource Tool Suite
- 웹뷰
- MSsql
- 이클립스
- 웹 서비스
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;
}