如何在不设置.net(vb.net或vba)中的TransparencyKey的情况下通过面板打洞 [英] how to you make a hole on from with a Panel without setting TransparencyKey in a .net (vb.net or vba)

查看:183
本文介绍了如何在不设置.net(vb.net或vba)中的TransparencyKey的情况下通过面板打洞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Panel2.Parent = My.User.desktop ???
Panel2.BackColor = Color.Transparent
如何在不设置TransparencyKey的情况下通过Panel2钻一个漏洞.

Panel2.Parent = My.User.desktop ???
Panel2.BackColor = Color.Transparent
how to you make a hole on from with Panel2 without setting TransparencyKey.

推荐答案

它不起作用.即使有效,也不会真正破洞.

如果您修改窗体的Region(Windows),则可以打个洞.
如果这是System.Windows.Forms.Form,则只需将属性Region分配给带有孔的某些区域.
请参见带有代码示例的MSDN帮助页面: http://msdn.microsoft. com/en-us/library/system.windows.forms.control.region.aspx [
您可以创建区域,因此可以创建几乎任何形状的窗口,无论是否带有孔.

—SA
It cannot work. And even if it worked, it would not really make a hole.

You can make a hole if you modify Region of your form (windows).
If this is a System.Windows.Forms.Form, you just need to assign the property Region to some region with a hole.
See MSDN help page with code sample: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.region.aspx[^].

It will create a "real" hole: if you place your application in z-order on top of some other application, activate your application and click mouse in the hole, the application underneath will be activated.

You can create regions and hence windows of almost any shape, with holes or without them.

—SA


这篇关于如何在不设置.net(vb.net或vba)中的TransparencyKey的情况下通过面板打洞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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