简体   繁体   English

如何在用户控件上创建不可见区域

[英]how do I create invisible regions on a user control

I would like to make my user control have invisible areas like the areas that surround a circle or an irregular shape. 我想使用户控件具有不可见的区域,例如围绕圆形或不规则形状的区域。 I have seen this done with a system.windows.form but not with a system.windows.form.usercontrol. 我已经看到这是通过system.windows.form完成的,而不是通过system.windows.form.usercontrol完成的。 How is this done? 怎么做?

.net 2.0,c#,winform .NET 2.0,C#,WinForm

You can set the control's Region to an irregular GraphicsPath . 您可以将控件的Region设置为不规则的GraphicsPath Here's an article that shows how to create irregular shaped menuitems 这是一篇文章,展示了如何创建不规则形状的菜单项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM