Skip to content

Tutorial 1 Hello Eto.Forms

Curtis Wensley edited this page Feb 16, 2018 · 9 revisions

This tutorial will teach you how to create a simple "Hello World" application using Eto.Forms

  1. Follow Quick Start to create your solution

  2. Create a new class for your main form:

    class MyForm : Eto.Forms.Form
    {
    	public MyForm()
    	{
    		// sets the client (inner) size of the window for your content
    		this.ClientSize = new Eto.Drawing.Size(600, 400);
    
    		this.Title = "Hello, Eto.Forms";
    	}
    }
  3. In your Main() method, create an Application object and run using your form (if you haven't used one of the project templates already):

    using System;
    
    class Startup
    {
    	[STAThread]
    	public static void Main(string[] args)
    	{
    		new Eto.Forms.Application().Run(new MyForm());
    	}
    }

Next: Tutorial 2 Menus and Toolbars