简体   繁体   English

C#位图“跟随”透明表单

[英]C# Bitmap "following" Transparent Form

I have a transparent form by using我有一个透明的表格使用

this.BackColor = Color.Wheat;
this.TransparencyKey = Color.Wheat;
this.TopMost = true;

I am not entirely sure if you meant the following:我不完全确定您的意思是否如下:

int initial_x = 400, initial_y = 400;
Color color = Colors.Transparent;

if (this.Top >= 0 && this.Top < initial_x && this.Left >= 0 && this.Left < initial_y)
    color = Bitmap.GetPixel(initial_x - this.Top, initial_y - this.Left);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM