Click here to Skip to main content
15,902,757 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mouse Location Pin
Andreas Philipson20-Oct-03 8:24
Andreas Philipson20-Oct-03 8:24 
GeneralRe: Mouse Location Pin
Gary Kirkham20-Oct-03 9:03
Gary Kirkham20-Oct-03 9:03 
Generalfind I/O devices! Pin
waleed riaz20-Oct-03 1:49
waleed riaz20-Oct-03 1:49 
GeneralRe: find I/O devices! Pin
Heath Stewart20-Oct-03 6:20
protectorHeath Stewart20-Oct-03 6:20 
GeneralMaking a single control as Windows Forms Control and Web Forms Control Pin
Muhammad Nauman Khan20-Oct-03 1:00
Muhammad Nauman Khan20-Oct-03 1:00 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Mike Ellison20-Oct-03 1:52
Mike Ellison20-Oct-03 1:52 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Muhammad Nauman Khan20-Oct-03 2:16
Muhammad Nauman Khan20-Oct-03 2:16 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Judah Gabriel Himango20-Oct-03 4:40
sponsorJudah Gabriel Himango20-Oct-03 4:40 
Muhammad Nauman Khan wrote:
IF that is right then why can't we use a Windows Forms control in a Web Page?

You can. There are 2 ways to do this. One way is to create a .Net .exe as usual, then just navigate to the executable on the webserver; IE will use IEExec.exe to run the .exe in a sandbox. If your application is a Windows Forms app, the Form will be displayed as a new window.

Another option is to compile a System.Windows.Forms.UserControl as a .dll library, then reference that dll in an html's object tag like so

<object
="" id="anID
" classid="http:myAssemblyDll.dll#namespaceHere.ClassToInstanciateHere" height="300" width="300">


Where namespaceHere is the namespace containing the class to instanciate, and ClassToInstanciate is the name of the class whose constructor to call.

When using the latter method (UserControls in html), the UserControl will appear embedded inside the webpage, much like a Java applet would. For more information on using .Net assemblies in Internet Explorer, see www.csharphelp.com/archives/archive109.html or http://www.windowsforms.net/Forums/ShowForum.aspx?tabIndex=1&tabId=41&ForumID=17

Both of these options will work even from non-IIS servers such as Apache, buth there's more server scripting code needed to be done in order to get it to work on non-IIS servers.

Another option is the newly released (first released on Oct 6th) J# browser controls[^] Basically you could use them much like you would Java applets. If you don't like J#, you could write a small front-end in J# that would simply launch one of your C# assemblies.

The graveyards are filled with indispensible men.
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Judah Gabriel Himango20-Oct-03 5:06
sponsorJudah Gabriel Himango20-Oct-03 5:06 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 5:26
protectorHeath Stewart20-Oct-03 5:26 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Tomas Petricek20-Oct-03 5:09
Tomas Petricek20-Oct-03 5:09 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Judah Gabriel Himango20-Oct-03 5:23
sponsorJudah Gabriel Himango20-Oct-03 5:23 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 5:24
protectorHeath Stewart20-Oct-03 5:24 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Judah Gabriel Himango20-Oct-03 5:46
sponsorJudah Gabriel Himango20-Oct-03 5:46 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 6:03
protectorHeath Stewart20-Oct-03 6:03 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Judah Gabriel Himango20-Oct-03 8:34
sponsorJudah Gabriel Himango20-Oct-03 8:34 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 9:24
protectorHeath Stewart20-Oct-03 9:24 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
igor196020-Oct-03 9:46
igor196020-Oct-03 9:46 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 10:31
protectorHeath Stewart20-Oct-03 10:31 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
igor196020-Oct-03 10:46
igor196020-Oct-03 10:46 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 10:54
protectorHeath Stewart20-Oct-03 10:54 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
igor196020-Oct-03 11:00
igor196020-Oct-03 11:00 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 11:05
protectorHeath Stewart20-Oct-03 11:05 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Judah Gabriel Himango20-Oct-03 11:13
sponsorJudah Gabriel Himango20-Oct-03 11:13 
GeneralRe: Making a single control as Windows Forms Control and Web Forms Control Pin
Heath Stewart20-Oct-03 11:47
protectorHeath Stewart20-Oct-03 11:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.