The below text was copied from VS.Net using CopySourceAsHtml:
1 using System;
2 using System.Windows.Forms;
3
4 public class ComegaForm : Form
5 {
6 Button test;
7 Button bye;
8
9 public ComegaForm () {
10
11 test = <Button>
12 <Name>Test</Name>
13 <Text>Hello</Text>
14 <ForeColor>Pink</ForeColor>
15 <Size>80,24</Size>
16 <Location>8,8</Location>
17 <BackColor>Salmon</BackColor>
18 </Button>;
19
20 test.Click += new EventHandler(this.OnButtonClick);
21
22
23 this.Controls.AddRange(new Control[]{ test });
24 }
25
26 void OnButtonClick(object sender, EventArgs e) {
27 MessageBox.Show("Comega!");
28 }
29
30 static void Main() {
31 Application.Run(<ComegaForm >
32 <Text>Comega Demo</Text>
33 <Width>500</Width>
34 <Height>400</Height>
35 <StartPosition>CenterScreen</StartPosition>
36 <BackColor>White</BackColor>
37 </ComegaForm > );
38 }
39
40
41 }