|
$ q$ j' o) D e6 p. M4 |- I5 J6 ]3 N
Answer:
/ O' q. Y5 z: BYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
1 \$ ?8 }- D% W( v' d) I6 @Step 1: Add the CreateParams prototype to the form class.
1 i) b1 c+ X: l3 _$ K. ?8 H private:
4 s% ?' o* [0 |- C1 ^+ o void __fastcall CreateParams(TCreateParams & arams); $ x9 y2 d/ D8 s# r% A% G
Step 2: Code the function.
6 a4 O7 @( q# j X s8 m void __fastcall TForm1::CreateParams(TCreateParams & arams)
9 C3 i1 V$ g/ I! R1 K1 w {$ G1 j1 n$ `0 J2 ?: p3 d9 ]
TForm::CreateParams(Params); // call base class first# }6 n4 u9 F% o. b0 h9 W
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style% [$ N2 u B) B: [/ I
} ' K7 v2 v) s$ `& V" H
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.
: |: b9 a! W1 I) C* V7 \; I" s8 S8 E8 A |