本文介绍了如何在IDM等表单的标题栏中添加按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要隐藏我使用此代码隐藏的表单,

  private   void  notifyIcon1_MouseDoubleClick( object  sender,MouseEventArgs e)
{
.Show();
this .WindowState = FormWindowState.Normal;
}


如果(FormWindowState.Minimized == this .WindowState)
{
notifyIcon1.Visible = true ;
notifyIcon1.ShowBalloonTip( 1 );
this .Hide();
}
else if (FormWindowState.Normal == this .WindowState)
{
notifyIcon1.Visible = false ;
}





但我想在标题栏中添加一个按钮,如互联网下载管理器,它隐藏表格并修复它在系统托盘中,如果点击最小化,它将只是最小化,这里我的最小化按钮强制应用程序转到系统托盘

我怎么能像IDM一样实现IDM

解决方案



i want to hide the form i have used this code for hiding,

private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Show();
            this.WindowState = FormWindowState.Normal;
        }


if (FormWindowState.Minimized == this.WindowState)
           {
               notifyIcon1.Visible = true;
               notifyIcon1.ShowBalloonTip(1);
               this.Hide();
           }
           else if (FormWindowState.Normal == this.WindowState)
           {
               notifyIcon1.Visible = false;
           }



but i want to add a button in the title bar like internet download manager which hides the form and fix it in the system tray, and if minimize is clicked it will just be minimize, here my minimize button force the app to go to system tray
how can i achive that IDM like feature

解决方案



这篇关于如何在IDM等表单的标题栏中添加按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 03:33