C# resize all elements in form when resizing form
Posted
by vale4674
on Stack Overflow
See other posts from Stack Overflow
or by vale4674
Published on 2010-06-12T00:37:37Z
Indexed on
2010/06/12
0:42 UTC
Read the original article
Hit count: 779
NOTE: I can't put more than one hyperlink so i deleted letter "h" on begining of every link
I have this image as the background of the form: ttp://img811.imageshack.us/img811/3347/31886905.jpg
So my form looks like this: ttp://img823.imageshack.us/i/cisto.jpg/
When i resize it it looks like this: ttp://img820.imageshack.us/i/cistoumanjeno.jpg/
Now what I need to do is to put listeners on every rextangle like on the picture: ttp://img810.imageshack.us/img810/238/18887457.jpg
I made transparent panels and put them on form to match the rectangles on the image (on image, panels are green so you can see where they are): ttp://img809.imageshack.us/i/paneli.jpg/
but when I resize the form it turns like this: ttp://img810.imageshack.us/i/paneliumanjeno.jpg/
anchor and dock properties don't work because they rely on parent container and here rectangles are on background image.
QUESTION: I would like to do something like "relative-resize and position". Is that posible? So when I resize form, all the panels fits the rectangles on image.
© Stack Overflow or respective owner