namespace WindowsFormsApplication_NotifyEx
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_SizeChanged(object sender, EventArgs e)
{
if(this.WindowState==FormWindowState.Minimized)
{
this.Hide();
this.notifyIcon1.Visible = true;
}
}
//右下角圖示按兩下滑鼠指標
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.Show();
this.WindowState = FormWindowState.Normal;
this.notifyIcon1.Visible = false;
}
}
}
C# 讓表單執行時最大化、最小化、預設大小、最上層顯示
https://ithelp.ithome.com.tw/articles/10029790
http://cowbaycoding.blogspot.com/2017/02/c.html
沒有留言:
張貼留言