Bmp分割 类似 16*16 图标的类

WuZongBo 2008-01-09 08:25:43
Bmp分割 类似 16*16 图标的类,以前有个类没留好,现在找不到了,不想自己写浪费时间,哪位有现成的贡献下,谢谢!

越精制的类越好!
...全文
112 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lalac 2008-01-10
  • 打赏
  • 举报
回复
ImageList.Images.AddStrip(Image):

将指定图像的图像条添加到 ImageList。

命名空间:System.Windows.Forms
程序集:System.Windows.Forms(在 system.windows.forms.dll 中)

参数
value
一个 Bitmap,它具有要添加的图像。

返回值
新添加的图像的索引,如果不能添加图像,则为 -1。

备注
从给定图像的宽度推导出要添加的图像数。
条是单个图像,它被视为多个并排排列的图像。

下面的示例演示如何使用 AddStrip。若要运行此示例,请将下面的代码粘贴到包含一个名为 imageList1 的 ImageList 和一个按钮的 Windows 窗体中,并在处理此按钮的 Click 事件时调用此示例中的 AddStripToCollection 方法。

public void AddStripToCollection()
{
// Add the image strip.
Bitmap bitmaps = new Bitmap(typeof(PrintPreviewDialog), "PrintPreviewStrip.bmp");
imageList1.Images.AddStrip(bitmaps);

// Iterate through the images and display them on the form.
for (int i = 0; i < imageList1.Images.Count; i++) {

imageList1.Draw(this.CreateGraphics(), new Point(10,10), i);
Application.DoEvents();
System.Threading.Thread.Sleep(1000);
}
}
WuZongBo 2008-01-09
  • 打赏
  • 举报
回复
ImageList 怎么导
lalac 2008-01-09
  • 打赏
  • 举报
回复
用ImageList就可以了,内部就带这个功能了。

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧