Instead of SHOWMODAL from other two methods

zhaozj2021-02-17  85

Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT); BeginenableWindow (Handle, False); // Window is not available for form2.show;

End; Procedure TFORM2.FormClose (Sender: Tobject; VAR Action: Tclosection); BeginenableWindow (Form1.Handle, True); // Used END;

Or Var Form1: TFORM1; Windowlist: Pointer;

IMPLEMENTATION

Uses unit2;

{$ R * .dfm}

Procedure TForm1.Button1Click (Sender: TOBJECT); Begin Windowlist: = DisabletaskWindows (Self.handle); Form2.Show;

END;

Uses unit1;

{$ R * .dfm}

Procedure TFORM2.FORMCLOSE (Sender: TpoBject; var Action: tclosection); begin enabletaskwindows (Unit1.windowlist);

转载请注明原文地址:https://www.9cbs.com/read-31387.html

New Post(0)