透明表格背景 [英] Transparent Form Background

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

问题描述

我试图通过 msdn 给出的解决方案将背景色设置为透明,但失败了有没有办法使背景透明

I tried to set backcolor to transparent by solution given at msdn but failed is there any way to make background transparent

http://msdn.microsoft.com/en-us/library/wk5b13s4(VS.71).aspx

推荐答案

是的,设置表单的 TransparencyKey 属性.使 BackColor 具有相同的值.您需要选择一种不会出现在表单其他任何地方的颜色.Color.Fuchsia 是一个不错的选择,它是一种混色.

Yes, set the form's TransparencyKey property. Make the BackColor the same value. You need to pick a color that won't appear anywhere else in the form. Color.Fuchsia is a good choice, it's a fuchsed-up color.

这对于启动画面来说不是一个好主意.拥有一个的点是用户可以看到它.链接的 MSDN 文章仅适用于(某些)子控件,不适用于表单.

This isn't a good idea for a splash screen. The point of having one is that the user can see it. The linked MSDN article is only appropriate for (some) child controls, not the form.

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

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