Hi Christian,
To avoid flickering on closing the application, we can use the LockWindowUpdate interop call in the form closing event.
1) We have to import the required assemblies for the LockWindowUpdate interop call
[System.Runtime.InteropServices.DllImportAttribute("user32.dll")]
private static extern bool LockWindowUpdate(Int64 windowHandle);
2) Then we have to call LockWindowUpdate in the form closing event.
void VSMainForm_FormClosing(object sender, FormClosingEventArgs e)
{
LockWindowUpdate(this.Handle.ToInt64());
}
Please have a look at the modified VS_Demo2005 sample attached and let me know if this helps.
Regards,
Golda
VSDemo.zip