Run Visual FoxPro Applications in the Cloud

Run Visual FoxPro Applications in the Cloud

In this new article, we will show you how to adapt your Visual FoxPro code so you can run VFP apps in the cloud with Thinfinity VirtualUI.


1. Starting the App

To run the app you have to create VirtualUI object like this:


RELEASE APP_GLOBAL

PUBLIC APP_GLOBAL

RELEASE VirtualUI

PUBLIC VirtualUI

VirtualUI=CREATEOBJECT(“Thinfinity.VirtualUI”)

VirtualUI.DevMode=.T.

VirtualUI.DevServer.Port=6080

VirtualUI.DevServer.Enabled=.T.

VirtualUI.StdDialogs=.T.

VirtualUI.Start(60)

MESSAGEBOX(“Hello”,0+64,””)



2. Register the VirtualUI’s Library

Open command prompt as administrator and call VirtualUI’s dlls with the command ‘regsvr32’ like this:

regsvr32 C:\Program Files\Thinfinity\VirtualUI\bin64\Thinfinity.VirtualUI.dll

regsvr32 C:\Program Files\Thinfinity\VirtualUI\bin32\Thinfinity.VirtualUI.dll


Notes

If you are planning to use your VirtualUI integrated application within Remote Workspace, you should use the following DLLs:

regsvr32 C:\Program Files\Thinfinity\Workspace\bin64\Thinfinity.VirtualUI.dll

regsvr32 C:\Program Files\Thinfinity\Workspace\bin32\Thinfinity.VirtualUI.dll


3. Running the App

After you run the application you should see that VirtualUI’s development server will show on your system tray:



Left-Click it and hit ‘Open Web Browser’.



Now you should be able to see the app running in the desktop and in the browser.

Info

To publish your app in the “prod” server manager you have to comment on the following lines:

VirtualUI.DevMode=.T.

VirtualUI.DevServer.Port=6080

VirtualUI.DevServer.Enabled=.T.


Now you can build the .exe of  your Visual FoxPRO app and add it to VirtualUI’s server manager.

Any questions?