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:
1
using System;
2
using System.Windows.Forms;
3
namespace MyApp
4
{
5
static class Program
6
{
7
/// <summary>
8
/// The main entry point for the application.
9
/// </summary>
10
[STAThread]
11
static void Main()
12
{
13
new Cybele.Thinfinity.VirtualUI().Start();
14
Application.EnableVisualStyles();
15
Application.SetCompatibleTextRenderingDefault(false);
16
Application.Run(new Form1());
17
}
18
}
19
}
Copied!
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:
Last modified 1yr ago
Export as PDF
Copy link