Closing modal dialog causes main window to flash/flicker

G

Guest

Hello and thanks for any help
I've noticed that my main application window has a bad Flash/Flicker sometimes when I close a modal dialog box. Sometimes it also loses focus, and gets placed behind another window that was not originally on top. I perform the dispose inside of the dialog, for instance when a user clicks on the Ok button as follows

private void okButton_Click(object o, EventArgs e

/*Perfrom some action*
this.Dispose()


Does anyone know why this is happening? Thanks.
 
G

Guest

Thanks for the response Claire,

That seemed to do the trick and things close a lot cleaner. I guess the Close() methods forces a paint before other calculations are done or something. Well, either way, thanks alot.

Jason Agee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top