Taskbar (Shell_TrayWnd) Transparency like in TranslucentTB using Win32 API

Jacob Mordon 225 Reputation points
2024-06-20T07:11:29.3033333+00:00

I'm trying to implement transparency for the taskbar (Shell_TrayWnd) in Windows, similar to the functionality that TranslucentTB has. However, in my implementation, the problem is that elements such as the Start button, search box, and attached programs also become transparent, which is not what I expected.

Used Win32 API functions such as SetWindowLong, SetLayeredWindowAttributes to set transparency. It made every element of Taskbar transparent.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,493 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,651 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,006 questions
{count} votes

Accepted answer
  1. Castorix31 85,806 Reputation points
    2024-06-20T08:19:43.2733333+00:00

    TranslucentTB calls SetWindowCompositionAttribute.

    You can see the source at https://github.com/TranslucentTB/TranslucentTB/tree/release

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.