Showing posts with label getting started with mono. Show all posts
Showing posts with label getting started with mono. Show all posts

Tuesday 3 June 2014

create you first app in Monodevelop csharp


  1. After Successfull Installation of MonoDevelop We will start with making our first Hello World App in MonoDevelop . If you have not Installed MonoDevelop you can get Installation Guide here

    Installation Guide For MonoDevelop
  2. Start you M onoDevelop that you have installed already. It opens with following screen
      Gtk# version 2.12.9 or greater must be installed

  3. Now to create a simple app in MonoDevelop Click on File Menu --> Then click on Solution
    Gtk# version 2.12.9 or greater must be installed

  4. Then a window appears Click on Gtk# project and give Project a Name and click oK
    Gtk# version 2.12.9 or greater must be installed

  5. Now your project open with a code window with Main.cs file as below
    Gtk# version 2.12.9 or greater must be installed

  6. Now right click on your proect in sidebar then click on Add and in Submenu click on New File
    Gtk# version 2.12.9 or greater must be installed

  7. Then click on Window give it a name and click ok
    Gtk# version 2.12.9 or greater must be installed

  8. You can see you have two views Designer and source view .Designer view will be used for Designing GUI for your application and source will be used for coding
    Gtk# version 2.12.9 or greater must be installed

  9. Now open new window file you have added and goto design view
  10. now from Toolbar in right sidebar Go to containers section and double click on Fixed Container to get it on your window
    Gtk# version 2.12.9 or greater must be installed

  11. Now take a button from Toolbar
    Gtk# version 2.12.9 or greater must be installed

  12. select the button Now click on properties window and click on Signals Tab
    Gtk# version 2.12.9 or greater must be installed

  13. Now click on Clicked property and give a valid name for click event function and Hit Enter
    Gtk# version 2.12.9 or greater must be installed

  14. Now first add reference to system.windows.forms Namespace for that Right click on project in sidebar and click on Edit Reference
    Gtk# version 2.12.9 or greater must be installed

  15. Search for system.windows.forms in search box and click check mark on check Box and click ok
    Gtk# version 2.12.9 or greater must be installed

  16. Now come to Souce view and you will see code like below

    protected void clickevent (object sender, EventArgs e)
    {
    throw new System.NotImplementedException ();
    }
  17. Remove " throw new System.NotImplementedException ();" line and Add line as below

    MessageBox.Show("Hello Welcome To Mono World");
  18. Now Save All your project change by pressing Ctrl + s
  19. Now Press F5 To Run your project and It will show output below
    Gtk# version 2.12.9 or greater must be installed