Creating an application

using System;
using System.Windows.Forms;
using System.Drawing;

class Program
{
  public static void Main(string[] args)
  {

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(true);
    var f=new Form();
    f.SetBounds(0,0,100,100);
    Application.Run(f);
  }
}

Here's a screenshot of the application created on the Raspberry Pi which I connected to from a VNC session.

Screenshot of my 1st C# application

Running the application

First of all compile the application using the command gmcs windowapp.css /r:System.dll,System.Drawing.dll,System.Windows.Forms.dll. Note that there must be no spaces between the .dll filenames.

If successful, this will produce a windowapp.exe which can be executed from within an X Windows session.

Resources