|
# U4 B( E* |7 t$ C
Answer: 7 u* i3 @3 A( |% m+ w/ Q3 e
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. e1 r: u& E* p3 o/ c
Step 1: Add the CreateParams prototype to the form class.
( U: e2 |" B! `) D# h6 C private:
. k& I* a' r/ q% I9 H void __fastcall CreateParams(TCreateParams & arams); # y' s8 c& e0 @5 T( ?* {) g
Step 2: Code the function. ! o& r( M' G) ]5 z1 I
void __fastcall TForm1::CreateParams(TCreateParams & arams)
# U0 u/ [4 z! d" E$ c1 P4 j {2 H2 a. P: F# E6 V3 z) g% a m1 H3 C* U
TForm::CreateParams(Params); // call base class first
1 X2 O8 B w, Q Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
+ V" r1 N$ o; b. ` }
8 g8 p+ {+ j6 ?" t' j$ r( Z" yIf 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. . I2 c: ~- o& Z8 l
|