views:

59

answers:

5

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?

A: 

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

SLaks
Isn't Silverlight a possibility?
MusiGenesis
@MusiGenesis: Not for WinForms.
SLaks
It looks like it's possible to convert from WinForms to WPF, and then from WPF to Silverlight.
MusiGenesis
@MusiGenesis: Converting a WinForms app to WPF or Silverlight is non-trivial.
SLaks
I sure wouldn't try it.
MusiGenesis
+2  A: 

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.

Joel Coehoorn
+1. Web forms only have the control names in common, that's where the similarity ends.
Hans Passant
A: 

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

Alex
A: 

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

Bogi
A: 

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.

John