1

I used the following method to successfully make the window transparent, but some windows will have black edges, how should I solve it

WindowApi.SetWindowLong(winPtr, -20, WindowApi.GetWindowLong(winPtr, -20) | 524288);
WindowApi.SetLayeredWindowAttributes(winPtr, 0, checked((uint)config.Transparency), 2);

enter image description here

I tried the following methods to judge, although there is no black edge, but it can't make the window transparent,What should I do to make the window transparent and have no black edges

WindowApi.GetWindowLong(winPtr, -20)
aybe
  • 15,516
  • 9
  • 57
  • 105
kuse j
  • 11
  • 2
  • If you want transparent windows, use WPF or some other XAML equivalent. Gone are the days of hoki "set transparent color" which was always hit or miss. –  Dec 16 '22 at 07:02
  • My program is to make other windows transparent instead of making itself transparent – kuse j Jul 27 '23 at 05:54

0 Answers0