How to resolve the algorithm Hello world/Graphical step by step in the Oxygene programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Hello world/Graphical step by step in the Oxygene programming language

Table of Contents

Problem Statement

Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.).

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Hello world/Graphical step by step in the Oxygene programming language

Source code in the oxygene programming language

 





  True
  Hello World
  False
  True
  200
  100
  
  
    
      True
      False
      Farewell, cruel world.
    
  





// Display a Message in a GUI Window
//
// Nigel Galloway, April 18th., 2012.
//
namespace HelloWorldGUI;

interface

uses
  Glade, Gtk, System;

type
  Program = public static class
  public
    class method Main(args: array of String);
  end;

  MainForm = class(System.Object)
  private
    var
      [Widget] hworld: Gtk.Window;
  public
    constructor(args: array of String);
    method on_hworld_delete_event(aSender: Object; args: DeleteEventArgs);
  end;

implementation

class method Program.Main(args: array of String);
begin
  new MainForm(args);
end;

constructor MainForm(args: array of String);
begin
  inherited constructor;
  Application.Init();
  with myG := new Glade.XML(nil, 'HelloWorldGUI.Main.glade', 'hworld', nil) do myG.Autoconnect(self);
  Application.Run();
end;

method MainForm.on_hworld_delete_event(aSender: Object; args: DeleteEventArgs);
begin
  Application.Quit();
end;

end.

namespace HelloWorldNET;

interface

type
  App = class
  public
    class method Main;
  end;
  
implementation

class method App.Main;
begin
  System.Windows.MessageBox.Show("Farewell cruel world");
end;
  
end.

  

You may also check:How to resolve the algorithm Digital root step by step in the EasyLang programming language
You may also check:How to resolve the algorithm List comprehensions step by step in the F# programming language
You may also check:How to resolve the algorithm Comments step by step in the PowerShell programming language
You may also check:How to resolve the algorithm Apply a callback to an array step by step in the Clio programming language
You may also check:How to resolve the algorithm De Polignac numbers step by step in the J programming language