更改DAtetime选取器的颜色 [英] Change color of DAtetime picker
本文介绍了更改DAtetime选取器的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello Experts,
我一直试图在某些条件下更改datetimepicker控件的颜色。但没有通过那里。有人可以帮我吗?
Hello Experts,
I have been trying to change the color of datetimepicker control on certain conditions. But didn't get through there. Could someone help me with this please?
For Each control As Control In container.Controls
If control.HasChildren Then
colourControl(control)
End If
'Which control do we change
Dim datepicker As DateTimePicker = TryCast(control, DateTimePicker)
If Not datepicker Is Nothing Then
'change the background color
datepicker.CalendarTitleForeColor = Color.Turquoise
datepicker.
control.Invalidate()
End If
Next
推荐答案
请参阅此CodeProject文章: 使用BackColor的DateTimePicker [ ^ ]。
-SA
Please see this CodeProject article: A DateTimePicker with working BackColor[^].
—SA
这篇关于更改DAtetime选取器的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文