I have made my ovn version of DateTimePicker. My control is inherit from
DateTimePicker

If i add the following code to the control:

In new I have added:
Me.SetStyle(ControlStyles.UserPaint, True)

And i have added the following procedure:

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)
End Sub

Then the DateTimePicker will not display correct.

Is there someone that know a solution on this problem?

Regards

Terje Myklebust
Norway

RE: Bug in DateTimePicker by TerjeMyklebust

TerjeMyklebust
Thu Aug 18 08:41:07 CDT 2005

The solution was:

Use "Me.Refresh()"