Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / C#

GTK# Beginners' Guide

Rate me:
Please Sign up or sign in to vote.
4.10/5 (16 votes)
5 Apr 20057 min read 181.8K   467   36  
Getting to know GTK#.
 using System;
 using Gtk;
 
 public class GtkHelloWorld {
  
   public static void Main() {
     Application.Init();

     //Create the Window
     Window myWin = new Window("My first GTK# Application! ");
     myWin.Resize(200,200);
     
     //Create a label and put some text in it.     
     Label myLabel = new Label();
     myLabel.Text = "Hello World!!!!";
          
     //Add the label to the form     
     myWin.Add(myLabel);
     
     //Show Everything     
     myWin.ShowAll();
     
     Application.Run();   
   }
 }

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Currently I'm an official developer on the Mono project.

I spend most my days hacking the Mono core as well as helping out in the open source Mono community. I'm also a contributor to many different projects focusing mostly on bring exsiting systems to new operating systems.

I currently contract my services out to anyone not doing anything open source. Contact me if you are looking for a contractor or you have interest in Mono support pacakge.

Comments and Discussions