按需显示或隐藏标题栏 [英] Show or hide a title bar on demand

查看:38
本文介绍了按需显示或隐藏标题栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向我的 windows 窗体应用程序(用 vb.net 编写)添加一个选项,该选项将为用户提供隐藏菜单栏和标题栏的选项.我可以做菜单,但我不确定隐藏标题的最佳方法是什么.

I want to add an option to my windows form application (written in vb.net) that will give the user the option to hide the menu bar and the title bar. I can do the menu but i'm not sure what the best way is to hide the title.

我可以将 FormBorderStyle 更改为 none,但这是最好的方法吗?

I could just change the FormBorderStyle to none, but is that the best way of doing it?

干杯卢克

推荐答案

从此页面,在写的时候做:

form1.borderstyle = 0 (None), 1 (Fixed Single), 2 (Sizeable), 3 (Fixed Dialog), 4 (Fixed Toolwindow), 5 (Sizeable Toolwindow)

form1.borderstyle = 0 (None), 1 (Fixed Single), 2 (Sizeable), 3 (Fixed Dialog), 4 (Fixed Toolwindow), 5 (Sizeable Toolwindow)

但是,在运行时打开/关闭要困难得多,请参阅推理和如何操作的示例这里

However, to turn on/off at runtime is much harder, see the reasoning and the example of how to do so Here

这篇关于按需显示或隐藏标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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