Home Image-Pro Automation (Macros, Apps, Reports)

Code to know whether APP / DIALOG BOX is OPEN or CLOSED . . .

All --

Is there a way that code can run when an APP is OPEN or CLOSED within PREMIER or to tell whether an APP / DIALOG BOX is OPEN or CLOSED?

Code placed in
    Sub MyControl_Load
seems to run when:

    ** PREMIER is RUN rather than when the APP is OPENED.
    ** WORKBENCH switches from the EDIT MODE to the LOAD MODE

Code placed in
    Sub Finalize
seems to run when:

    ** PREMIER is EXITED rather than when the APP is CLOSED.
    ** WORKBENCH switches from the LOAD MODE to the EDIT MODE

I'd like this bit of code to run once when the DIALOG BOX is OPENED and perhaps a bit of CLEANUP CODE to run when the DIALOG BOX is CLOSED.

Is there a way to make that happen?

Thanks.

-- Matt


Best Answer

Answers

  • Yuri --

    Thank you for your reply with CODE EXAMPLES and URL.

    I have tried your code and it works GREAT.

    Now I can shift some code from
        Private Sub MyControl_Load
    to
        Private Sub MyControl_AppLoading
    so the code runs when the APP OPENS.

    This will save CLOSING and REOPENING the PREMIER or EDITING and LOADING the PROJECT.

    I've scanned the info at the URL and I will revisit it later.

    Thanks again.

    -- Matt
  • edited June 2016
    All --

    FYI . . .

    It seems that
        Private Sub MyControl_AppLoading
    runs nicely when an APP is opened from the APPS RIBBON + APPS SECTION + APP BUTTON but it does not seem to run when the APP is started / restarted via the LOAD button within the PROJECT WORKBENCH.

    I hope this information is helpful.

    -- Matt
Sign In or Register to comment.