图像背景透明度颜色 [英] Image backgroud transparency color

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

问题描述

我有一个按钮,我想把它放在一个表格上,实际上是一个

表格的面板。问题是它的透明度颜色是洋红色而我不能

找到一种让按钮看起来正确的方法。图像是一个问题

标记,但背后是洋红色。我已经在

的属性中寻找了一个设置按钮,它允许我设置透明度颜色,但我看到

没有。有人能告诉我如何做我想做的事。


Additonally。我认为我真正需要的不是一个按钮,而是一个带有相关图像的图片框对象。我想复制

外观(例如)Visual Studio Designer中属性

slideout的图标外观。不知何故,他们在那里得到了那些图标,

我想是通过放置一个带有相关图像的图片框。是/否?

无论如何,我希望在我的表格上有一个帮助图标(问号)

但没有洋红色背景。


如果有人可以提供帮助,我们将不胜感激。

I have a button that I would like to put on a form, actually a panel on a
form. The problem is that it''s transparency color is magenta and I can not
find a way to make the button look right. The image is that of a question
mark but behind it is magenta. I have looked for a setting in properties of
the button that will allow me to set the transparency color but I see
nothing. Could someone tell me how to do what I want.

Additonally. I think what I really need here is not a button but probably a
PictureBox object with an associated image. I would like to duplicate the
look and feel of the icons at the top of (for example) the properties
slideout in the Visual Studio Designer. Somehow they got those icons there,
I suppose it was by placing a picturebox with an associated image. Yes/No?
At any rate, I would like to have a help icon (a question mark) on my form
but without the magenta background.

If someone could help it would be appreciated.

推荐答案

>无论如何,我希望在我的表格上有一个帮助图标(问号)
> At any rate, I would like to have a help icon (a question mark) on my form
但没有洋红色背景。




您需要将图像加载到Drawing.Bitmap类中,然后使用

..MakeTransparent方法准备图像,然后将其设置为背景

属性为你的面板。

HTH


~

Jeremy



You need to load the image into a Drawing.Bitmap class, and then use the
..MakeTransparent method to prep the image, then set it as the background
property for your panel.
HTH

~
Jeremy


>您需要将图像加载到Drawing.Bitmap类中


对不起Jeremy,如何将图像加载到绘图位图类中?

你是在谈论在PictureBox的属性中做某事还是

你在谈论用代码做某事吗?如果有代码,如何和在

什么事件?


" Jeremy Cowles" < jeremy.cowles [NOSP @米] asifl.com>在消息中写道

news:i8 ******************* @ twister.tampabay.rr.com ...
>You need to load the image into a Drawing.Bitmap class

I''m sorry Jeremy, how does one load an image into a drawing bitmap class?
Are you talking about doing something in the properties of the PictureBox or
are you talking about doing something with code? If with code, how and in
what event?

"Jeremy Cowles" <jeremy.cowles[nosp@m]asifl.com> wrote in message
news:i8*******************@twister.tampabay.rr.com ...
无论如何,我想在我的
表格上有一个帮助图标(问号),但没有洋红色背景。
At any rate, I would like to have a help icon (a question mark) on my form but without the magenta background.


.MakeTransparent方法准备图像,然后将其设置为面板的背景属性。

HTH


Jeremy



You need to load the image into a Drawing.Bitmap class, and then use the
.MakeTransparent method to prep the image, then set it as the background
property for your panel.
HTH

~
Jeremy



>我很抱歉Jeremy,如何将图像加载到绘图位图类中?
> I''m sorry Jeremy, how does one load an image into a drawing bitmap class?
您是在谈论在PictureBox
的属性中做某事还是在谈论做某事用代码?如果使用代码,如何以及在什么事件中?
Are you talking about doing something in the properties of the PictureBox or are you talking about doing something with code? If with code, how and in
what event?




在表单加载之前的代码中,可能在构造函数中。我认为

应该是通过TransparentColor

属性支持透明色虽然...

~

Jeremy



In code before the form loads, maybe in the constructor. I think there is
supposed to be support for a Transparent color via the TransparentColor
property though...
~
Jeremy


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

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