newbie's question need help

  • Thread starter Thread starter Alien
  • Start date Start date
A

Alien

hi guys.
i have a question here. in the framework2.0. each control has a rendermode
property. we can customerize these control (draw the control ourselves) by
override these render class.
But why we do that instead of directly overriding the control's paint
event( like onpaint and onpaintbackground)? what's the difference between
these two?

cheers
alien
 
Alien said:
hi guys.
i have a question here. in the framework2.0. each control has a rendermode
property. we can customerize these control (draw the control ourselves) by

I could only find a RenderMode property on the toolstrip, is it
available on other controls as well?
But why we do that instead of directly overriding the control's paint
event( like onpaint and onpaintbackground)? what's the difference between
these two?

One example would be that a render style might be contained in an
external .dll or created by a 3rd party. If you wanted the style to be
changeable by the user, you might use this method. If you hard code
the rendering in the OnPaint method, then this would be more difficult
or impossible.
 
Back
Top