What is the best/easy way to make (Vertical Caption/Vertical Button)?

What is the best/easy way to make (Vertical Caption/Vertical Button)?

like

|T|
|E|
|S|
|T|

but of course the letters must be at 90 degree




500 points for this one, thx in advance
Sans-titre.jpg
Marc582Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodedKCommented:
Hello Marc.

Well i use this : "TAPIText"
http://sintreseng.narod.ru/TAPIText.zip
Its only 18kb and its free.

It can draw text in any angle and has some more features.
It has the source and everything so you can check it out.

Hope this helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ziolkoCommented:
little sample

procedure TForm1.Button1Click(Sender: TObject);
var lf: LOGFONT;
    hf: THandle;
begin
  hf := CreateFont(-11, 0, 90, 90, FW_DONTCARE, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Arial');
  try
    SelectObject(Canvas.Handle, hf);
    Canvas.TextOut(200, 200, 'upside down');
  finally
    DeleteObject(hf);
  end;
end;

you can make same yhing with canvas of your new button,
also you dont have to create/delete font each time you draw

ziolko.
0
ziolkoCommented:
little change:
procedure TForm1.Button1Click(Sender: TObject);
var lf: LOGFONT;
    hf: THandle;
begin
  hf := CreateFont(-11, 0, -900, 0, FW_DONTCARE, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Arial');
  try
    SetGraphicsMode(Canvas.Handle, GM_ADVANCED);
    SelectObject(Canvas.Handle, hf);
    Canvas.TextOut(200, 200, 'upside down');
  finally
    DeleteObject(hf);
  end;
end;

ziolko.
0
Marc582Author Commented:
when we use the canvas, when the user minimize the form or move another window over it, the text draw by canvas is overwritten no?

so not really good, correct me if I'm wrong
0
ziolkoCommented:
not only when you minimize app but also when you place other window over yours,
if you want contents of canvas to stay even after window is minimized use OnPaint event handler of form  or if you wanr separate component you must catch catch WM_PAINT message

ziolko.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.