C#托盘程序
程序引用来自:
http://community.csdn.net/Expert/topic/3265/3265446.xml?temp=9.060305E-02
http://community.csdn.net/Expert/topic/3265/3265446.xml?temp=9.060305E-02
1
private void ShowHideWindow(bool isShow)
2
{
3
if(isShow)
4
{
5
if(this.ShowInTaskbar==false)
6
{
7
this.ShowInTaskbar = true;
8
this.Show();
9
this.WindowState = FormWindowState.Normal;
10
}
11
else
12
{
13
if(this.WindowState == FormWindowState.Minimized)
14
{
15
this.WindowState = FormWindowState.Normal;
16
}
17
}
18
this.Activate();
19
}
20
else
21
{
22
if(this.ShowInTaskbar == true)
23
{
24
this.Hide();
25
this.ShowInTaskbar = false;
26
}
27
}
28
}
29
30
private void ShowHideWindow(bool isShow)2
{3
if(isShow)4
{5
if(this.ShowInTaskbar==false)6
{7
this.ShowInTaskbar = true;8
this.Show();9
this.WindowState = FormWindowState.Normal;10
}11
else12
{13
if(this.WindowState == FormWindowState.Minimized)14
{15
this.WindowState = FormWindowState.Normal;16
}17
}18
this.Activate();19
}20
else21
{22
if(this.ShowInTaskbar == true)23
{24
this.Hide();25
this.ShowInTaskbar = false;26
}27
}28
}29

30



浙公网安备 33010602011771号