Do you have a WinForms (C#) application that you wish to publish on the web?
Thinfinity® VirtualUI allows you to convert WinForms to web application by adding a small line of code to your C# application so it can then be accessed from any OS and device via an HTML-able browser.
Now you can follow these steps to integrate a .NET WinForms (C#) application with Thinfinity VirtualUI:
1. Open Microsoft Visual Studio
2. Open the .sln project of the provided demos:
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 the following line:
using System;
using System.Windows.Forms;
namespace MyApp
{
static class Program
{
///<summary>
///The main entry point for the aplication.
///</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.
Once the debug is finished you will see this message popup:
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, you are able to choose “Do not show again” and manually launch the application on the web by going to the “Thinfinity VirtualUI Development Server” systray icon:
This systray icon shows up whenever you debug an application with your IDE. You can right-click on the icon and then click on the ‘Open Web Browser’.
A Web browser window will open and your application will be running inside.
When you run your application under an IDE, it automatically starts in web mode. In order 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.