G
Guest
Hello all.
I have created a control that subclasses Windows.Forms.Button.
I need to override the OnPaint method, in order to draw an image instead of
text. However, my OnPaint override is never called!
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
if (m_oImage != null)
{
//Code that pains Image ...
}
}
Any clues;
PS : I do not want to use OpenNetCF ButtonEx. I just need to add image
painting on the button and not all the other functionality ButtonEx provides.
I have created a control that subclasses Windows.Forms.Button.
I need to override the OnPaint method, in order to draw an image instead of
text. However, my OnPaint override is never called!
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
if (m_oImage != null)
{
//Code that pains Image ...
}
}
Any clues;
PS : I do not want to use OpenNetCF ButtonEx. I just need to add image
painting on the button and not all the other functionality ButtonEx provides.