nikel
01-03-2010, 22:36
ciao ragazzi..
per mettere un immagine di sfondo nella form ho trovato questo codice
assembly asm = Assembly.GetExecutingAssembly();
bitmap backgroundImage = new Bitmap(asm.GetManifestResourceStream("image.bmp"));
e.Graphics.DrawImage(backgroundImage, this.ClientRectangle,
new Rectangle(0, 0, backgroundImage.Width, backgroundImage.Height),
GraphicsUnit.Pixel);
però funziona solo se l'immagine è "embedded" nell'applicazione.. mentre io devo caricarla da file....
come posso fare?
grazie!
ah dimenticavo niente metodo form.backgroundimage perchè non c'è su WM ;)
per mettere un immagine di sfondo nella form ho trovato questo codice
assembly asm = Assembly.GetExecutingAssembly();
bitmap backgroundImage = new Bitmap(asm.GetManifestResourceStream("image.bmp"));
e.Graphics.DrawImage(backgroundImage, this.ClientRectangle,
new Rectangle(0, 0, backgroundImage.Width, backgroundImage.Height),
GraphicsUnit.Pixel);
però funziona solo se l'immagine è "embedded" nell'applicazione.. mentre io devo caricarla da file....
come posso fare?
grazie!
ah dimenticavo niente metodo form.backgroundimage perchè non c'è su WM ;)