Main form doesn't repaint until mouse moved

K

km

I've got a c# desktop app with various menu items that display modal dialogs
for changing app settings, etc.. Standard stuff.

After a particular dialog is closed, the main form doesn't repaint the area
that was covered by the child form until the user moves the mouse.

I can't see how this one form is different from the others, or what I may
have done to prevent the main form from repainting. Any suggestions on things
to check would be appreciated.
 
K

km

Hmm, seems the main form isn't really active (keyboard is not active), until
the mouse moves.
 
P

parez

I've got a c# desktop app with various menu items that display modal dialogs
for changing app settings, etc.. Standard stuff.

After a particular dialog is closed, the main form doesn't repaint the area
that was covered by the child form until the user moves the mouse.

I can't see how this one form is different from the others, or what I may
have done to prevent the main form from repainting. Any suggestions on things
to check would be appreciated.

I have a similar problem with a 3rd party control. After i close a
Dialog (MessageBox), it didnt repaint the control properly. To fix
the problem i called the refresh method of the control.
I think this could be a .net problem where it thinks it does not need
a repaint after a dialog is closed.
 
K

km

I found that the symptoms are not 100% consistant. Sometimes the main form
repaints just fine. But I also ended up having to do a refresh in the main
form after the child dialog closed.

I am certainly open to someone proving me wrong, but it sure seems like a
bug in the .net framework.
 

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