style(desktop-picker): 修改桌面选择器的透明样式并添加边框
将背景色改为 fuchsia 并设置透明键,添加绘制边框的 Paint 事件处理,提升视觉效果
This commit is contained in:
1 parent
4ad238ff37
commit
11fc88eec9
1 file changed
+12
-2
@@ -43,8 +43,18 @@ $hl.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::None
|
|||||||
$hl.TopMost = $true
|
$hl.TopMost = $true
|
||||||
$hl.ShowInTaskbar = $false
|
$hl.ShowInTaskbar = $false
|
||||||
$hl.StartPosition = [System.Windows.Forms.FormStartPosition]::Manual
|
$hl.StartPosition = [System.Windows.Forms.FormStartPosition]::Manual
|
||||||
$hl.BackColor = [System.Drawing.Color]::Red
|
$hl.BackColor = [System.Drawing.Color]::Fuchsia
|
||||||
$hl.Opacity = 0.35
|
$hl.TransparencyKey = [System.Drawing.Color]::Fuchsia
|
||||||
|
$hl.Add_Paint({
|
||||||
|
param($sender, $e)
|
||||||
|
$pen = New-Object System.Drawing.Pen([System.Drawing.Color]::FromArgb(255, 255, 32, 32), 3)
|
||||||
|
try {
|
||||||
|
$size = $sender.ClientSize
|
||||||
|
$e.Graphics.DrawRectangle($pen, 1, 1, ($size.Width - 3), ($size.Height - 3))
|
||||||
|
} finally {
|
||||||
|
$pen.Dispose()
|
||||||
|
}
|
||||||
|
})
|
||||||
function Set-ClickThrough($form) {
|
function Set-ClickThrough($form) {
|
||||||
if ($form.IsHandleCreated) {
|
if ($form.IsHandleCreated) {
|
||||||
$GWL_EXSTYLE = -20
|
$GWL_EXSTYLE = -20
|
||||||
|
|||||||
Reference in new issue
Block a user