Recent Posts

Selamat datang di Coding Delphi Land Weblog kumpulan source code pemogram delphi

(Bukan maksud untuk menggurui tetapi marilah kita berbagi ilmu tuk perkembangan kemajuan teknologi kita

Selasa, 17 November 2009

Rotate Text

procedure TForm1.FormPaint(Sender: TObject);
var
lf: TLogFont;
tf: TFont;
begin
with Form1.Canvas do
begin
Font.Name := 'Arial';
Font.Size := 24;
tf := TFont.Create;
try
tf.Assign(Font);
GetObject(tf.Handle, SizeOf(lf), @lf);
lf.lfEscapement := 320;
lf.lfOrientation := 320;
SetBkMode(Handle, TRANSPARENT);
tf.Handle := CreateFontIndirect(lf);
Font.Assign(tf);
finally
tf.Free;
end;
TextOut(10, Height div 2, 'Your Rotated Text!');
end;
end;

0 komentar:

Posting Komentar