all groups > dotnet academic > may 2005 >
You're in the

dotnet academic

group:

Running a C# program w/GUI through a web browser


Running a C# program w/GUI through a web browser Magnus Gran-Jansen
5/10/2005 1:18:03 AM
dotnet academic:
Hi,

I have many thousand lines of C# code that uses System.Windows.* frequently,
so it has a lot of GUI. This program processes data that is located on the
local machine and displays a graphical representation of this. I wish for
users to be able to use this program through the internet, where the machine
containing the data is the server.

The code that processes the data and the code that displays the graphical
interface is already written, but as a single program. Is there an easy way
of getting the client-server functionality without splitting the program or
writing too much code? Eg. executing the program through a web browser.

Thanks,
Re: Running a C# program w/GUI through a web browser Peter van der Goes
5/10/2005 7:29:47 AM

"Magnus Gran-Jansen" <MagnusGranJansen@discussions.microsoft.com> wrote in
message news:783D7256-2C34-4DA0-90F5-AFFADC3BA629@microsoft.com...
[quoted text, click to view]

You'll have to redesign the interface using the web controls, which will
also entail quite a bit of interface handling code rewrite. AFAIK, there is
no easy way to "convert" a Windows app to a web app. If the Windows app was
properly designed, the data processing functionality (in separate methods
from code involved with the GUI) should easily transfer.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

Re: Running a C# program w/GUI through a web browser Magnus Gran-Jansen
5/10/2005 7:46:01 AM
Hi,

First, thankyou for your answer!

I just found something interesting called "Hosting Windows Forms controls in
Internet Explorer", where I create a Windows Control Library. Have you heard
about that? Do you know if it could be used for this?


[quoted text, click to view]
Re: Running a C# program w/GUI through a web browser Magnus Gran-Jansen
5/10/2005 10:18:07 AM
Here is some information on it:
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c101c.aspx
http://www.15seconds.com/issue/030610.htm

I am currently having some problems getting just something basic of this to
work, but it seems like it is similar to Java applets.

[quoted text, click to view]
Re: Running a C# program w/GUI through a web browser Peter van der Goes
5/10/2005 11:48:39 AM

"Magnus Gran-Jansen" <MagnusGranJansen@discussions.microsoft.com> wrote in
message news:4F3111C7-3358-47E8-908C-C9A3783812E0@microsoft.com...
[quoted text, click to view]
No, I haven't. Hopefully somebody else will jump in with more info. Do you
have a link?

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

Re: Running a C# program w/GUI through a web browser Alvin Bruney [MVP - ASP.NET]
5/11/2005 6:13:49 PM
Hosting will not work for you without a lot of work. Part of the reason is
that your control is manipulating desktop objects. IE's sandbox architecture
does not allow this. So, one approach I can think of is to take the existing
assemblies you have and port the code to a visual basic 6 project where you
can construct an ActiveX control out of the existing code. The output of the
ActiveX control is an object with a CLSID. Take the CLSID and embed it in a
webforms page so it runs as a COM control. That part is easy, just use an
object tag with the correct ID. For instance,
<object id="myObj" CLSID="asdf23432"/>

The difficult part is porting the code to vb6. From there, IE will call the
component and it will pop the activeX permissions control object requesting
permissions to execute code on the desktop. makes sense?

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
"Magnus Gran-Jansen" <MagnusGranJansen@discussions.microsoft.com> wrote in
message news:FDFB6AB1-0890-4F69-9724-82915D89E0E8@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button