Make a Very Small Delphi Form

I need to make a very narrow Delphi form about 60 pixils wide.  Is there a way to do this?  

Can it be done by eliminate the min., max. and close window buttons?  If so, how is that done.

As always Thanks!
LVL 1
IT79637Asked:
Who is Participating?
 
ramboliviaConnect With a Mentor Commented:
Hi IT79639,

You can do it by setting the BorderStyle property to bsNone (which will eliminate the caption bar).

After this delphi will not let you set a form ClientWidth less than  115 (at design time),  but you can get what you want with this code in the FormCreate event:

procedure TForm1.FormCreate(Sender: TObject);
begin
  ClientHeight := 60;
  ClientWidth := 60;
end;

Hope it helps!!!
0
 
ZhaawZSoftware DeveloperCommented:
Setting BorderStyle to bsDialog, bsToolWindow or bsSizeToolWin (or bsNone, as rambolivia wrote) at design time allows to set ClientWidth to 60 at run time.
0
 
ZhaawZSoftware DeveloperCommented:
>> Can it be done by eliminate the min., max. and close window buttons?  If so, how is that done.
Use Form's "BorderIcons" property.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.