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