在标题栏中添加自定义按钮 VB.NET [英] Adding a custom button in title bar VB.NET

查看:61
本文介绍了在标题栏中添加自定义按钮 VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道是否有可能使用 VB.NET 将自定义按钮添加到标题栏中.我在 Stack Overflow 上看到过很多这样的问题,但都没有得到肯定和有效的答案.

谁能帮我解决这个问题?我也在谷歌和其他网站上检查过,但它无法呈现.我希望代码能在 Windows XP、Windows Vista 和 Windows 7 上运行.

如果您能够提供一个有效的代码并且该按钮甚至必须能够接受点击事件并将其发布到它所在的表单上以进行某些操作,我将感激.>

提前致谢

解决方案

如果你指的是 winforms,我可以想到两种方法:

  • 隐藏标题栏并将其替换为您自己的,我不建议这样做.
  • 将按钮构建为一个非常小的表单,每次窗口移动时,您都将其停靠在正确的位置.

I was just wondering if there was a possible way to add a custom button into the title bar using VB.NET. I've seen many such questions on Stack Overflow but failed to get a sure-shot and a working answer.

Can anyone help me around with this issue? I've checked on Google and other website too but it fails to render. I want the code to work on Windows XP, Windows Vista and Windows 7.

I would be grateful if you will be able to give a working code and the button must even be able to accept click events and post it to the form it is on for some action.

Thanks in advance

解决方案

If you mean winforms, I can think of two ways to do this:

  • Hide the titlebar and replace it with your own, which I don't recommend.
  • Build the button as a very small form that you keep docked in the correct position every time your window moves.

这篇关于在标题栏中添加自定义按钮 VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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