Hi Alejandro,
we "simulate" a modal dialog by "locking" Visio and afterwards creating the
dialog from our application. Here's a C# example.
After executing the following line of code, Visio's GUI is locked, that
means no more user input is accepted and the application seems to be dead:
visioApp.OnComponentEnterState(
VisOnComponentEnterCodes.visComponentStateModal |
VisOnComponentEnterCodes.visModalDisableVisiosFrame |
VisOnComponentEnterCodes.visModalDontBlockMessages, true );
Use this line to revive the GUI:
visioApp..OnComponentEnterState(
VisOnComponentEnterCodes.visComponentStateModal, false );
If you have AutoSave enabled, Visio may have problems to save a document
while the application is locked. In this case, switch AutoSave off before
locking and switch it on after unlocking Visio. You can achieve this by
setting the auto recovery interval:
visioApp.AutoRecoverInterval = 0;
Hope this helps.
Best regards,
Markus