Window creation: Difference between revisions
mNo edit summary |
(revert spam) |
||
Line 1: | Line 1: | ||
{{task}} |
|||
[http://hangzhau.cn/html/cavo-tv/ cavo tv accessori toshiba audio video] [http://zodip.info/description/noleggio-auto.htm noleggio auto brindisi] [http://hangzhau.cn/html/ti-sposero/ ti sposero jovanotti] [http://nibko.info/data/donne-nere.htm donne nere nude] [http://hangzhau.cn/html/educacion-en/ educacion en democracia en educacion ini] [http://italnet.net.cn/img/full-metal/ full metal alchemist] [http://puli.org.cn/web/pellegatti/ pellegatti] [http://puli.org.cn/web/halid/ halid] [http://nibko.info/data/sodimm-ddr.htm sodimm ddr333 memoria ram] [http://italnet.net.cn/img/cd-da/ cd da step] [http://zodip.info/description/geforce-fx.htm geforce fx 5700 go] [http://hangzhau.cn/html/liquefy-dei/ liquefy dei the servant] [http://hangzhau.cn/html/materiale-edile/ materiale edile] [http://italnet.net.cn/img/frigorifero-side/ frigorifero side by] [http://nibko.info/data/joypad-sony.htm joypad sony accessori ps2 console] [http://puli.org.cn/web/nordrheinwestfalen/ nordrhein-westfalen] [http://puli.org.cn/web/dalla-nuvolari/ dalla nuvolari] [http://puli.org.cn/web/la-casa/ la casa delle orchidee] [http://italnet.net.cn/img/nastolatki/ nastolatki] [http://hangzhau.cn/html/ferrovie-dello/ ferrovie dello stato] [http://nibko.info/data/il-pensiero.htm il pensiero] [http://zodip.info/description/interauto-s.htm interauto s p a] [http://italnet.net.cn/img/wildsnake-pinball/ wildsnake pinball soccer] [http://hangzhau.cn/html/emporio-k/ emporio k] [http://zodip.info/description/www-tsp.htm www tsp gov] [http://puli.org.cn/web/kenwood-krfvd/ kenwood krf-v4080d] [http://puli.org.cn/web/trust-easy/ trust easy scroll] [http://zodip.info/description/casle-attack.htm casle attack] [http://zodip.info/description/diagrama.htm diagrama] [http://nibko.info/data/www-capital.htm www capital com] [http://puli.org.cn/web/una-lezione/ una lezione particolare] [http://nibko.info/data/ferri-da.htm ferri da stiro da viaggio] [http://nibko.info/data/www-wwi.htm www wwi it] [http://nibko.info/data/genesi.htm genesi] [http://italnet.net.cn/img/il-ritorno/ il ritorno sotterraneo] [http://puli.org.cn/web/coppie-e/ coppie e pompini] [http://zodip.info/description/graphicconverter.htm graphicconverter] [http://puli.org.cn/web/costa-mediterranea/ costa mediterranea] [http://nibko.info/data/newporktimes.htm newporktimes] [http://puli.org.cn/web/testo-raf/ testo raf in tutti i miei giorni] [http://nibko.info/data/calendario-sexy.htm calendario sexy] [http://nibko.info/data/aculaser-c.htm aculaser c900 stampanti] [http://puli.org.cn/web/tapis-roulant/ tapis roulant turner vegas] [http://italnet.net.cn/img/previsione-metereologica/ previsione metereologica] [http://puli.org.cn/web/vivo-per/ vivo per lei di boccelli e giorgia] [http://zodip.info/description/www-prendicasa.htm www prendicasa it] [http://nibko.info/data/bmw-sicilia.htm bmw sicilia] [http://italnet.net.cn/img/nickelback-some/ nickelback some day] [http://hangzhau.cn/html/asse-stiro/ asse stiro foppapedretti asso] [http://zodip.info/description/password-single.htm password single] [http://hangzhau.cn/html/xxxsexy-girls/ xxxsexy girls] [http://italnet.net.cn/img/groovebird/ groovebird] [http://nibko.info/data/frasi-augurali.htm frasi augurali laurea] [http://italnet.net.cn/img/master-team/ master team] [http://nibko.info/data/calendario-di.htm calendario di calcio francese] [http://nibko.info/data/canciones-de.htm canciones de haash] [http://hangzhau.cn/html/distributori-lexicon/ distributori lexicon] [http://italnet.net.cn/img/pegu/ pegu] [http://zodip.info/description/progress.htm progress] [http://hangzhau.cn/html/meridiana/ meridiana] [http://hangzhau.cn/html/buffy/ buffy 5] [http://hangzhau.cn/html/due-pazzi/ due pazzi d amore] [http://puli.org.cn/web/gossip-su/ gossip su costantino vitagliano] [http://puli.org.cn/web/giochi-d/ giochi d amorew] [http://zodip.info/description/cellulare-suoneria.htm cellulare suoneria polifonica] [http://puli.org.cn/web/la-scogliera/ la scogliera dei desideri] [http://nibko.info/data/paolo-bagnasco.htm paolo bagnasco] [http://nibko.info/data/san-bartolomeo.htm san bartolomeo] [http://zodip.info/description/conquistare-ragazze.htm conquistare ragazze] [http://hangzhau.cn/html/la-sua/ la sua notte] [http://hangzhau.cn/html/tragico-oriente/ tragico oriente] [http://hangzhau.cn/html/foto-hunday/ foto hunday coupe] [http://puli.org.cn/web/op-/ op 27 n 2 chiaro di luna per pianoforte] [http://zodip.info/description/red-alert.htm red alert 2] [http://puli.org.cn/web/gardfield/ gardfield] [http://zodip.info/description/sony-cybershot.htm sony cyber-shot dsc-t7 black] [http://hangzhau.cn/html/inno-dei/ inno dei marine] [http://zodip.info/description/canzone-di.htm canzone di frankee] [http://puli.org.cn/web/golf-iv/ golf iv 25 years] [http://nibko.info/data/craps-online.htm craps online] [http://nibko.info/data/nokia-hs.htm nokia hs 3] [http://hangzhau.cn/html/fruscio/ fruscio] [http://hangzhau.cn/html/rendi-ingerman/ rendi ingerman] [http://hangzhau.cn/html/esercizio-gambe/ esercizio gambe] [http://nibko.info/data/la-tratta.htm la tratta delle bianche] [http://hangzhau.cn/html/b-b/ b b nel salento] [http://hangzhau.cn/html/non-posso/ non posso riposare] [http://nibko.info/data/jaguar-s.htm jaguar s type 27 d v6] [http://italnet.net.cn/img/unchained-ghost/ unchained ghost] [http://nibko.info/data/video-bruce.htm video bruce] [http://hangzhau.cn/html/veronica/ veronica] [http://nibko.info/data/ammortizzatori-sociali.htm ammortizzatori sociali] [http://puli.org.cn/web/gioco-games/ gioco games] [http://hangzhau.cn/html/co-primo/ co- (primo elemento di composti)] [http://puli.org.cn/web/sl/ sl 100] [http://zodip.info/description/il-blasco.htm il blasco] [http://zodip.info/description/foto-donne.htm foto donne gnocche] [http://hangzhau.cn/html/dragostea-din/ dragostea din tei techno] [http://zodip.info/description/cicli-giorgio.htm cicli giorgio] [http://hangzhau.cn/html/www-stronghold/ www stronghold it] [http://zodip.info/description/programmi-overnet.htm programmi overnet] [http://hangzhau.cn/html/lexmark-nastro/ lexmark nastro 4227] [http://zodip.info/description/chitarra-suona.htm chitarra suona] [http://zodip.info/description/robot-moulinex.htm robot moulinex cucina] [http://puli.org.cn/web/drivers-stampante/ drivers stampante hp download] [http://hangzhau.cn/html/diavoletti/ diavoletti] [http://zodip.info/description/come-scaricare.htm come scaricare canzoni gratis] [http://hangzhau.cn/html/anton-tanner/ anton tanner] [http://italnet.net.cn/img/do-you/ do you know where are you going to] [http://italnet.net.cn/img/daniel-redcliffe/ daniel redcliffe] [http://puli.org.cn/web/travaglio-di/ travaglio di parto] [http://zodip.info/description/testo-canzone.htm testo canzone latino americana] [http://zodip.info/description/order-vicodin.htm order vicodin] [http://zodip.info/description/moj-oprostaj.htm moj oprostaj] [http://hangzhau.cn/html/the-bone/ the bone snatcher. cacciatore di ossa] [http://italnet.net.cn/img/nefertiti-regina/ nefertiti regina del nilo] [http://puli.org.cn/web/alien-vs/ alien vs predator umd] [http://italnet.net.cn/img/fowler-henry/ fowler, henry watson] [http://zodip.info/description/foto-ermafroditi.htm foto ermafroditi] [http://nibko.info/data/hype.htm hype] [http://italnet.net.cn/img/teen-ager/ teen ager sesso gratis] [http://hangzhau.cn/html/ossimoro/ ossimoro] [http://zodip.info/description/iper-orio.htm iper orio] [http://zodip.info/description/celebrity-porn.htm celebrity porn] [http://zodip.info/description/viaggi-umbria.htm viaggi umbria] [http://puli.org.cn/web/archinto-rosellina/ archinto, rosellina] [http://zodip.info/description/mohicans.htm mohicans] [http://italnet.net.cn/img/randfontein/ randfontein] [http://zodip.info/description/scarica-suonerie.htm scarica suonerie ommitel it] [http://nibko.info/data/viacsess-key.htm viacsess key] [http://italnet.net.cn/img/vst/ vst] [http://hangzhau.cn/html/mario-piave/ mario piave] [http://italnet.net.cn/img/benassi-bro/ benassi bro] [http://zodip.info/description/il-cacciatore.htm il cacciatore solitario] [http://puli.org.cn/web/ho-officejet/ ho officejet 4255] [http://puli.org.cn/web/zittel-karl/ zittel, karl alfred von] [http://puli.org.cn/web/ad-perpetuam/ ad perpetuam rei memoriam] [http://hangzhau.cn/html/www-gta/ www gta3 it] [http://puli.org.cn/web/sky-disdetta/ sky disdetta] [http://hangzhau.cn/html/incontro-acqui/ incontro acqui terme] [http://italnet.net.cn/img/blackbabes/ blackbabes] [http://italnet.net.cn/img/link-ard/ link ard delgiorno] [http://hangzhau.cn/html/samsung-digimax/ samsung digimax 360] [http://hangzhau.cn/html/sony-vgnfsz/ sony vgn-fs215z] [http://hangzhau.cn/html/web-tv/ web tv] [http://zodip.info/description/programma-dizionario.htm programma dizionario] [http://hangzhau.cn/html/mcafee-personal/ mcafee personal firewall plus] [http://puli.org.cn/web/laguna-venezia/ laguna venezia] [http://hangzhau.cn/html/l-ipotesi/ l ipotesi arredamento caserta] [http://zodip.info/description/lat-machine.htm lat machine] [http://hangzhau.cn/html/africa-lontana/ africa lontana] [http://hangzhau.cn/html/rc-f/ rc f casse acustiche] [http://zodip.info/description/mouchette-.htm mouchette - tutta la vita in una notte] [http://zodip.info/description/sex-with.htm sex with animals video] [http://puli.org.cn/web/cassino/ cassino] [http://puli.org.cn/web/dvd-registrabili/ dvd registrabili 8 5] [http://zodip.info/description/pocatello.htm pocatello] [http://puli.org.cn/web/da-hypa/ da hypa] [http://hangzhau.cn/html/lacie-/ lacie 250 gb ethernet] [http://zodip.info/description/otto-kruger.htm otto kruger] [http://puli.org.cn/web/rob-dougan/ rob dougan clubbed] [http://hangzhau.cn/html/tv-/ tv 12 pollici] [http://italnet.net.cn/img/motorola-razrv/ motorola razrv3 cellulari] [http://puli.org.cn/web/tunturi-tf/ tunturi t80f] [http://nibko.info/data/www-oneone.htm www oneone] [http://zodip.info/description/videoregistratori-hifi.htm videoregistratori hi-fi] [http://zodip.info/description/fiat-panda.htm fiat panda prezzo] [http://nibko.info/data/volvo-v.htm volvo v70 metano km 0] [http://hangzhau.cn/html/pillola-delgiorno/ pillola delgiorno dopo] [http://nibko.info/data/moricone-mission.htm moricone mission] [http://hangzhau.cn/html/penne-delta/ penne delta] [http://puli.org.cn/web/jeep-col/ jeep col pelo] [http://hangzhau.cn/html/nadia-smartzee/ nadia smartzee] [http://nibko.info/data/venus-spa.htm venus spa] [http://hangzhau.cn/html/macchina-fotografica/ macchina fotografica digitale pocket] [http://nibko.info/data/sigma.htm sigma 300] [http://nibko.info/data/nel-palmo.htm nel palmo della mano] [http://hangzhau.cn/html/zyxel-prestige/ zyxel prestige 660hw] [http://nibko.info/data/isaak.htm isaak] [http://puli.org.cn/web/la-guerra/ la guerra dei cloni] [http://hangzhau.cn/html/kavirondo-kenya/ kavirondo (kenya)] [http://hangzhau.cn/html/progetto-concorso/ progetto concorso poesia scuola media] [http://nibko.info/data/dora.htm dora] [http://zodip.info/description/un-pizzico.htm un pizzico di fortuna] [http://italnet.net.cn/img/ristoranti-per/ ristoranti per matrimoni roma e dintorni] [http://puli.org.cn/web/dormire-monaco/ dormire monaco baviera] [http://puli.org.cn/web/steve-howe/ steve howe] [http://puli.org.cn/web/patto-di/ patto di sangue] [http://nibko.info/data/lavinie.htm lavinie] [http://hangzhau.cn/html/dizionario-lingua/ dizionario lingua giapponese] [http://puli.org.cn/web/maxtor-/ maxtor - hard disk diamond max plus] [http://nibko.info/data/case-abbandonate.htm case abbandonate] [http://hangzhau.cn/html/microsoft-frontpage/ microsoft frontpage] [http://puli.org.cn/web/pioneer-pdpslr/ pioneer pdp-s22-lr] [http://puli.org.cn/web/calendario-p/ calendario p] [http://nibko.info/data/tanti-augurio.htm tanti augurio] [http://puli.org.cn/web/il-cuore/ il cuore e uno zingaro di nicola di] [http://puli.org.cn/web/chat-roma/ chat roma] [http://hangzhau.cn/html/hd/ hd 755] [http://hangzhau.cn/html/pdak-imate/ pda2k i-mate] {{task}} |
|||
==[[C]]== |
==[[C]]== |
||
Line 35: | Line 35: | ||
} |
} |
||
==[[C plus plus|C |
==[[C plus plus|C++]]== |
||
[[Category:C plus plus]] |
[[Category:C plus plus]] |
||
===[[Qt]] 4=== |
===[[Qt]] 4=== |
||
Line 58: | Line 58: | ||
[[Category:Gtk]] |
[[Category:Gtk]] |
||
'''Compiler command:''' g |
'''Compiler command:''' g++ filename.cc -o test `pkg-config --cflags --libs gtkmm-2.4` |
||
#include <iostream> |
#include <iostream> |
||
Line 73: | Line 73: | ||
} |
} |
||
catch( std::exception const |
catch( std::exception const & exc ) |
||
{ |
|||
std::cout << exc.what() << std::endl ; |
|||
exit( -1 ) ; |
|||
} |
|||
exit( 0 ) ; |
|||
} |
|||
==[[C sharp|C#]]== |
|||
[[Category:C sharp]] |
|||
'''Platform:''' [[.NET]] 1.1 (or higher) |
|||
'''Compiler:''' [[Visual C sharp|Visual C#]] 2003 |
|||
'''Using:''' [[System.Windows.Forms.dll]] |
|||
using System; |
|||
using System.Windows.Forms; |
|||
public class Window |
|||
{ |
|||
[STAThread] |
|||
static void Main() |
|||
{ |
|||
Form newForm = new Form(); |
|||
newForm.Text = "It's a new Window!"; |
|||
newForm.Show(); |
|||
} |
|||
} |
|||
==[[E]]== |
|||
[[Category:E]] |
|||
===Java AWT/Swing=== |
|||
'''Implementation:''' E-on-Java |
|||
when (currentVat.morphInto("awt")) -> { |
|||
def w := <swing:makeJFrame>("Window") |
|||
w.setContentPane(<swing:makeJLabel>("Contents")) |
|||
w.pack() |
|||
w.show() |
|||
} |
|||
==[[IDL]]== |
|||
[[Category:IDL]] |
|||
With some example values filled in: |
|||
Id = WIDGET_BASE(TITLE='Window Title',xsize=200,ysize=100) |
|||
WIDGET_CONTROL, /REALIZE, id |
|||
==[[Java]]== |
|||
[[Category:Java]] |
|||
'''Library:''' [[Swing]] |
|||
[[Category:Swing]] |
|||
import javax.swing.JFrame; |
|||
import javax.swing.WindowConstants; |
|||
public class SimpleWindow { |
|||
public static void main(String[] args) { |
|||
JFrame window = new JFrame("This is a title!"); |
|||
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|||
window.setSize(800, 600); |
|||
window.setVisible(true); |
|||
} |
|||
} |
|||
==[[JavaScript]]== |
|||
[[Category:JavaScript]] |
|||
window.open("webpage.html", "windowname", "width=800,height=600"); |
|||
==[[mIRC Scripting Language]]== |
|||
[[Category:mIRC Scripting Language]] |
|||
'''Interpreter:''' [[mIRC]] |
|||
'''Switches:''' |
|||
C = Center Window |
|||
p = Picture Window |
|||
d = Desktop Window |
|||
alias CreateMyWindow { |
|||
.window -Cp +d @WindowName 600 480 |
|||
} |
|||
==[[Perl]]== |
|||
[[Category:Perl]] |
|||
'''Interpreter:''' [[Perl]] 5.8.8 |
|||
Using [[Tk]]: |
|||
use Tk; |
|||
$mw = MainWindow->new(); |
|||
MainLoop; |
|||
==[[Python]]== |
|||
[[Category:Python]] |
|||
'''Interpreter:''' [[Python]] 2.4, 2.5 |
|||
===[[Tkinter]]=== |
|||
[[Category:Tkinter]] |
|||
import Tkinter |
|||
w = tkinter.Tk() |
|||
w.mainloop() |
|||
===[[wxPython]]=== |
|||
[[Category:wxPython]] |
|||
from wxPython.wx import * |
|||
class MyApp(wxApp): |
|||
def OnInit(self): |
|||
frame = wxFrame(NULL, -1, "Hello from wxPython") |
|||
frame.Show(true) |
|||
self.SetTopWindow(frame) |
|||
return true |
|||
app = MyApp(0) |
|||
app.MainLoop() |
|||
===[[Pythonwin]]=== |
|||
[[Category:Pythonwin]] |
|||
import win32ui |
|||
from pywin.mfc.dialog import Dialog |
|||
d = Dialog(win32ui.IDD_SIMPLE_INPUT) |
|||
d.CreateWindow() |
|||
===[[PyGTK]]=== |
|||
[[Category:PyGTK]] |
|||
import gtk |
|||
window = gtk.Window() |
|||
window.show() |
|||
gtk.main() |
|||
==[[Ruby]]== |
|||
[[Category:Ruby]] |
|||
'''Interpreter:''' [[Ruby]] 1.8.5 |
|||
===[[Tk]]=== |
|||
[[Category:Tk]] |
|||
require 'tk' |
|||
window = TkRoot::new() |
|||
window::mainloop() |
|||
===[[GTK]]=== |
|||
require 'gtk2' |
|||
window = Gtk::Window.new.show |
|||
Gtk.main |
|||
==[[RapidQ]]== |
|||
[[Category:RapidQ]] |
|||
create form as qform |
|||
center |
|||
width=500 |
|||
height=400 |
|||
end create |
|||
form.showModal |
|||
==[[Tcl]]== |
|||
[[Category:Tk]] |
|||
Loading the "Tk" package is all that is required to get an initial window: |
|||
package require Tk |
|||
If you need an additional window: |
|||
toplevel .top |
|||
If you are using the increasingly popular [http://www.equi4.com/tclkit.html tclkit] under MS Windows, all you have to do is associate the tcklkit with the extension ".tcl" and then create an <i>empty</i> file with the name (e.g.) <tt>nothing.tcl</tt>. Douple-clicking that will "open a window" (an empty one). |
|||
==[[Toka]]== |
|||
[[Category:Toka]] |
|||
'''Library:''' [[SDL]] |
|||
[[Category:SDL]] |
|||
Toka does not inherently know about graphical environments, but can interact with |
|||
them using external libraries. This example makes use of the [[SDL]] library bindings |
|||
included with Toka. |
|||
needs sdl |
|||
needs case |
|||
sdl_event_size malloc is-data event |
|||
800 600 sdl_setup drop |
|||
#! Process events, exiting when the window is closed |
|||
[ |
|||
event SDL_WaitEvent drop |
|||
event sdl_event_type switch |
|||
SDL_QUIT [ bye ] case |
|||
TRUE |
|||
] keep whileTrue |
|||
==[[Visual Basic .NET]]== |
|||
[[Category:Visual Basic .NET]] |
|||
Framework: [[.NET]] |
|||
Dim newForm as new Form |
|||
newForm.Text = "It's a new window" |
|||
newForm.Show() |
Revision as of 12:12, 2 September 2007
You are encouraged to solve this task according to the task description, using any language you may know.
C
Compiler: GCC 4.0.3
Library: SDL
Compile Command: gcc -lSDL SDL_Window.c -o window
/* * Opens an 800x600 16bit color window. * Done here with ANSI C. */ #include <stdio.h> #include <stdlib.h> #include "SDL/SDL.h" main(){ SDL_Surface *screen; if (SDL_Init(SDL_INIT_VIDEO) != 0) { fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError()); return(1); } atexit(SDL_Quit); screen = SDL_SetVideoMode( 800, 600, 16, SDL_SWSURFACE | SDL_HWPALETTE ); }
C++
Qt 4
Compiler command: qmake -pro; qmake
#include <QApplication> #include <QMainWindow> int main(int argc, char *argv[]) { QApplication app(argc, argv); QMainWindow window; window.show(); return app.exec(); }
Gtk
Compiler command: g++ filename.cc -o test `pkg-config --cflags --libs gtkmm-2.4`
#include <iostream> #include <gtkmm.h> int main( int argc, char* argv[] ) { try { Gtk::Main m( argc, argv ) ; Gtk::Window win ; m.run( win ) ; } catch( std::exception const & exc ) { std::cout << exc.what() << std::endl ; exit( -1 ) ; } exit( 0 ) ; }
C#
Platform: .NET 1.1 (or higher)
Compiler: Visual C# 2003
Using: System.Windows.Forms.dll
using System; using System.Windows.Forms; public class Window { [STAThread] static void Main() { Form newForm = new Form(); newForm.Text = "It's a new Window!"; newForm.Show(); } }
E
Java AWT/Swing
Implementation: E-on-Java
when (currentVat.morphInto("awt")) -> { def w := <swing:makeJFrame>("Window") w.setContentPane(<swing:makeJLabel>("Contents")) w.pack() w.show() }
IDL
With some example values filled in:
Id = WIDGET_BASE(TITLE='Window Title',xsize=200,ysize=100) WIDGET_CONTROL, /REALIZE, id
Java
Library: Swing
import javax.swing.JFrame; import javax.swing.WindowConstants; public class SimpleWindow { public static void main(String[] args) { JFrame window = new JFrame("This is a title!"); window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); window.setSize(800, 600); window.setVisible(true); } }
JavaScript
window.open("webpage.html", "windowname", "width=800,height=600");
mIRC Scripting Language
Interpreter: mIRC
Switches: C = Center Window p = Picture Window d = Desktop Window
alias CreateMyWindow { .window -Cp +d @WindowName 600 480 }
Perl
Interpreter: Perl 5.8.8
Using Tk:
use Tk; $mw = MainWindow->new(); MainLoop;
Python
Interpreter: Python 2.4, 2.5
Tkinter
import Tkinter w = tkinter.Tk() w.mainloop()
wxPython
from wxPython.wx import * class MyApp(wxApp): def OnInit(self): frame = wxFrame(NULL, -1, "Hello from wxPython") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop()
Pythonwin
import win32ui from pywin.mfc.dialog import Dialog d = Dialog(win32ui.IDD_SIMPLE_INPUT) d.CreateWindow()
PyGTK
import gtk window = gtk.Window() window.show() gtk.main()
Ruby
Interpreter: Ruby 1.8.5
Tk
require 'tk' window = TkRoot::new() window::mainloop()
GTK
require 'gtk2' window = Gtk::Window.new.show Gtk.main
RapidQ
create form as qform center width=500 height=400 end create form.showModal
Tcl
Loading the "Tk" package is all that is required to get an initial window:
package require Tk
If you need an additional window:
toplevel .top
If you are using the increasingly popular tclkit under MS Windows, all you have to do is associate the tcklkit with the extension ".tcl" and then create an empty file with the name (e.g.) nothing.tcl. Douple-clicking that will "open a window" (an empty one).
Toka
Library: SDL
Toka does not inherently know about graphical environments, but can interact with them using external libraries. This example makes use of the SDL library bindings included with Toka.
needs sdl needs case
sdl_event_size malloc is-data event 800 600 sdl_setup drop
#! Process events, exiting when the window is closed [ event SDL_WaitEvent drop
event sdl_event_type switch SDL_QUIT [ bye ] case
TRUE ] keep whileTrue
Visual Basic .NET
Framework: .NET
Dim newForm as new Form newForm.Text = "It's a new window" newForm.Show()