469,341 Members | 8,240 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,341 developers. It's quick & easy.

adding background image to form(windows mobile)

42
hi all..,
i'm new in windows mobile application...
i would like to kno if there exist any way to add a background image to "form"(windows mobile).
thanks in advance..
Oct 16 '08 #1
8 11720
RedSon
5,000 Expert 4TB
Have you searched MSDN?
Oct 16 '08 #2
libish
42
Have you searched MSDN?

yes i've searched msdn... there i found adding background image to buttons and all..
but what i need is to add a background image to "form" this i couldnt find..
Oct 17 '08 #3
RedSon
5,000 Expert 4TB
yes i've searched msdn... there i found adding background image to buttons and all..
but what i need is to add a background image to "form" this i couldnt find..
Well a button is technically a window so maybe you can try using the same strategy. What did you find on it?
Oct 17 '08 #4
LTCCTL
49
Hi,

You can add a picture box to the form, add image and set the dock property to fill, you can also use the property SizeMode as StretchImage.


hope this will help


Regards
LTCCTL
Oct 18 '08 #5
libish
42
hi all...
thanks for your reply.

i got a form, by default there is no background image. here i want to add an image as background, and top of this image i want some text box some buttons etc...

if i add an image in picture box, then i wont be able to add text boxes and buttons on top of it... that is why i'm in search of what i'm searching.
Oct 20 '08 #6
markmcgookin
648 Expert 512MB
hi all...
thanks for your reply.

i got a form, by default there is no background image. here i want to add an image as background, and top of this image i want some text box some buttons etc...

if i add an image in picture box, then i wont be able to add text boxes and buttons on top of it... that is why i'm in search of what i'm searching.
Yes you can, but in theory the buttons etc would be sitting on the picture box wouldn't they?

Can you not use Visual Studio's "Bring to Front" option on your textboxes to move them in front of the picture box?
Oct 20 '08 #7
libish
42
Yes you can, but in theory the buttons etc would be sitting on the picture box wouldn't they?

Can you not use Visual Studio's "Bring to Front" option on your textboxes to move them in front of the picture box?



thank you soo much for that suggestion....
it works...
Oct 20 '08 #8
I know this thread is is kinda old but just for the people still looking for it.

The above solution is what i used to use but its anoying to keep setting every control to the front one by one, and also while filling youre window it can be anoying not to select the form on an empty piece of form.

so here is the solution i came up with.

Expand|Select|Wrap|Line Numbers
  1. protected override void OnPaintBackground(PaintEventArgs e)
  2.         {
  3.             base.OnPaintBackground(e);
  4.             e.Graphics.DrawImage(YoureGraphicOrBitmapHere, 0, 0);
  5.         }
  6.  
The above will draw youre background in youre window and makes it not clickable.
Oct 13 '10 #9

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Aouizerat | last post: by
1 post views Thread by Chuck Anderson | last post: by
4 posts views Thread by iKiLL | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.