Compiling and Testing a WinForms Application

Follow these steps to integrate a .NET WinForms application with Thinfinity VirtualUI:

1. Open Microsoft Visual Studio.

2. Open the application's project you want to integrate with.

3. Right-click on the project name in the 'Solution Explorer' panel and then select 'Add' - 'Existing Item'. Look for the Thinfinity.VirtualUI.cs file, which is typically located in c:\Program Files\Thinfinity\VirtualUI\Dev\dotNet\.

4. In the program.cs file add a line as follows:

using System;
using System.Windows.Forms;
namespace MyApp
{
 static class Program
 {
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 [STAThread]
 static void Main()
 {
 new Cybele.Thinfinity.VirtualUI().Start();
 Application.EnableVisualStyles();
 Application.SetCompatibleTextRenderingDefault(false);
 Application.Run(new Form1());
 }
 }
}

5. Compile your program and run it in debug mode.

You will see this message:

If you press the 'Start Web Browser' button, a web browser will open pointing to the application. The application will also open in desktop mode.

6. Alternatively, choose to not show the message and observe on the Windows Tray Bar that the Thinfinity VirtualUI Development Server icon will appear.

You can right-click on the icon, and after that click on the 'Open Web Browser' menu.

A Web browser window will open and your application will be running inside.

Note:

When you run your application under an IDE, it automatically starts in web mode. To access the application, open your web browser and point to http://127.0.0.1:6080

8. You can also click on the 'Server Manager' menu of the tray bar icon to access the Development Server Manager.

Read more:

o Compiling and Testing a Delphi Application

o Compiling and Testing a C++ Application

o Registering the Application in Thinfinity VirtualUI Server

o Accessing the App from the Web

o Application Execution Behavior

Last updated