N
Nathan Carroll
The following works but would it make any sense to paint within the
TextChanged procedure instead and if how do I get at control graphics from
there?
Protected Overrides Sub OnPaint(ByVal pe As
System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(pe)
ControlPaint.DrawBorder3D( _
pe.Graphics, _
Me.ClientRectangle, _
Border3DStyle.Sunken)
Dim fnt As New Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Point)
pe.Graphics.DrawString(Me.Text, fnt, Brushes.Black, 0, 0)
End Sub
Private Sub datetimepicker_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) _
Handles MyBase.TextChanged
Me.Invalidate()
'repaint it here
'or force repaint
End Sub
TextChanged procedure instead and if how do I get at control graphics from
there?
Protected Overrides Sub OnPaint(ByVal pe As
System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(pe)
ControlPaint.DrawBorder3D( _
pe.Graphics, _
Me.ClientRectangle, _
Border3DStyle.Sunken)
Dim fnt As New Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Point)
pe.Graphics.DrawString(Me.Text, fnt, Brushes.Black, 0, 0)
End Sub
Private Sub datetimepicker_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) _
Handles MyBase.TextChanged
Me.Invalidate()
'repaint it here
'or force repaint
End Sub