I changed the procedure, but get an error on compile:
"formchange1.pas, missing operator or semicolon"
placing a semicolon after Hide gives me 5 other errors.
procedure TForm1.Button1Click(Sender: TObject);
begin
(* Form1.Close; no-no THIS CLOSES YOUR APP! *)
Hide {optional - remove "//"...
Yes, I inserted following:
Button1.caption := 'next form';
and yes it showed very quickly, because Delphi is going back to edit mode instead of showing form2.
@Opieo Both forms were created at the start. The button acts on a click because the procedure name is Button1.Click....
the button points to a click event. Switching the close and open instructions don't help.
Hi, I am a nemwbe to Delphi and I am trying out small programs to get acquainted.
Now I just wonder how you switch from Form1 to Form2.
I have this coded in Form1:
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Close;
Form2.Show;
end;
Compiling is OK, but when I run the program...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.