Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simple hello world app for straight go/nogo tests

svn path=/trunk/winforms/; revision=44917
  • Loading branch information...
commit ce7a189d9a547a7bcbf7025f9fbbd36f01e456c9 1 parent 5e1a291
Peter Dennis Bartok authored
Showing with 41 additions and 0 deletions.
  1. +7 −0 hello/Makefile
  2. +34 −0 hello/swf-hello.cs
View
7 hello/Makefile
@@ -0,0 +1,7 @@
+all: mono
+
+mono: swf-hello.cs
+ mcs swf-hello.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+
+clean:
+ rm swf-hello.exe -r -f
View
34 hello/swf-hello.cs
@@ -0,0 +1,34 @@
+//
+// Hello, SWF!
+//
+//
+
+
+// This application will produce a window 250x250 pixels in size
+// It will display "My first System.Windows.Forms application(TM)" centered in it
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace MWFTestApplication {
+ class MainWindow : System.Windows.Forms.Form {
+ public MainWindow() {
+ Label label;
+
+ ClientSize = new System.Drawing.Size (250, 250);
+
+ label = new Label();
+ label.Text = "My first System.Windows.Forms application(TM)";
+ label.Dock = DockStyle.Fill;
+ label.TextAlign = ContentAlignment.MiddleCenter;
+ this.Controls.Add(label);
+ Text = "Hello, System.Windows.Forms";
+
+ }
+
+ public static void Main(string[] args) {
+ Application.Run(new MainWindow());
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.