vb中图片框透明度
当我运行代码时,图片框具有背景颜色,即使我已在属性窗口中将背景颜色设置为透明。有什么想法吗?
When i run my code, the picture box has a background colour, even though I have set the background colour to transparent in the properties window. any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您将
PictureBox
重叠在其他一些控件上,并希望看透PictureBox
。这不是它的工作原理 - 具有透明背景的控件仅相对于其父控件是透明的,而不是其他控件。您可以通过覆盖表单的OnPaint
方法来使用 GDI+ 绘制它们:此外,似乎人们主要是在寻找此功能来制作游戏。你在做游戏吗?如果是这种情况,请在制作游戏之前学习图形。那里有很多很好的教程。
I assume you're overlapping a
PictureBox
over some other control and expecting to see through thePictureBox
. That's not how it works - controls with transparent backgrounds are only transparent relative to their parent, not other controls. You could draw them using GDI+ by overriding theOnPaint
method of your form:Also, it seems that people are mostly looking for this functionality to make a game. Are you making a game? Please learn graphics before making a game if this is the case. There are many good tutorials out there.