public static ToolboxIcon CreateToolboxIcon(Bitmap bm) { ToolboxIcon icon = new ToolboxIcon(); for (int x = 0; x < ToolboxIcon.WIDTH; ++x) { for (int y = 0; y < ToolboxIcon.HEIGHT; ++y) { icon.SetPixel(x, y, bm.GetPixel(x, y)); } } return icon; }
public static ToolboxIcon CreateToolboxIcon(Bitmap bm) { ToolboxIcon icon = new ToolboxIcon(); for (int x = 0; x < ToolboxIcon.WIDTH; ++x) { for (int y = 0; y < ToolboxIcon.HEIGHT; ++y) { icon.SetPixel(x, y, bm.GetPixel(x, y)); } } return icon; }