窗口形成关闭按钮放置在窗体右侧的窗口小部件关闭按钮 [英] windows form close button placement on right side of form like widgets close button
本文介绍了窗口形成关闭按钮放置在窗体右侧的窗口小部件关闭按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
i有一个胜利形式,我想在胜利形式的右侧放置关闭按钮,就像小部件一样。
关闭小部件我们按小部件右侧的关闭按钮。它与widget一起放置了平行面板。喜欢windows 7小工具。
现在我怎么能用寡妇形式做这件事。
是否有可能?
解决方案
您无法移动或轻松更改标准窗口组件,例如关闭按钮 - 我认为您将能够的唯一方式这样做是删除标准组件并在您自己的代码中模拟它们。
在表单上的
> formborderstyle select none>然后创建一个你喜欢的按钮然后定位它
然后后面的代码是this.Close();或Application.Exit();
隐藏默认的Widget按钮并将labellink设为''X'',onClick事件代码将为''this.close''。
hi all ,
i have a win form , i want its close button placement on right side of the win form like widgets.
to close the widget we press the close button on the right side of the widget . it is placed parallel panel with widget. like windows 7 widgets.
now how can i do same with widows form.
is it possible?
解决方案
You can''t move or easily change the standard window components, such as the close button - I think the only way you are going to be able to do that is to remove the standard components and emulate them in your own code.
on the form > formborderstyle select none> then create a button that you like then position it
then the code behind is either this.Close(); or Application.Exit();
Hide the default Widget button and make a labellink as ''X'' and onClick Event code will be ''this.close''.
这篇关于窗口形成关闭按钮放置在窗体右侧的窗口小部件关闭按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文