The Lanham Factor

Balancing the Technology-Business Equation

  Home  |   Contact  |   Syndication    |   Login
  127 Posts | 2 Stories | 116 Comments | 106 Trackbacks

News

Article Categories

Archives

Post Categories

Image Galleries

BLOGS

Companies

My Articles

So in the ongoing saga of the Lords of Kobol reminding me that those two people are right and that I'm not smart nor a good developer...there is a new kid in town.  The new kid is a spoiled brat who sits in the corner and, with bottom lip firmly out, repeats "I will not fire the Paint event!  I won't! I won't! I won't! And you can't make me!"

me - "What about if I call Invalidate?"

kid - "NOPE!"

me - "What if I call Invalidate (True) on the user control?"

kid - "Not even then."

me - "Okay...what if I call Update after calling Invalidate (in various forms)?  How about then?  Then will you fire the Paint event?"

kid - "Nunh Unh."

(I'm getting desparate...the root of which is despair)

me - "I know.  How about Refresh?  Surely if I call Refresh you'll be a nice kid and fire the Paint event."

kid - (laughing) "Silly old man...I won't fire that event even if  you call ALL THREE!  You can even try invalidating a particular region of a particular control, calling any of those three (or all) on individual controls, or any combination and permutation of calls to get the form to refresh...but I won't fire the paint event.  I won't!  I won't!  I won't!"

So maybe someone out there can explain to me why the Paint event won't fire and/or why the OnPaint method never gets called.

posted on Friday, February 09, 2007 6:09 AM

Feedback

# re: Invalidate, Update, Refresh, Oh My! 3/16/2007 9:53 PM carlsonad
Are you overriding any methods and not calling base.SameMethod?

It's possible that the base method is the one that is calling OnPaint and if you override it and don't call the base method also OnPaint will never get called.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: