Powershell中的透明组合框

时间:2015-04-21 13:57:18

标签: forms powershell

需要帮助。想为我的表格制作透明的comboBox,但不知道如何。

Add-Type -AssemblyName System.Windows.Forms

$Form = New-Object system.Windows.Forms.Form
$comboBox = New-Object Windows.Forms.ComboBox
$comboBox.Size = New-Object Drawing.Size(200, 30)
$comboBox.Location = New-Object Drawing.Point(10, 10)
# What to write here for transparent?

$Form.Add_Shown({$Form.Activate()})
$result = $Form.ShowDialog()

1 个答案:

答案 0 :(得分:1)

PowerShell ComboBoxs不支持透明背景颜色。

当我使用SAPIEN's PowerShell Studio尝试创建透明combobox时,我收到以下错误:

enter image description here

但您可以将combobox设置为您喜欢的任何其他颜色。