Peter Kiers
asked on
Try out the WM_ERASEBKGND
Hi,
I have made a form called StickyNotes that keeps on flickering after resizing it.
So I try a lots of diffirent code that I have found on the internet to prevent this.
Now I want to try the WM_ERASEBKGND, but i get an error:
"The name 'Win32API' does not exist in the current context"
What do I have to declare to make this methode work?
Peter
I have made a form called StickyNotes that keeps on flickering after resizing it.
So I try a lots of diffirent code that I have found on the internet to prevent this.
Now I want to try the WM_ERASEBKGND, but i get an error:
"The name 'Win32API' does not exist in the current context"
What do I have to declare to make this methode work?
Peter
protected override void WndProc(ref Message m)
{
if (m.Msg == Win32API.WM_ERASEBKGND)
{
m.Result = new IntPtr(0);
return;
}
base.WndProc(ref m);
}
ASKER
Yes, it did for that problem, I had draw a borderline around the form.
But I haven't draw a border anymore.
Peter
But I haven't draw a border anymore.
Peter
Are you doing anything special (eg. Invalidate, Paint) - I have a form (with a number of controls on it) that I resize rapidly with the mouse - not a hint of flickering that I see.
ASKER
I have a borderless form with a devexpress component on it called GroupControl.
Its just like a standard panel but then with a diffirent appearance. The GroupControl
has a border. So I have it set to dock is fill. But when I resize the form, the borderline
of the groupcontrol flikkers.
Peter
Its just like a standard panel but then with a diffirent appearance. The GroupControl
has a border. So I have it set to dock is fill. But when I resize the form, the borderline
of the groupcontrol flikkers.
Peter
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AndyAinscow, your right.
Greetings,
Peter Kiers
Greetings,
Peter Kiers
There you accepted an answer to this problem of flickering - or did the accepted comments not work?