About "c # applet"

xiaoxiao2021-03-06  42

The following text comes from C # Expert, I am Wondering How To Build A C # Applet. I Built A Class Library with a Custom Control. But The Browser (IE6) Fails To Render It As an Object. Do you have some to show how to shop achieve this? By the way, can a C # applet be run under platforms without the .NET Framework pre-installed? there's no such concept as a C # "applet". At most, there are custom Windows forms controls that are embedded on a page Just Like IN Java, You Can't Run IT ITIMETIME INTIT MANINE. You can use the client machine. You can use the Tag to add it to an HTML Page: (zzj0820 Note: There is no so-called C # applet concept, and the C # Applet that is usually said is embedded in the form control in the browser.

Of course, similar to Java, you must install the corresponding runtime library on the client machine to use the Object tag control in the HTML page) The class ID contains the URL of the DLL for downloading and the fully qualified name of the class that implements the control. The library must not be placed on There are two simple examples below IIS / ASP.NET, I hope to help J EG1: description link / * * a Simple C # Program That Displays Some Text in A WebPage * Compile with: "CSC / T: library hello-world-applet.cs" * Run Byte Deploying in a WebPage with: * * Ben Bederson, January 16, 2002 * / using System; using System.Drawing; using System.Windows.Forms; public class HelloWorldApplet: System.Windows.Forms.Control {public HelloWorldApplet () {// Create a "label" control label label = new label (); label.text = "Hello World!"; Label.forecolor = color.blue; label.font = new font ("Arial", 24, fontstyle.bold); label.autosize = true; // insert the label controls.add (label) }} EG2: Original link C # AppletBy Lloyd DuPonti Want to Tell You How to Write C # applet, Display IT IN A Web Page and The Requirement.

The Requirement First, Your C # Applet Won't work anywhere nor from anywhere. You Should Put (AND Test) It on IIS, for unknown Reason (at Last Unknown to Me) This Won't work locally or with apache. BTW http: //www.brinkster.com make free ".NET" Hosting.Not Any Client Could Display A C # applet, You Surely Need IE6 and probably .NET SDK (At Last With The Configuration this Work Everywhere I Know).

After You Wrote Your Custom System.Windows.Forms.Control, Create It With a Parameterless Constructor (Which Will Be Called By IE) and wrap it in an assembly.

After You Could Display It Very Easily in A Web Page Like this:

and withid you could call it public method Vis JavaScript Like this