I have a two forms. The main form, and the other is where I put the background image. I set the main form transparent so you can see the background. I created another form for the background because I want only the contents in the main form to be scrolled, living alone the image. The problem is when I restore down the main form, the other form won't restore down. I used the OnSizeChanged event but it only have the Minimize, Maximize, and Normal function. It worked so far but only on the minimize and maximize function. Can anybody give me a code for making the second form follow whatever the main form do? Like for example when the main form is moved. Thank you for any help!
Asked
Active
Viewed 60 times
0
-
This is really a bad idea. Use OnPaint event on Your form to paint the image in the background and keep it position "fixed". – Grzegorz W Dec 15 '13 at 20:46
-
@GrzegorzW I hope to have the effects just like in twitter. The background is fixed. When you move the scrollbar it doesn't scroll along the contents so I made a separate form for the background. – user3105280 Dec 15 '13 at 20:57
-
Just use OnLocationChanged to make it follow. – Hans Passant Dec 15 '13 at 21:38