Hi Peter,

please read on! What can be done is to assign the macro to the receiving focus event, this event gets fired when the macro is started, so it is fired right at the beginning.
Build the dialog in the Basic IDE, do define the property enabled as "Yes".


Thus code structure should look like this:
1.) load dialog library, createunodialog, execute dialog (thread starts)
-> dialog pops up and "receiving focus" event is fired, the assigned function is called
2.) dlg.setEnable(False)
-> user cannot close the dialog
2.) do everything you wanted to do now with the document (=implementation)
3.) at the end call dlg.setEnable(True) and then dlg.endexecute()
-> the dialog vanishes, the user can now work on with the document, control flow of the Starbasic code goes back to the .execute() statement and continues from there on (in the standard case the next line would just be End Sub or End Function).


Note, that dlg should be a global variable as it is propably used in not just one function.

Best Regards
Christian Junker

Peter Eberlein wrote:

Christian Junker schrieb:

and I forgot:
Once the macro has finsihed you call endExecute() on the dialog and it should return to the document again.


Christian,
when the dialog is executed and shown on the screen, the macro stops (sleeps) at this point until the user triggers any event (pushs a button), doesn't it?
That means, the user must trigger the main function (disabling the dialog, showing the progress bar, doing all the other things and ending execute the dialog).


But that's not what Christian Anderson wanted.

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to