|
$ E% g9 a6 N, u9 \+ S' LAnswer:
- Z: Q2 P' T x% X* JYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
/ Y# _; l! E2 d0 |% r; {Step 1: Add the CreateParams prototype to the form class.
4 X# j* m+ d5 r Q: @ @, ~" N3 f private:
2 E0 w0 K+ N2 x1 O3 j# t$ ^ void __fastcall CreateParams(TCreateParams & arams); & v+ D! u$ f6 F( b
Step 2: Code the function. , ?0 S8 t& S# J" K
void __fastcall TForm1::CreateParams(TCreateParams & arams)
0 E( w5 `% G9 Q( B {
0 ?2 g4 E& N0 C" S+ \0 C2 b TForm::CreateParams(Params); // call base class first
! @9 @' B1 `# i' w9 W6 U Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style [7 W! }! D: j# ], j9 `
} % H3 k1 o9 q2 i% I" j3 U
If 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. - @9 z4 g& ?6 S( H% r
|