Closing modal dialog causes main window to flash/flicker

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top