无边界表单-在任务栏中需要右键单击菜单 [英] Borderless Form - Need right click menu in taskbar
本文介绍了无边界表单-在任务栏中需要右键单击菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前有一个无边界表单,其showInTaskbar属性设置为true.现在,如果我右键单击任务栏,然后(像普通窗口一样)我希望显示还原/最小化/最大化/关闭"菜单.
有两种方法,
1.
运行时更改表格borderstyle
this .controlbox = true ; 此 .FormBorderstyle = fixedSingle;
2.
创建3个按钮&像下面这样编码
1.最大化将此行放入点击事件
此 .Maximized();
2.最小化将此行放入click事件中
此 .Minimized();
3.关闭将此行放入click事件中
此 .close();
祝您编码愉快!
:)
是的,但是您只需要拖放按钮并对其进行编码即可执行功能.
I currently have a borderless form whose showInTaskbar attribute is set to true. Now if i right click on the taskbar and (like normal windows) i want to have that Restore/Minimise/Maxmise/Close menu appear. Is there any way for this to appear when the FormBorderStyle is set to None?
解决方案
there are two ways,
1.
runtime change form borderstyle
this.controlbox=true; this.FormBorderstyle=fixedSingle;
2.
create 3 buttons & code it like below
1. maximize put this line in click event
this.Maximized();
2. minimize put this line in click event
this.Minimized();
3. close put this line in click event
this.close();
Happy Coding!
:)
yes it is possible but you will just have to drag and drop the buttons down annd code them to do your functions.
这篇关于无边界表单-在任务栏中需要右键单击菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文