Главная страница | назад





Article #16766: Disabling system menu in code

 Question and Answer Database
FAQ1766D.txt Disabling system menu in code
Category :VCL
Platform :All
Product :All 32 bit
Question:
How can I disable the forms system menu and the Minimize,
Maximize, and Close Buttons in code at Runtime?
Answer:
The following demonstrates disabling the buttons and system menu on
the form's caption bar.
Example:
procedure TForm1.Button1Click(Sender: TObject);
begin
{Disable}
Form1.BorderIcons := Form1.BorderIcons -
[biSystemMenu, biMinimize, biMaximize];
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
{Enable}
Form1.BorderIcons := Form1.BorderIcons +
[biSystemMenu, biMinimize, biMaximize];
end;
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99