I have a .bmp that I want to use as the form background and anchor it
to the bottom-right corner of the form.

I did this, but it tiles the image instead:


this.BackgroundImage = Image.FromFile( @".\MyImage.bmp" );


I only want to show a single image. How to do that?

Thanks.

Re: Center Single Bitmap Background? by Bob

Bob
Mon Apr 26 06:48:53 CDT 2004

Override the OnPaintBackground and explicitly draw the image stretched to
the form.

If you want to keep the aspect ratio of the image true see the GDI+ FAQ for
details on how to find the best-fit for an image.

--
Bob Powell [MVP]
Visual C#, System.Drawing

All you ever wanted to know about ListView custom drawing is in Well Formed.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*

The GDI+ FAQ: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41

*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*RSS*





"localhost" <primpilus@cohort.ces> wrote in message
news:7qrp805a8q87dtbu7813vghgtou63smgjr@4ax.com...
>
> I have a .bmp that I want to use as the form background and anchor it
> to the bottom-right corner of the form.
>
> I did this, but it tiles the image instead:
>
>
> this.BackgroundImage = Image.FromFile( @".\MyImage.bmp" );
>
>
> I only want to show a single image. How to do that?
>
> Thanks.
>
>
>
>
>