Create a form with a client edge
<P>Answer:
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. </P>
<P>Step 1: Add the CreateParams prototype to the form class.</P>
<P> private:
void __fastcall CreateParams(TCreateParams &Params);</P>
<P>Step 2: Code the function. </P>
<P> void __fastcall TForm1::CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params); // call base class first
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
}</P>
<P>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.
</P>
页:
[1]