KB-60534: Closing a modal screen when task switching is disabled.

Question:

Can I enable a modal screen’s Close button when the option Disable task switching is on?

Solution:

When you disable task switching (Viewer properties, Settings tab), the Viewer’s title bar becomes unavailable, thus preventing modal screens to be closed via Close button.

To work around this situation, access the event opening the modal screen and insert a script enabling again task switching before the line that opens the modal screen:

Application.Item(“_top”).SetDisableTaskSwitching false
Application.DoModal “ModalScreen”, “Title”,50,50,100,100,Arg,2+1

Then, access the modal screen’s OnPreShow event and once again disable task switching:

Application.Item(“_top”).SetDisableTaskSwitching true

With that, the modal screen’s Close button will not be lost, and the task switching functionality will  be maintained.

 


Task Switching
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *