Topic: FORM
Hello MVD
Is there a possibility to blur a main form after clicking a button to show another form ?
Thanks!
My Visual Database → General → FORM
Hello MVD
Is there a possibility to blur a main form after clicking a button to show another form ?
Thanks!
You can change the transparency of the main form when opening child ones. Configure the button to open the window, and then add the code:
procedure MainForm_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
MainForm.AlphaBlendValue := 125;
MainForm.AlphaBlend := true;
end;
procedure MainForm_Button1_OnAfterClick (Sender: TObject);
begin
MainForm.AlphaBlend := false;
end;
Ok Thank You Sir!
can you tell me how to minimize a form after click on botton and maximime again after saving or closing that form.
can you tell me how to minimize a form after click on botton and maximime again after saving or closing that form.
This can be done like this:
procedure frmSecond_btnShowForm_OnClick (Sender: TObject; var Cancel: boolean);
begin
frmThird.Show;
frmSecond.WindowState := wsMinimized;
end;
procedure frmThird_OnClose (Sender: TObject; Action: string);
begin
frmSecond.WindowState := wsNormal;
end;
If open a child form not modal, then the parent form can be minimized.
Unfortunately, if the parent form is the main form of the application, then minimizing it will minimize all forms of the application. The action of the "Open form" or "Show record" button opens the form modally. The ShowRecord() method opens a form modally to.Therefore, you cannot use this code for editing forms.
Perhaps the variant with changing the visibility of forms is suitable for you. This variant does not have the above limitations.
procedure frmMain_Button1_OnAfterClick (Sender: TObject);
begin
frmMain.Visible := true;
end;
procedure frmMain_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
frmMain.Visible := false;
end;
Both option working for me.
My Visual Database → General → FORM
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi