acMakeTranslucentWindow procedure
Advanced GDI routines
Return to Introduction  Previous page  Next page

procedure acMakeTranslucentWindow(Wnd: THandle; TransparencyRate: Byte); // TransparencyRate must be 0%..100%  

The acMakeTranslucentWindow makes the form translucent. The rate of transparency specified by TransparencyRate parameter. To return the form style to normal state — use acMakeOpaqueWindow procedure.  
The acMakeTranslucentWindow makes the window layered, setting up the WS_EX_LAYERED attribute to the form style, then makes it translucent using the SetLayeredWindowAttributes function.  
tip Using a layered window can significantly improve performance and visual effects for a window that has a complex shape, animates its shape, or wishes to use alpha blending effects. The system automatically composes and repaints layered windows and the windows of underlying applications. As a result, layered windows are rendered smoothly, without the flickering typical of complex window regions. In addition, layered windows can be partially translucent, that is, alpha-blended.  

Windows NT/2000: Requires Windows 2000 or later.  
Windows 95/98: Unsupported.  
tip If you call this procedure on Win95, Win98 or WinNT, nothing will happends.  

See also
acMakeOpaqueWindow procedure and acWin2kEffects component.