Dynamic hide the display window's title bar (while maintaining a sizeable performance window

Today, when considered for the interface, want to remove the form's title bar, but set Form.BorderStyle: = bsNone; no longer will lead to a form Sizeable (changing the size of the form by the mouse), a closer look did not find the relevant Help Solution.

  In answer to DFW in last search:

 

  // set a property on the specified form

  SetWindowLong (Handle, // handle to the current form

                GWL_STYLE, // indicates that the current is to set up a new form (ordinary) style

                // get the form specified information

                GetWindowLong(Handle, GWL_STYLE)

                  and (not WS_CAPTION)); // remove the pattern (s) in the "title" style

  Height := ClientHeight;

  Width := ClientWidth;

 

 

Remove the largest small minimize button on the form

// remove button

Self.BorderIcons := Self.BorderIcons - [biMinimize, biMaximize];

To create an event added to form inside

 

Self.BorderIcons := Self.BorderIcons - [bisystemMenu,biMinimize, biMaximize,biHelp];

 

 

Guess you like

Origin www.cnblogs.com/blogpro/p/11446849.html