3
Good morning. I have a timer running on a form that calls several others. When this form opens another the timer should be stopped and when the form that was opened is closed the timer should be enabled again. However, I can only do this on one form. Is there any way to do that? Call the onclose of closed forms directly in the form that opens the others? I’m using Delphi 4.
I thought I’d put it this way, but I don’t know where I put that code so it runs at all times.
if Assigned(TForm1) then
//Criado
else
//Não criado
It would take another Ttimer object?
Thanks, Gabriel. I know that, I just don’t know where I put it. If I put on the button doesn’t answer, because I would have to put on all the onclose events of the other forms, you know?
– Lucas Augusto Coelho Lopes
i complemented the answer, with example code, but if you want to make the second form have control can give violated access problem, the better the form that has timer do the control. if you want to do in the main a generic process that opens the forms
– GabrielLocalhost
It worked Gabriel. Thank you very much.
– Lucas Augusto Coelho Lopes