无边框形式C#透明边框 [英] C# transparent border for borderless form

查看:276
本文介绍了无边框形式C#透明边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造一个无边界的形式,我想自定义边框添加到它。当我添加的背景的形式然而,它不显示良好,它是不透明的。

I'm creating a borderless form and I want to add a custom border to it. When I add the background for the form however, it doesn't show well, and it is not transparent.

这是我想为我的境界:
使用什么

This is what I want to use as my border.:

当我设置窗体的透明度白影消失了,我不知道该怎么做。

When I set the Form's transparency for White the shadow disappears, I'm not sure what to do.

推荐答案

好了,所以我被骗了一点,但我所做的只不过是覆盖的CreateParams绘制阴影效果,即使它是一个无国界的窗口。它正是我想要的,所以我用它去了。结果
感谢所有帮助!

Okay so I cheated a bit but what I did was simply overriding the CreateParams to draw dropshadow even though it's a borderless window. It does exactly what I wanted so I went with it.
Thanks for all the help!

这篇关于无边框形式C#透明边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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