Delphi Form property setting allows the form to be maximized and cannot be dragged small (write a wm_exitsizemove empty function)

Source: Internet
Author: User

The following settings enable the form to be maximized, and you cannot drag the small bordericon to---bimax[false] bihelp [False]borderstyle Set as---bssingle reference-------------- You can restrict and control the form's changes by setting the properties of the form, as well as programmatic methods. If you don't want the form to be minimized and maximized.
-----
1. Using the property setting method
Using the Bordericon property of form, we can set whether the form has a system menu (Bisystemmenu), a minimize button (biminimize), a maximize button (Bimaximize), and a Help button (BIHELP).
All of the 4 child properties of the Bordericon property have a true and false property. By default, four sub-properties are true. If you set the Bisystemmenu property to False, no matter how other properties are set, the form does not have a system menu at this time, even the maximum minimum button, and the form cannot be minimized or closed. Regardless of how you set the Bordericon property, the form can resize by dragging the boundary.
Using the BorderStyle property of the form, you can set the border style of the forms. There are four common options: Bsdialog (Dialog Border), Bsnone (Borderless), Bssingle (single-line boundary), and bssize (standard boundaries that can be resized). If you set the BorderStyle property to Bsdialog, you cannot resize the form by dragging the boundary, and if the Bordericon bihelp child property is true at this time, the form will show a Help button. If you set the BorderStyle property to Bssingle, you cannot resize the form by dragging the boundary, but you have the maximum, minimum, and close buttons at this time.

2. Implement by intercepting messages that resize the form
Type
TForm1 = Class (Tform)
Private
{Private declarations}
Public
Intercepts system messages that resize a form wm_exitsizemove
Procedure Wmexitsizemove (var message:tmessage); messagewm_exitsizemove;
{Public declarations}
End

Var
Form1:tform1;

Implementation

{$R *. DFM}
Procedure Tform1.wmexitsizemove (var message:tmessage);
Begin
Caption: = ' Disable form adjustment and movement ';
End

Original: http://hi.baidu.com/517749/item/c8c0db37d2e6c784c2cf2996

Http://www.cnblogs.com/azhqiang/p/3699903.html

Delphi Form property setting allows the form to be maximized and cannot be dragged small (write a wm_exitsizemove empty function)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.