Vista中的透明命令提示符?


Answers:


11

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


控制台是一个很棒的程序。强烈推荐。
Weegee

很酷,看起来它最近有活动。上次检查时,我认为这是一个失败的项目。
Duckworth

我尝试了几个小时,但并不太喜欢它。我认为是缺少“选择+输入”来复制和右键单击粘贴的原因,这使我放弃了它。
OscarRyz

在Vista64上进行了尝试,控制台中没有文本。我可以键入,并且它会像显示文本一样移动光标,但是没有明显变化。
桑普森2009年

@Oscar Reyes-我已配置Console 2.0+以执行您想要的操作。
Umber Ferrule,2010年


1

要使所有当前运行的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 }'

0

可用的“将透明度应用于任何随机窗口”实用程序比您可以动摇的要多。Google试一试。您可以在几乎所有窗口(包括控制台)上调整透明度。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.