HighTechTalks DotNet Forums  

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

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Running a C# program w/GUI through a web browser in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Magnus Gran-Jansen
 
Posts: n/a

Default Running a C# program w/GUI through a web browser - 05-10-2005 , 04:18 AM






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,
Magnus Gran-Jansen

Reply With Quote
  #2  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: Running a C# program w/GUI through a web browser - 05-10-2005 , 08:29 AM







"Magnus Gran-Jansen" <MagnusGranJansen (AT) discussions (DOT) microsoft.com> wrote in
message news:783D7256-2C34-4DA0-90F5-AFFADC3BA629 (AT) microsoft (DOT) com...
Quote:
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,
Magnus Gran-Jansen
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.




Reply With Quote
  #3  
Old   
Magnus Gran-Jansen
 
Posts: n/a

Default Re: Running a C# program w/GUI through a web browser - 05-10-2005 , 10:46 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?


"Peter van der Goes" wrote:

Quote:
"Magnus Gran-Jansen" <MagnusGranJansen (AT) discussions (DOT) microsoft.com> wrote in
message news:783D7256-2C34-4DA0-90F5-AFFADC3BA629 (AT) microsoft (DOT) com...
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,
Magnus Gran-Jansen

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.




Reply With Quote
  #4  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: Running a C# program w/GUI through a web browser - 05-10-2005 , 12:48 PM




"Magnus Gran-Jansen" <MagnusGranJansen (AT) discussions (DOT) microsoft.com> wrote in
message news:4F3111C7-3358-47E8-908C-C9A3783812E0 (AT) microsoft (DOT) com...
Quote:
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?


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.




Reply With Quote
  #5  
Old   
Magnus Gran-Jansen
 
Posts: n/a

Default Re: Running a C# program w/GUI through a web browser - 05-10-2005 , 01:18 PM



Here is some information on it:
http://www.syncfusion.com/FAQ/Window...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.

"Peter van der Goes" wrote:

Quote:
"Magnus Gran-Jansen" <MagnusGranJansen (AT) discussions (DOT) microsoft.com> wrote in
message news:4F3111C7-3358-47E8-908C-C9A3783812E0 (AT) microsoft (DOT) com...
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?


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.




Reply With Quote
  #6  
Old   
Alvin Bruney [MVP - ASP.NET]
 
Posts: n/a

Default Re: Running a C# program w/GUI through a web browser - 05-11-2005 , 06:13 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 (AT) discussions (DOT) microsoft.com> wrote in
message news:FDFB6AB1-0890-4F69-9724-82915D89E0E8 (AT) microsoft (DOT) com...
Quote:
Here is some information on it:
http://www.syncfusion.com/FAQ/Window...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.

"Peter van der Goes" wrote:


"Magnus Gran-Jansen" <MagnusGranJansen (AT) discussions (DOT) microsoft.com> wrote
in
message news:4F3111C7-3358-47E8-908C-C9A3783812E0 (AT) microsoft (DOT) com...
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?


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.






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.