1 (edited by Destiny 2024-06-29 09:35:44)

Topic: Blocked form

Hello, I have a problem with a form.
When I open form 2 it displays correctly and closes with the code "Hide".
The problem is that Form 1 remains frozen, it never closes. not. I can't find where the error is.

Post's attachments

Attachment icon Formulaires.rar 293.03 kb, 56 downloads since 2024-06-29 

Destiny

Re: Blocked form

Hi Destiny


procedure Hide - Hides the form.
procedure Close - Closes the form.

event  OnClose - Occurs when the form closes.


Thus, by executing "Hide" you hide the form but do not complete its operation.
Because of this, the main form cannot be closed until the "Table" form is closed.
The "OnClose" event is executed when the form is closed (Close procedure) and is not executed in your case.

Re: Blocked form

It is from a tablegrid that I want to close the "Table" form to return to the "frmOperation" form but it always blocks.

Post's attachments

Attachment icon Formulaires.rar 293.45 kb, 41 downloads since 2024-06-29 

Destiny

Re: Blocked form

Example

Post's attachments

Attachment icon Formulaires.zip 4.93 kb, 33 downloads since 2024-06-29 

Re: Blocked form

Thank you Sparrow, when I enter data into the form table “frmOperation” remains blocked.

Post's attachments

Attachment icon Formulaires.rar 293.92 kb, 43 downloads since 2024-06-29 

Destiny

Re: Blocked form

You are using the "Table.Hide" command inappropriately.
This command hides the form. And while the form is not closed, your main form is blocked.


To close the form, use only "Table.Close ;"
In your example, it is enough to delete the "Table.Hide" command.

Re: Blocked form

In the example, clicking on the grid makes the "Table" form disappear and that's perfect, but when I click on the data in "TableGrid1" the form freezes and nothing happens.

Post's attachments

Attachment icon Formulaires.rar 293.86 kb, 33 downloads since 2024-06-29 

Destiny

Re: Blocked form

Double-clicking on data, if there is a function (button) to edit a record, triggers the OnClick event for the edit button.

Post's attachments

Attachment icon Formulaires.zip 5.49 kb, 43 downloads since 2024-06-29 

Re: Blocked form

Thank you Sparrow, it works wonderfully.
Have a nice week end.

Destiny