/* * 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); } }