|
4 `& }; B+ g$ E4 o# v( U |% G5 K1 H
Answer:
% i8 U2 M9 d) ]4 L, ?! DYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
8 B# M( f2 `4 \3 E! b6 _: ZStep 1: Add the CreateParams prototype to the form class.
- `8 o# r! x/ s3 O$ e6 G; k3 l! f private:/ }2 M8 `# u7 o2 v5 K3 d! N+ o
void __fastcall CreateParams(TCreateParams & arams); 0 L& a* g D+ D8 }5 V# |( N
Step 2: Code the function. - P2 {& m7 \4 U# ~
void __fastcall TForm1::CreateParams(TCreateParams & arams)3 }% H' J+ V8 G, A
{) u. r& H7 R8 d
TForm::CreateParams(Params); // call base class first6 c, u3 a/ R4 r
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style$ h" y6 |) Y* i8 K1 d8 E6 c2 k, M. E
} 8 K, ^/ ` D, |1 W7 d8 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.
! A" ^9 b9 g7 Y7 O |