如何点击透明表格 [英] How to click on a Transparent form in

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

问题描述

我在 VB.Net 中制作了一个 ScreenCapture 程序.我已经有了没有边框代码的区域和拖动表单.但我的问题是我不能拖动一个透明的表单.

I made a ScreenCapture Program in VB.Net. I already have the Region and Dragging Forms without border's code. But my Problem is i cannot drag a form if it is transparent.

图片如下:

那个褪色的黑色部分是 Form1,是一个 MDI 容器.透明部分是我的 Form2 和 Childform.

That Faded Black part is the Form1 and is an MDI Container. The Transparent part is my Form2 and is the Childform.

我的问题:我如何拖动该子窗体?因为当我尝试点击它时,它只会点击它后面的东西.假设 Stackoverflow 的徽章按钮.任何人都可以帮助我吗?

My Question: How do i drag that child form? because when i try to click on it, it will just click the thing on whats behind it. Let's say that Badges button of Stackoverflow. Anyone Can help me with this?

如果您想尝试一下,这是我的文件.Try.zip

Here's my Files if you want to experiment with it. Try.zip

推荐答案

我认为更好的选择是使用常规表单,您可以在其下方放置内容(位图副本),因此看起来好像您是查看桌面,而您正在查看表单.然后您可以使用 GDI+ 或 DirectX 随意淡入或淡出区域,并且您的鼠标点击应该可以正常注册.

I think a better option would be to have a regular form, on which you would place contents underneath it (bitmap copy), so it appears as though you are looking at the desktop, while instead you are looking at the form. Then you can fade in, or fade out areas at will, using GDI+ or DirectX, and your mouse clicks should be registered just fine.

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

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