|
- @+ G; B2 J' c3 x
Answer:
+ q1 y5 }" L# P" h4 aYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
4 b" |; x" R4 K; n; t4 `Step 1: Add the CreateParams prototype to the form class.
. c+ S: h( d& r, Z private:
G6 ^/ R2 {4 l6 p9 d1 ?" Q$ _! Q void __fastcall CreateParams(TCreateParams & arams); . v s" S" i" n t1 n
Step 2: Code the function. 7 Q8 o, B- e S+ G
void __fastcall TForm1::CreateParams(TCreateParams & arams)
& z2 j4 c. X. a+ x" N$ t5 ~ {
; I* ]% \& o( e0 W7 z TForm::CreateParams(Params); // call base class first9 M' C0 \8 O f' W) z& E
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style( Z* r q+ T# s2 M& Q q4 B
} 2 L; O* |# f9 i; x- G' v
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.
; h% o2 f3 Q% k3 q5 v0 B6 Q |