Bogi
Bogi

Reputation: 2618

Porting existing Windows Forms application to Web

We have an application we are developing for a very long time written using Windows Forms which consists of many panels as user controls. Is there a way to offer controls using a web browser with a minimal effort?

Upvotes: 2

Views: 1653

Answers (5)

John
John

Reputation: 1094

If the winforms app is written well from the start then you will have a good deal of code that can be reused (data layer, business logic etc.). However, the presentation portion is a complete rewrite when moving to the web.

Upvotes: 0

Bogi
Bogi

Reputation: 2618

At the end, it needs to be written from scratch.

Upvotes: 0

Alex
Alex

Reputation: 35881

There are a number of automated solutions, such as this one. Also, if the app was written in .NET, converting it won't be too difficult; you have to change the controls to their ASP.NET counterparts, change the configuration XML file to its respective web version, etc. Do a search on Google on this phrase and you'll get tons of tutorials and tools: convert windows forms to web forms

Upvotes: 0

Joel Coehoorn
Joel Coehoorn

Reputation: 416141

You can use .Net Windows Forms controls in a web page, but it's IE-only and real pain to get working. I've never seen it done personally and only heard bad things from those I know who've tried.

A better option is that ASP.Net has it's own kind of control. You can try to convert your Windows Forms controls into ASP.Net user controls. This isn't going to be easy, either. There will some things your windows forms controls do that just don't translate to the web very well.

Really, your best option is unfortunately to redesign your interface. If you can move the business logic for your program to a dll, you should be able to at least share that between both projects.

Upvotes: 2

SLaks
SLaks

Reputation: 888205

No, there isn't. (Except using ActiveX and XBAP)

Upvotes: 0

Related Questions