By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Refreshing a form whose graphics is corrupted

P: n/a
How do you force a form to refresh itself if the contents of the form become
corrupted? For example, while moving a second form over the first, I want to
force a refresh of the first.
--
Steve
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Steve,

The form should refresh itself automatically. If it is not, then it
indicates that you are probably performing painting operations on the form
outside of the OnPaint method or the Paint event handler.

If you are going to perform painting operations on a form (and force
your own refreshes), then what you need to do is set the state in your
object to give you the information you need while you paint (so that in your
paint algorithm you have everything you need), and then call the Invalidate
method. This will cause your paint routine to be called, from which you can
gather the information you need to render your form correctly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Teeples" <St**********@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
How do you force a form to refresh itself if the contents of the form
become
corrupted? For example, while moving a second form over the first, I want
to
force a refresh of the first.
--
Steve

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.