Average rating:
Cet article explique comment manipuler forme apparition sur Windows XP en ajoutant une ombre effet.
Step 1:

Créez un nouveau formulaire ou modifier formulaire principal. Dans la forme de code, par exemple frmShadow, override CreateParams () avec votre propre méthode.

Type:

TfrmShadow = class (TForm)
privé
(Private declarations)
public
(Public declarations)
protégées
procédure CreateParams (var Params: TCreateParams); override; fin

Remplissez le formulaire de déclaration en appuyant sur CTRL + MAJ + C. Delphi IDE sera mise en place d'ajouter CreateParams.

Step 2:

Comme une ombre effet ne fonctionne que sur Windows XP ou ultérieur, vous devez vous assurer que nous ajoutons ombre seulement lorsque nous savons que le système d'exploitation est Windows XP.

fonction IsWinXP: Boolean; commencer

Résultat: = (Win32Platform = VER_PLATFORM_WIN32_NT) et
(Win32MajorVersion> = 5) et (Win32MinorVersion> = 1); fin

Step 3:

Mise à nous ajouter ombre par effet modifiying Style WindowClass peu de l'intérieur CreateParams.

procédure TfrmShadow.CreateParams (var Params: TCreateParams);
const CS_DROPSHADOW = $ 00020000;
hérité de commencer;

si IsWinXP alors commencer Params.WindowClass.Style: = Params.WindowClass.Style ou CS_DROPSHADOW; fin

Zamrony P Juhara's picture
About this Author:
Zamrony P Juhara is a Delphi programmer from Indonesia currently living in Surabaya. He is very interested in DirectX programming topics. Currently, he maintains his own website, http://juhara.com, where he posts his DirectX programming articles.
View more information and all guides by Zamrony P Juhara