Question : Blur/Shadow Text

Hello,

In Windows Desktop for example, the Icons has a small Blur/Shadow effect in his text...
Windows Live Messenger has the same effect in every text... except for chat text of course

Somebody knows how to do that? Some component?

I believe it already exists, or at least, near that!

Regards,
Carlos

Answer : Blur/Shadow Text

this looks good, might suit you... :-)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
unit ShadowEffectDemo;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfrmMain = class(TForm)
    txtText: TEdit;
    Label1: TLabel;
    btnShadow: TButton;
    btnExit: TButton;
    procedure btnExitClick(Sender: TObject);
    procedure btnShadowClick(Sender: TObject);
  private
    { Private declarations }
    procedure FirstMethod;
  public
    { Public declarations }
  end;

var
  frmMain: TfrmMain;

implementation

{$R *.dfm}

procedure TfrmMain.btnExitClick(Sender: TObject);
begin
    Close;
end;

procedure TfrmMain.btnShadowClick(Sender: TObject);
begin
    FirstMethod;
end;

procedure TfrmMain.FirstMethod;
var
   lf: LOGFONT; // Windows native font structure
   text: string;
begin
   Canvas.Brush.Style := bsClear; // set the brush style to transparent
   FillChar(lf, SizeOf(lf), Byte(0)) ;
   lf.lfHeight := 20;
   lf.lfFaceName := 'Arial';
   Canvas.Font.Handle := CreateFontIndirect(lf) ;
   Canvas.Font.Color := clBlack;
   text := txtText.Text;
   Canvas.TextOut(20, 100, text) ; // shadow in black
   Canvas.Font.Color := clGray;
   Canvas.TextOut(19, 99, text) ; // text in gray 1pxl left and up
end;

end.
Random Solutions  
 
programming4us programming4us