Eine TForm halp- durchsichtig machen?
Hallo Alle!
Wie kann man eine TForm halp- durchsichtig machen? Gruß Heike |
Re: Eine TForm halp- durchsichtig machen?
Mit AlphaBlend, und es heißt Halb.
|
Re: Eine TForm halp- durchsichtig machen?
Hallo,
unter WinXP jedoch nicht unter Win9X funktioniert folgendes:
Delphi-Quellcode:
function SetTransparens(Wnd: hwnd; transp: byte): boolean;
type SetLayeredWindowAttributes= function(Wnd: hwnd; crKey: ColorRef; Alpha: Byte; dwFlags: DWORD): boolean; stdcall; var hUser32: THandle; SetLayered: SetLayeredWindowAttributes; begin Result := false; hUser32 := LoadLibrary('user32.dll'); if hUser32 <> 0 then try SetLayered:= GetProcAddress(hUser32, 'SetLayeredWindowAttributes'); if Assigned(SetLayered) then begin SetWindowLong(wnd, GWL_EXSTYLE, GetWindowLong(wnd, GWL_EXSTYLE) or WS_EX_LAYERED); result:= SetLayered(wnd, 0, transp , LWA_ALPHA); end; finally FreeLibrary(hUser32); end; end; procedure TForm1.Button1Click(Sender: TObject); begin SetTransparens(Handle, 128); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:05 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