Resizing form using Appsettings Property Binding Screen Flicker (Urgent)

wstevens

Member
Joined
May 12, 2008
Messages
16
Location
South Africa PTA
Programming Experience
1-3
Hi all

I have a flickering form on resizing.

I created a form with one button anchored to the "Bottom,Right". I set the appsetting property binding for the form to client size. Thus allowing the last location to be saved in the resource file settings on close

I then set the app setting property location of the button. Thus allowing it to save the last location of the button in the resource file settings on close

Everything works fine except that on resizing in runtime the screen flickers and the button looks like it is being dragged on the form. It looks ugly.

I disabled only the button app setting property and then saved the button settings on save using code This seemed to solve the problem.

However saving the button and reloading its location with code is doing the exact same thing as using the app setting property binding location for the button. I am sure it should work.

I do however think that it might be tracking the button XY while dragging and this might be causing the flicker

Why is this occuring? Is this a bug in VS2005 Pro Edition?

Please try it and see what it does.

Thanks
 
While in theory the binding should work it doesn't in certain cases. Welcome to one of them. I'd suggest manually setting the form and button properties in the Load event handler and then saving them in the FormClosing event handler. That way nothing will happen on resizing.

You'll also need to consider what to do if the form is closed when it's maximised or minimised, because that will muck things up. You'll need to remember what the saize of the form was when its WindowState was last Normal.
 
Hi

I must admit that all the other properties seem to work fine for example minimise and miximize, resize, location startup. ITs only the controls on the form itself.

I will code the controls seperately. Thanks for your help
 
Back
Top