Hola, tengo un Bitmap con varios botones y quisiera sacar cada uno para un
Bitmap independiente. Me gustaría que me comentarais si hay alguna forma
mejor de hacerlo que la que actualmente utilizo:
//Bitmap con todos los botones
bm=new Bitmap(GetType(),"botones.bmp");
//extraer primer botón
bmNada=new Bitmap(16,16);
Graphics grfx=Graphics.FromImage(bmNada);
Rectangle rect=new Rectangle(0,16*0,16,16);
grfx.DrawImage(bm,0,0,rect,GraphicsUnit.Pixel);
grfx.Dispose();
//extraer último botón
bmSinDescubrir=new Bitmap(16,16);
grfx=Graphics.FromImage(bmSinDescubrir);
rect.Y*15;
grfx.DrawImage(bm,0,0,rect,GraphicsUnit.Pixel);
grfx.Dispose();
Gracias y Un Saludo.
Leer las respuestas