tags:

views:

49

answers:

3

I'm working on an ASP.NET and someone asked me how much time it would cost to make the site.master appear like a Windows form. Basically, it should have a caption, an icon on the left, a minimize/maximize/close button on the right and preferably these should function similar to a real form. Also, it needs to have borders which can behave similar to a real form. (Thus, in some cases people could just resize them.)

(We're only supporting Internet Explorer 6 and higher and it's for an IntraNet application.)

My answer was: why would we ever want to have something like that inside a web browser? So he went away.

But I can't get it out of my head and it would look real cool to have a winform-like thing inside the website. So, just asking... Has anyone ever done such a thing and is willing to share his code?

+1  A: 

It is certainly possible to host user defined winforms controls in a browser (although I've only done it on a training course). Take a look here

Calanus
Yes but I think with IE only. Also it needs one to set the .NET permissions fro that website plus one mostly needs to add the site to trusted zone.
Ganesh R.
I won't get permission to use real webforms in this site so I need to emulate them, by drawing them myself through HTML and perhaps JavaScript. But security is set high so WinForms will not pop up in browsers. (And the server security would probably block such things too.)
Workshop Alex
+1  A: 

I think this will meet your needs:

http://www.codeproject.com/KB/cs/winforms2webforms.aspx

This will use only html. Hence one WILL NOT get all the features available in WinForms.

Ganesh R.
+1  A: 

Take a look at Visual WebGUI.

I used it a while back to bring an existing WinForms application to the web and it was surprisingly effective -- you just switch namespaces and, with only a few changes here and there, you get a running ASP.NET site.

Tiberiu Ana