style(desktop-picker): 修改桌面选择器的透明样式并添加边框
将背景色改为 fuchsia 并设置透明键,添加绘制边框的 Paint 事件处理,提升视觉效果
This commit is contained in:
parent
4ad238ff37
commit
11fc88eec9
@ -43,8 +43,18 @@ $hl.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::None
|
||||
$hl.TopMost = $true
|
||||
$hl.ShowInTaskbar = $false
|
||||
$hl.StartPosition = [System.Windows.Forms.FormStartPosition]::Manual
|
||||
$hl.BackColor = [System.Drawing.Color]::Red
|
||||
$hl.Opacity = 0.35
|
||||
$hl.BackColor = [System.Drawing.Color]::Fuchsia
|
||||
$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) {
|
||||
if ($form.IsHandleCreated) {
|
||||
$GWL_EXSTYLE = -20
|
||||
|
||||
Loading…
Reference in New Issue
Block a user