123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- {
- This is the MainForm of the LCL application.
- Once it is shown, it automatically opens the fresnel form.
- }
- unit MainUnit;
- {$mode objfpc}{$H+}
- interface
- uses
- Classes, SysUtils, Forms, Controls, Graphics, Dialogs, FreBtnForm;
- type
- { TMainForm }
- TMainForm = class(TForm)
- procedure FormPaint(Sender: TObject);
- private
- FQueued: boolean;
- procedure ShowFresnelForm({%H-}Data: PtrInt);
- public
- end;
- var
- MainForm: TMainForm;
- implementation
- {$R *.lfm}
- { TMainForm }
- procedure TMainForm.FormPaint(Sender: TObject);
- begin
- if FQueued then exit;
- FQueued:=true;
- Application.QueueAsyncCall(@ShowFresnelForm,0)
- end;
- procedure TMainForm.ShowFresnelForm(Data: PtrInt);
- begin
- FresnelButtonForm:=TFresnelButtonForm.Create(Self);
- end;
- end.
|