Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

Very strange behavior of TForm 1 week 2 days ago #18660

  • Roman
  • Roman's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 101
  • Thank you received: 0
I am attaching the project.
On the first form there is a button to open the second form.
Also on the first form there is a checkbox to set/remove the fsSystemStayOnTop style.
If the second form is open, then uncheck the checkbox hides it, and then it is no longer possible to open the second form.
What is the problem?
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Roman.

Very strange behavior of TForm 1 week 2 days ago #18661

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 160
procedure TForm1.CheckBox1Change(Sender: TObject);
begin
  if TCheckBox(Sender).Checked then FormStyle := fsSystemStayOnTop
  else
    FormStyle := fsNormal;

  //...............................
  if Form2.Visible then
  Form2.Show;
  //..............................
end; 
PilotLogic Core Programmer
The following user(s) said Thank You: Roman

Please Log in or Create an account to join the conversation.

Very strange behavior of TForm 1 week 2 days ago #18662

  • Roman
  • Roman's Avatar Topic Author
  • Away
  • Junior Member
  • Junior Member
  • Posts: 101
  • Thank you received: 0

  //...............................
  if Form2.Visible then
  Form2.Show;
  //..............................

It is a norm not bug?!

Please Log in or Create an account to join the conversation.

Very strange behavior of TForm 1 week 2 days ago #18663

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 160
It's normal Sir
 
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1