Make Form Size Of Bitmap

I want to make a form the size of a bitmap.  I don't want to see the form status bar up top and no part of the form around this bitmap.  The bitmap is not a rectangle so I do not know how to accomplish this...
MichaelB98Asked:
Who is Participating?
 
delphiexpertConnect With a Mentor Commented:
Here's a couple of lines of code that'll remove the bar from the top:

       SetWindowLong( Handle, GWL_STYLE,
       GetWindowLong( Handle, GWL_STYLE ) and not WS_CAPTION );
       ClientHeight := Height;
0
 
BlackManCommented:
Check this article, it might come handy to you...
http://www.delumpa.com/tips/forms/forms4.htm
0
 
ZifNabCommented:
hi michael,

 or use this http://www.lawrenz.com/coolform/index.htm

blackmans tip is also real handy. A must-read article when you want to do the stuff you want. But pitty, it doesn't explains how to give your form the curves of your bitmap. This component does everything you need (it is free).

regards, Zif.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
MichaelB082598Commented:
I have decided my problem is a little different now that I got into it.  I have found a way to get my bitmap on the screen, but I need the form to be resizable.  It is easy to have the form resizeable if I have a form caption bar, but I do not want the bar up top.  
0
 
delphiexpertCommented:
Here's a couple of lines of code that'll remove the bar from the top:

SetWindowLong( Handle, GWL_STYLE,
GetWindowLong( Handle, GWL_STYLE ) and not WS_CAPTION );
ClientHeight := Height;

0
 
bryan7Commented:
why don't you make the form invisible ?
this way, only the image will be visible.

bryan

0
 
MichaelB98Author Commented:
That doesn't allow me to still resize the window...
0
 
MichaelB98Author Commented:
DelphiExpert, Re-answer the question and I will accept it.  It works...
0
 
bryan7Commented:
you can also do

Form1.BorderStyle:= bsNone

to  remove the bar from the top.

bryan

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.