Launching the WinForms application in a web browser

I have an application for the winning form, and I try to run it in a web browser, I rummaged through the net and found some links:

I tried this link: Embedding a .NET WinForms application in an Internet browser using WPF , this works great, but the problem is that the end user needs to install dot net frame work to run the application.

I found another link to launch the WinForms application inside a web browser , with a Visual WebGui development framework.

Does anyone have any experience with WebGui?

+8
c # web wpf visual-web-gui
source share
5 answers

winforms is not a web. Web site.

Web means HTML + something (usually JavaScript, CSS, and possibly jQuery or such).

1 - If you need a web application and want to do it with .Net, create an ASP.Net application.

2 - If you need a Windows application (Desktop), create a WPF application.

3 - If you need a Windows 8 "Metro" style application (Windows Store application for Windows.), Create a WinRT XAML application.

4 - winforms is completely useless. Forget about it.

If your customers do not want to install any version of the .NET Framework, the only option is # 1.

The winforms application will NEVER be a web application, no matter what hacks you make, to run it in a web browser.

XBAP (WPF Browser Application) is also NOT a web application. This is just a regular WPF client application that does not have its own window.

Edit:

If you did something like right (i.e., separated problems and added application logic to controllers or ViewModels instead of the awful code that most winforms developers usually use), It should not be so difficult to reuse your application logic and create a new one application (web interface or another) while maintaining the integrity of the layers of access to data and business logic.

0
source share

Well, Visual WebGui is a web interface through ASP.NET. His development experience is the same / similar to that of Windows Forms, using the Visual WebGui designer integrated with Visual Studio. You execute your code in the same way as in Windows Forms, and the WebGui runtime converts it to HTML5 / CSS / JS.

The effort required to convert your Windows Forms application to equivialend The Visual WebGui web application will depend on the components (third-party / .NET) used in your Windows Forms application. The Visual WebGui API is almost the same as the Windows Forms API, so in some cases you can add several links to specific WebGui assemblies and then search / replace for multiple namespaces. Of course, there are some differences, as these are two different platforms, but the evolving experience is very similar to Windows Forms.

+10
source share

In my limited experience with Visual WebGui, this is a pretty cool technology. Simply put, as I understand it, you can use the Windows Forms IDE to create an ASP.NET web application that supports the HTML5-compatible ASP.NET web application ... not only a website or page, but also the look and feel of a Windows application creates a desktop application. It does this by converting Winforms controls to client-side jquery code and saves most of the server-side executable code.

I used it to create simple testing applications, and there are a few caveats. First, to create a โ€œprettyโ€ website, you need to rethink the layout of Winforms to make it look like a website, with headers, sidebars, etc. This is a different paradigm, and users expect certain things on the website. The good news is that this setting can often be done quite simply by simply manipulating the controls; that is, the control panel can become a container for the sidebar or header. You can also create โ€œthemesโ€ that resemble skins for controls to change the look.

Another consideration is that events for things like pop-up dialogs behave differently in a web environment. In Winforms, program execution stops until the user clicks the OK button or something else. In Visual WebGui, all execution occurs on the server side; thus, program execution would continue without waiting for user input. This can be handled by creating a Form.Close handler for the popup. But these differences must be remembered.

You should also consider anomalies in the layout of objects. Visual WebGui does a great job of realizing the benefits of Winforms WYSIWYG: objects usually look pretty close to the web page where you put them in the environment. But it is not always the case; you need to play with indentation, margins, etc., sometimes, to get the correct layout. However, this is often much simpler than the tedious way of changing the spacing with CSS or divs.

0
source share

I think this question is very similar to this:

Is it possible to convert WinForm to WebForm in .NET?

As mentioned earlier, the only way to run the application โ€œas isโ€ inside the browser is through the use of some activex control, and this will require the IE + .NET Framework. There are tools that you can use to automatically migrate the application to the Internet, but some manual efforts will always be performed, and this will not be the same as creating the application from scratch as a web application.

0
source share

If not .net is not a requirement, you can run the winforms application in the object tag as a plugin, but this requires installing the winforms application on the machine. You must also make com objects visible. Therefore, if you need to avoid installing .net, this solution is not for you.

0
source share

All Articles