Vista 中的透明命令提示符?

Vista 中的透明命令提示符?

在 Vista 或 Windows 7 中是否可以有一个稍微透明的命令提示符窗口?

有第三方替代品吗?

答案1

我喜欢安慰, 它支持透明度以及选项卡式命令提示符。

答案2

如果你想要玻璃般的航空效果,你可以使用玻璃CMD

答案3

为了使所有当前正在运行的 cmd 和 powershell 窗口透明,请在 powershell 终端中运行此命令(运行此命令后打开的窗口将不透明,并且您的系统不会被修改):

$user32 = Add-Type -Name User32 -Namespace Win32 -PassThru -MemberDefinition '[DllImport("user32.dll")]public static extern int GetWindowLong(IntPtr hWnd, int nIndex);[DllImport("user32.dll")]public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);[DllImport("user32.dll", SetLastError = true)]public static extern bool SetLayeredWindowAttributes(IntPtr hWnd, uint crKey, int bAlpha, uint dwFlags);'
Get-Process | Where-Object { @('powershell', 'cmd') -contains $_.ProcessName } | % {$user32::SetWindowLong($_.MainWindowHandle, -20, ($user32::GetWindowLong($_.MainWindowHandle, -20) -bor 0x80000));$user32::SetLayeredWindowAttributes($_.MainWindowHandle, 0, 200, 0x02)}

使您的 powershell 终端窗口始终透明(这会改变您的用户特定的 powershell 配置文件):

if (-not Test-Path -Path $profile) { New-Item -path $profile -type file -force }
Add-Content -Path $profile -Value '$user32 = Add-Type -Name ''User32'' -Namespace ''Win32'' -PassThru -MemberDefinition ''[DllImport("user32.dll")]public static extern int GetWindowLong(IntPtr hWnd, int nIndex);[DllImport("user32.dll")]public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);[DllImport("user32.dll", SetLastError = true)]public static extern bool SetLayeredWindowAttributes(IntPtr hWnd, uint crKey, int bAlpha, uint dwFlags);'''
Add-Content -Path $profile -Value 'Get-Process | Where-Object { @(''powershell'', ''cmd'') -contains $_.ProcessName } | % { $user32::SetWindowLong($_.MainWindowHandle, -20, ($user32::GetWindowLong($_.MainWindowHandle, -20) -bor 0x80000)) | Out-Null;$user32::SetLayeredWindowAttributes($_.MainWindowHandle, 0, 200, 0x02) | Out-Null }'

答案4

相关内容