C#托盘程序

程序引用来自:
http://community.csdn.net/Expert/topic/3265/3265446.xml?temp=9.060305E-02
 1private 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
posted @ 2005-06-28 09:17  jhtchina  阅读(1229)  评论(0)    收藏  举报