如何让透明图片框点击通过?

发布于 2024-12-26 03:52:06 字数 200 浏览 2 评论 0原文

我想让表单中的图片框透明并点击。

在此处输入图像描述

在上图中,黄色区域是图片框,红色区域是表单。表单区域应该是透明的,但不能点击。图片框应该是透明的并且可以点击。我怎样才能做到这一点?我正在 VB.net (VS2010,.NET 4) 中做我的项目

I want to make the picture-box in a form to be transparent and click through.

enter image description here

In the above image, yellow areas are the picture-boxes and Red area is the form. Form area should be transparent but not click through. Picture-boxes should be transparent and click-through. How can I achieve this ? I am doing my project in VB.net (VS2010,.NET 4)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笛声青案梦长安 2025-01-02 03:52:06

基本上,您需要使表单的背景不可见,而图片框则可见。如果我是对的,您可以使用以下代码使表单的背景不可见:

Public Sub InitializeMyForm()
     BackColor = Color.White
     TransparencyKey = BackColor
End Sub 

现在您可以为图片框或“红色区域”的单击事件添加代码以使其单击。

Basically you need to make the background of your form invisible where as picture boxes to be visible. If I am right you can use the following code to make the background of the form invisible:

Public Sub InitializeMyForm()
     BackColor = Color.White
     TransparencyKey = BackColor
End Sub 

Now you can add code for the click events of the picture boxes or the "Red Area" to make it click through.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文