Create a new form or modify main form. In the form code for example frmShadow, override CreateParams() method with your own.
Type:
TfrmShadow = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
protected
procedure CreateParams(var Params: TCreateParams); override; end
Complete form declaration by pressing CTRL+SHIFT+C. Delphi IDE will add implementaion of CreateParams.
Because drop shadow effect will only work on Windows XP or later, you need to make sure that we add drop shadow only when we know the operating system is Windows XP.
function IsWinXP: Boolean; begin
Result:= (Win32Platform = VER_PLATFORM_WIN32_NT) and
(Win32MajorVersion >= 5) and (Win32MinorVersion >= 1); end
Last we add drop shadow effect by modifiying Style of WindowClass bit inside CreateParams.
procedure TfrmShadow.CreateParams(var Params: TCreateParams);
const CS_DROPSHADOW = $00020000;
begin inherited;
if IsWinXP then begin Params.WindowClass.Style := Params.WindowClass.Style or CS_DROPSHADOW; end


Delicious
Digg
Google
Yahoo