Friday, November 21, 2008

Set image as Form background in Windows Mobile.

In Windows Application we can set an image as a Form background easily as there exists a property of the Form named “FormBackgroundImage”. But in Windows Mobile Application Forms does not have this type of property. So, here if we want to set an image as a Form background then we can use a PictureBox Control having the same size as the Form and set an image in that PictureBox. But the problem is that after adding the PictureBox Control to the Form if we add any control dynamically to that Form, it will not be visible as the PictureBox control overlaps on it. So this technique is not good. Another technique is, we can use DrawImage method to set an image as Form background. Here we can easily add controls dynamically to the Form; the controls will remain visible.

No comments: