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);