Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Window Opacity ControlNew to Visual Studio Code? Get it now.
Window Opacity Control

Window Opacity Control

域言

|
49 installs
| (0) | Free
Adjust IDE window opacity via the Windows API. Applies to all visible main windows (local and Remote-SSH), with keybindings and a status bar control.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Window Opacity Control

中文 | English


中文

使用 Windows API 调整 IDE 窗口透明度,让代码窗口半透明,方便对照参考文档或桌面内容。

界面文案跟随 VS Code 显示语言(简体中文 / English),无需手动切换。

效果预览(透明度 200 · 主题 GitHub Dark · 蓝色壁纸)

效果预览

功能特性

  • 调整窗口透明度:支持 0(全透明)~ 255(完全不透明)的透明度范围。
  • 所有可见主窗口生效:本地与 Remote-SSH 窗口同步生效,无需逐个窗口设置。
  • 独立配置:透明度值可独立配置,重启后自动恢复。
  • 快捷键调节:内置快捷键快速降低 / 提高透明度。
  • 状态栏调节:状态栏实时显示当前透明度,点击即可输入数值精确设置。
  • 兼容旧配置:未设置时自动沿用旧的 opacityControl.opacity 配置值。

使用方法

快捷键

快捷键 功能
Ctrl + Alt + Z 降低窗口透明度
Ctrl + Alt + C 提高窗口透明度

状态栏

点击状态栏右侧的「透明度: xxx」图标,输入 0 ~ 255 的数值即可精确设置。

设置项

设置项 类型 默认值 说明
windowOpacity.opacity number 255 窗口透明度 (0 ~ 255,255 表示完全不透明)
windowOpacity.step number 5 每次调整的步长 (1 ~ 255)

可在设置界面搜索「Window Opacity Control」进行配置。

工作原理

扩展通过 PowerShell 调用 Windows user32.dll 的 Win32 API,将当前 IDE 进程的所有可见主窗口设置为分层窗口(Layered Window),并调用 SetLayeredWindowAttributes 设置透明度,不依赖任何第三方库。


English

Adjust IDE window opacity via the Windows API — make the code window translucent so you can read reference material or desktop content behind it.

UI text follows the VS Code display language (English / Simplified Chinese); no manual switch needed.

Preview (opacity 200 · GitHub Dark theme · blue wallpaper)

Preview

Features

  • Adjustable window opacity: full range from 0 (fully transparent) to 255 (fully opaque).
  • All visible main windows: local and Remote-SSH windows are updated together — no need to configure each window.
  • Configurable: the opacity value is a normal VS Code setting and is restored after a restart.
  • Keybindings: quick decrease / increase.
  • Status bar control: shows the current opacity; click it to type an exact value.
  • Backward compatible: falls back to the legacy opacityControl.opacity setting when unset.

Usage

Keybindings

Keybinding Action
Ctrl + Alt + Z Decrease window opacity
Ctrl + Alt + C Increase window opacity

Status bar

Click the Opacity: xxx item on the right side of the status bar and enter a value between 0 and 255.

Settings

Setting Type Default Description
windowOpacity.opacity number 255 Window opacity (0 ~ 255, 255 means fully opaque)
windowOpacity.step number 5 Step size for each adjustment (1 ~ 255)

Search for "Window Opacity Control" in the Settings UI to configure them.

How it works

The extension uses PowerShell to call the Win32 APIs in Windows user32.dll: it turns every visible main window of the current IDE process into a layered window and calls SetLayeredWindowAttributes to apply the opacity. No third-party libraries are required.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft