检查ImageList中的图标 [英] Check for icon in ImageList

查看:85
本文介绍了检查ImageList中的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,


我有一个存储我的图标的ImageList控件。我需要做的是找到

out如果ImageList中的图标已经存在于ImageList中,那么我就不要输入它了两次
。我怎么能这样做?


提前致谢!

Hey guys,

I have an ImageList control that stores my icons. What I need to do is find
out if the icon at hand already exists in the ImageList so I dont enter it
twice. How can I do that?

Thanks in advance!

推荐答案

*" Juan Romero" <菊********* @ bowne.com> scripsit:
* "Juan Romero" <ju*********@bowne.com> scripsit:
我有一个存储我的图标的ImageList控件。我需要做的是找到
如果手头的图标已经存在于ImageList中,那么我两次都不要输入它。我怎么能这样做?
I have an ImageList control that stores my icons. What I need to do is find
out if the icon at hand already exists in the ImageList so I dont enter it
twice. How can I do that?




\\\

如果ImageList1.Images.Contains(Bitmap1)那么

...

否则

...

结束如果

///


-

Herfried K. Wagner [MVP]

< http://www.mvps.org/dotnet>



\\\
If ImageList1.Images.Contains(Bitmap1) Then
...
Else
...
End If
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


感谢您的回答。


VB.NET不支持contains方法。

什么我在图像列表中不是位图或图像,而是AN ICON。那是

为什么这么难。

还有其他想法吗?


提前致谢。


" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at>在消息中写道

news:eR ************** @ TK2MSFTNGP10.phx.gbl ...
Thanks for answering.

The contains method is not supported in VB.NET.
What I have in the image list is not a bitmap or image, but AN ICON. That is
why it is so difficult.
Any other ideas anyone out there?

Thanks in advance.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
*Juan Romero ; <菊********* @ bowne.com> scripsit:
* "Juan Romero" <ju*********@bowne.com> scripsit:
我有一个存储我的图标的ImageList控件。我需要做的是
找出ImageList中的图标是否已经存在于ImageList中,所以我不输入
两次。我怎么能这样做?
I have an ImageList control that stores my icons. What I need to do is find out if the icon at hand already exists in the ImageList so I dont enter it twice. How can I do that?



\\\
如果ImageList1.Images.Contains(Bitmap1)那么
......
其他
...
结束如果
///

-
Herfried K. Wagner [MVP]
< http:/ /www.mvps.org/dotnet>



\\\
If ImageList1.Images.Contains(Bitmap1) Then
...
Else
...
End If
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>



" Juan Romero" <菊********* @ bowne.com> schrieb
"Juan Romero" <ju*********@bowne.com> schrieb
感谢您的回答。

VB.NET不支持contains方法。
图像列表中的内容不是位图或图像,但是一个ICON。
这就是为什么它如此困难。
任何其他想法的人?
Thanks for answering.

The contains method is not supported in VB.NET.
What I have in the image list is not a bitmap or image, but AN ICON.
That is why it is so difficult.
Any other ideas anyone out there?



图像列表包含图像,而不是图标。图标不是图像。图像是

位图或图元文件。

-

Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


An imagelist contains images, not icons. An icon is not an image. Images are
Bitmaps or Metafiles.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


这篇关于检查ImageList中的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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