Windows – Set background image for forms windows mobile

windows-mobile

I am new to windows mobile. I need to set a background image for the form but i can see only the option to set background colour. Also i tried to set background image for tab control there also i didnt see any option to set background image. How can i set the background image.

Thanks,

Best Answer

Override OnPaint and draw in your own image. Something like this:

protected override void OnPaint(PaintEventArgs e)
{
    base.OnPaint(e);
    e.Graphics.DrawImage(myBackGroundBitmap, 0, 0);
}

Of course you need to load that image, and you may want to tile, center or scale it, but the process is really simple.

Related Topic