如何保持形式标题栏中的帮助(?)按钮和最大化按钮。 [英] How to keep both help(? ) button and maximize button in form title bar.

查看:104
本文介绍了如何保持形式标题栏中的帮助(?)按钮和最大化按钮。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的要求,我需要同时提供帮助按钮和最大化&我的Windows窗体标题栏中的关闭按钮。



我可以使用表单属性进行搜索。但我可以只有一个选项可以帮助或最大化。



请帮助我实现这个场景。



提前致谢



我的尝试:



使用Windows窗体属性选项我已经尝试了,但没有得到解决。

解决方案

对不起,这是不可能的。在支持.NET框架的Windows API级别下,无法使用帮助按钮和最小/最大按钮创建窗口。



请参阅扩展窗口样式 [ ^ ]并向下滚动到WS_EX_CONTEXHELP的条目,其中显示 WS_EX_CONTEXTHELP不能与WS_MAXIMIZEBOX或WS_MINIMIZEBOX样式一起使用



Alan。


唯一的方法我知道是创建你自己的(自定义)表格。

- 将FormBorderStyle切换为无

- 在你需要的地方创建你需要的按钮

- 创建自己的标题栏

- 可能为新的设计和行为添加一些属性



现在来自此表格。


尝试使用HelpButton = True和Max imizeBox和MimizeBox都设置为False。



请检查此链接https://stackoverflow.com/questions/11140090/add-help-button-but-keep -maximize和 - 最小化

In my requirement I need to have both help button and Maximize& Close buttons in my Windows Form title bar.

I can search using form properties. But I could able to have only one option either help or Maximize.

Kindly help me to achieve this scenario.

Thanks in advance

What I have tried:

Using Windows Form Properties option I have tried, but not get solved.

解决方案

Sorry it's not possible. Down at the windows API level, which underpins the .NET framework, a window cannot be created with both a help button and the min/max buttons.

See Extended Window Styles [^] and scroll down to the entry for WS_EX_CONTEXHELP where it says WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles.

Alan.


The only way I know is to create your own (customized) Form.
- Switch FormBorderStyle to None
- create the Button's you need at the place you need
- create your own Titlebar
- perhaps add some Properties for the new Design and Behaviour

and now derive from this Form.


Try with HelpButton = True and MaximizeBox and MimizeBox are both set to False.

Please check this link https://stackoverflow.com/questions/11140090/add-help-button-but-keep-maximize-and-minimize


这篇关于如何保持形式标题栏中的帮助(?)按钮和最大化按钮。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆