什么等效于C#中的VB6.0的MaskColor属性 [英] What is equivalent of VB6.0's MaskColor property in C#

查看:110
本文介绍了什么等效于C#中的VB6.0的MaskColor属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VB 6.0中的MaskColor属性用于删除Image的背景色.在C#中我该怎么做?

The MaskColor property in VB 6.0 is used to remove the background color of an Image. How might I do the same in C#?

推荐答案

您可以使用

You can use MakeTransparent(Color color) for the bitmap image. example:

//convert the red color in the image into transparent.
((Bitmap)BackgroundImage).MakeTransparent(Color.Red);

这篇关于什么等效于C#中的VB6.0的MaskColor属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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