Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi [Error] MainFormUnit.pas(54): Missing operator or semicolon (https://www.delphipraxis.net/5692-%5Berror%5D-mainformunit-pas-54-missing-operator-semicolon.html)

flomei 15. Jun 2003 21:05


[Error] MainFormUnit.pas(54): Missing operator or semicolon
 
Tja. Ich weiss nicht was ich falsch mache. Es ist garantiert ein winziger Fehler aber ich find ihn nicht... :roll:

Delphi-Quellcode:
procedure TMainForm.stayontop(Sender: TObject);
  begin
    if
      Stay.Checked = true
    then
      MainForm.FormStyle := fsStayOnTop
      Help.FormStyle := fsStayOnTop
    else
      MainForm.FormStyle := fsNormal;
      Help.FormStyle := fsNormal
  end;
Hab es schon mit einem Semikolon hinter MainForm.FormStyle := fsStayOnTop versucht aber da schimpft der Compiler mit mir...

Ich komm echt nicht drauf :|

Danke im Voraus!

MfG Florian :hi:

Daniel B 15. Jun 2003 21:16

Hallo,

probiers mal so:
Delphi-Quellcode:
procedure TMainForm.stayontop(Sender: TObject);
begin
  if Stay.Checked = true then
  begin
    MainForm.FormStyle := fsStayOnTop;
    Help.FormStyle := fsStayOnTop;
  end
  else
  begin
    MainForm.FormStyle := fsNormal;
    Help.FormStyle := fsNormal;
  end;
end;
Grüsse, Daniel :hi:

flomei 15. Jun 2003 21:19

:D Danke! So geht es gut.

:wall: Wie dumm...

MfG Florian :hi:


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz