我如何用一个按钮制作透明表格? [英] How i make transparent form with one button ?

查看:141
本文介绍了我如何用一个按钮制作透明表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有一个疑问。如何用一个按钮制作透明表格。我只需要显示按钮。这有可能吗?谢谢。

Hello ,

I have one doubt .How i make transparent form with one button .I need to display only Button . Is that possible or not ? Thanks .

推荐答案

这将是一件非常奇怪的事情,但是......



你可以做到,但不是通过透明度。你可以(比如说,暂时)在你的按钮周围创建一个表单的 Region 一个小矩形(甚至是非矩形区域)。它不会调整表单的大小。不仅切出表单的部分将是透明的,即使对于鼠标也是透明的,因此表单将表现为表单的片段,其余部分都被删除。顺便提一下,这是制作非矩形形式的方法,形式可能非常复杂,因为你可以在逻辑上组合区域。



你所需要的只是这: http://msdn.microsoft.com/en-us/ library / system.windows.forms.control.region.aspx [ ^ ]。



创建一些所需的区域对象并为其指定属性地区



-SA
It would be a pretty weird thing, but…

You can do it, but not via transparency. You can (say, temporarily) make a form's Region a small rectangle (or even non-rectangular region) around your button. It won't resize the form. Not only cut out parts of the form will be transparent, they will be transparent even for mouse, so the form will behave as a fragment of a form, with all of the rest cut out. This is the method of making non-rectangular forms, by the way, and the form can be quite complicated, as you can logically combine regions.

All you need is this: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.region.aspx[^].

Create some desired region object and assign it the the property Region.

—SA


这篇关于我如何用一个按钮制作透明表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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