它不能解决我的问题。我正在使用相同的方法来尝试实现透明度
public Form1()
{
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
InitializeComponent();
this.BackColor = Color.FromArgb(0, 0, 0, 0);
}
但这给出了灰色背景,不透明。如何获得真正透明的背景(注意,透明度键解决方案不提供透明背景,当我使用小于 255 的 alpha 通道进行绘制时,它与设置的表单背景颜色混合,而不是实际背景)?我想用 alpha < 255 绘制到屏幕的某些区域并与背景(而不是表单)混合。