Link to home
Start Free TrialLog in
Avatar of Azerthur
Azerthur

asked on

How to give my form an organic shape ?

I want to give my delphi form an organic shape.
How do I do that ?
What if I also want a permanent canvas ?
Avatar of inthe
inthe

have a look at coolform:

http://www.lawrenz.com/coolform/
Avatar of Azerthur

ASKER

sorry I have delphi 3 only !
ASKER CERTIFIED SOLUTION
Avatar of ckaneta
ckaneta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and then, of course, there's the one I use:
http://www.torry.webnorth.com/vcl/forms/plasma.zip
Here's sompe code for a polygone as a weird shaped window. That's not exactly organic, but let yer imagination work.

procedure TForm1.FormCreate(Sender: TObject);
var
   lPoints: array [0..11] of TPoint;
begin

    (* Define the lPoints of a W shape *)
    lPoints[0] := Point(0  , 0   );
    lPoints[1] := Point(50 , 0   );
    lPoints[2] := Point(180, 200 );
    lPoints[3] := Point(218, 100 );
    lPoints[4] := Point(256, 200 );
    lPoints[5] := Point(385, 0   );
    lPoints[6] := Point(435, 0   );
    lPoints[7] := Point(256, 300 );
    lPoints[8] := Point(218, 200 );
    lPoints[9] := Point(180, 300 );

    (* Define the region *)
    prRegion := CreatePolygonRgn(lPoints,// This a pointer to the previously defined lPoints
                               10,//  The number of lPoints
                               ALTERNATE);// The mode to be used for filling the window/polygon

    (* Set the window to have the above defined region *)
    SetWindowRgn(Handle,// The handle of your form
                 prRegion,// The handle of your defined region
                 True);// Indicates the window is to be redrawn now
end;


procedure TForm1.FormDestroy(Sender: TObject);
begin
    DeleteObject(prRegion);
end;