|
" A8 g; D+ x/ _: IAnswer: ) z0 b, h0 P, ~3 J6 R% J( _: j- U
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
1 h5 _! @$ C$ O& N8 lStep 1: Add the CreateParams prototype to the form class.
0 i V G( @4 v/ I private: R3 H6 d! Q" E3 Y, ]3 h
void __fastcall CreateParams(TCreateParams & arams); 7 e6 |/ e8 i0 h# v& ~
Step 2: Code the function.
( B* G: n4 A0 H2 n2 ^ void __fastcall TForm1::CreateParams(TCreateParams & arams)! y h2 ?* r7 J
{. n: ~* u0 p; U/ H
TForm::CreateParams(Params); // call base class first
4 G2 T* M: d1 {. ^ Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style2 @2 c; Y$ i( O' D! `
}
# n) }# S) b' C, |" d( P5 NIf you would rather not bother with CreateParams, you can achieve identical results by placing a panel on your form. Set the Aligment property of the panel to alClient, set both BevelInner and BevelOuter to bvNone, and set the panel's BorderStyle property to bsSingle. % _$ T9 }, }2 S# C1 k
|