首页 > 解决方案 > Powershell DateTimePicker 不允许自定义样式/颜色

问题描述

示例图片

试图改变我的 DateTimePicker 的颜色。无论我改变什么,它们都保持默认颜色。这是我尝试过的,

    $BillDate.CalendarTitleBackColor    = 'Red' #'33, 35, 50' <- color I plan on using for background
    $BillDate.CalendarTitleForeColor    = 'Red'
    $BillDate.CalendarForeColor         = 'Red'
    $BillDate.BackColor                 = 'Red'
    $BillDate.CalendarTrailingForeColor = 'Red'
    $BillDate.CalendarMonthBackground   = 'Red'

我有

[System.Windows.Forms.Application]::EnableVisualStyles()
[void][reflection.assembly]::Load('System.Windows.Forms')
[void][reflection.assembly]::Load('System.Drawing')

补充说,也许我只是错过了其他东西?这是在 Powershell (PS Studio & ISE) 中构建的

标签: powershellwinformsdatetimepicker

解决方案


推荐阅读