Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Anderes fenster transparent machen! (https://www.delphipraxis.net/76440-anderes-fenster-transparent-machen.html)

Goldesel 4. Sep 2006 16:11


Anderes fenster transparent machen!
 
Hallo,

ich denke mal, dass dies hier die richtige Rubrik ist.

Mich würde interessieren, ob es möglich ist, eine anderes Fenster, wie z.B. Excel o.ä. transparent darzustellen. Ich hoffe, dass mir da jemand weiterhelfen kann.

Vielen Dank
Jannik

Neutral General 4. Sep 2006 16:12

Re: Anderes fenster transparent machen!
 
Wie würde 3_of_8 sagen:

Such mal im Forum nach Hier im Forum suchentrans.pas

:mrgreen:

Gruß
Neutral General

Interceptor 4. Sep 2006 16:18

Re: Anderes fenster transparent machen!
 
Hast du den suchlink ausprobiert? :wink:
Zitat:

Zitat von Suche
Gehe zu Seite 1, 2, 3 ... 57, 58, 59 Weiter


Neutral General 4. Sep 2006 16:19

Re: Anderes fenster transparent machen!
 
Na gut :mrgreen:

Dann hab ich hier was aus meiner privaten Code-Lib :)

Delphi-Quellcode:
procedure MakeWindowTransparent(Wnd: HWND; Alpha: Byte);
const
  WS_EX_LAYERED = $80000;
  LWA_ALPHA    = $02;
type
  TSetLayeredWindowAttributes = function(const hWnd: HWND; crKey: Integer; bAlpha: Byte; dwFlags: Integer) : Integer; stdcall;
var
  SetLayeredWindowAttributes : TSetLayeredWindowAttributes;
  User32DLL                 : THandle;
begin
  User32DLL := LoadLibrary('User32.dll');
  if User32DLL <> 0 then
  begin
    @SetLayeredWindowAttributes := GetProcAddress(User32DLL, 'SetLayeredWindowAttributes');
    if @SetLayeredWindowAttributes <> nil then
    begin
      SetWindowLong(Wnd, GWL_EXSTYLE, GetWindowLong(Wnd, GWL_EXSTYLE) or WS_EX_LAYERED);
      SetLayeredWindowAttributes(Wnd, 0, Alpha, LWA_ALPHA);
    end;
  end;
  FreeLibrary(User32DLL);
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz