Topic: How to Close Form When Switch Form
I Have 2 Form
1- frm_a (start from)
- Button(open from b)
2- frm_b
how to edit script when click button open frm_b and close frm_a
Easy For Beginner Student For Me
My Visual Database → Script → How to Close Form When Switch Form
I Have 2 Form
1- frm_a (start from)
- Button(open from b)
2- frm_b
how to edit script when click button open frm_b and close frm_a
procedure frm_a_Button_OnClick (Sender: string; var Cancel: boolean);
begin
frm_b.Show;
frm_a.Hide (or Close);
end;
If you close the main form, you close your project, you should to hide Form1, then close Form1, when Form2 is closing.
Script:
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
Form2.Show;
Form1.Hide;
end;
procedure Form2_OnClose (Sender: string; Action: string);
begin
Form1.Close;
end;
begin
end.
Example project:
Thank You very much
Thank you again by Love...
That's great but how do you do if you want to un-hide the 1st form? Let's say, on form2_OnClose --> back to form1
tcoton
procedure Form2_OnClose (Sender: string; Action: string);
begin
Form1.Show;
end;
Oh great! I think, this is something I could use to create some kind of wizard Thanks Dmitry
It Work Nice !
Function Easy Fix bug By Multiple Show Form
smile Thanks Dmitry
My Visual Database → Script → How to Close Form When Switch Form
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi