Search code examples
winapivisual-foxprofoxproshellexecute

how to avoid blank screen on RUN command


Visula FoxPro 9 application runs application and wait for finish using command

RUN openssl.exe  ... parameters

multiple times. This causes ugly blank screen flashing.

How to remove blank screen flash ? how to run application miniized ? Which is exact replacement of RUN command for this ? Can shellexecute or Ed Rauh API_APIRun class used or is there other simple solution ?


Solution

  • I use API_APPRUN by the late, great Ed Rauh.

    You can find the code here: https://www.universalthread.com/ShowHeaderArticleOneItem.aspx?ID=7789

    Below is the basic usage. I created a visual class library (VCX) using Ed's code. I then dropped the class on a vfp form with the name of "apprun".

    lcCmdLine = "openssl.exe  ... parameters"
    thisform.apprun.init(lcCmdLine)
    thisform.apprun.LaunchAppAndWait()
    

    API_APPRUN is clean and should work as you expect.