Window creation: Difference between revisions
mNo edit summary |
(Undo revision 7626 by Special:Contributions/Rh5Tji (User talk:Rh5Tji)) |
||
Line 1: | Line 1: | ||
{{task}} |
|||
[http://klohy.info/img/styles/km-bmw.htm km0 bmw 530 auto km 0] [http://veggis.org.cn/resources/articles/just-for.htm just for you richie lionel] [http://xionny.cn/topic/scott-home/ scott home theatre] [http://funkall.us/images/small/carnet-di/ carnet di ballo] [http://svike.info/view/new/batteria-per.htm batteria per mp3] [http://budget7i.info/lib/umano-non/ umano non umano] [http://soler.net.cn/data/sito-ufficiale.htm sito ufficiale gigi d alessio] [http://polex.com.cn/resources/articles/nigri.htm nigri] [http://xionny.cn/topic/nike-air/ nike air terra] [http://xionny.cn/topic/collegio-periti/ collegio periti palermo] [http://veggis.org.cn/resources/articles/que-lloro.htm que lloro de sin bandera] [http://polex.com.cn/resources/articles/mercedes-a.htm mercedes a 180] [http://manoke.cn/topic/heredia/ heredia] [http://manoke.cn/topic/ufficio-/ ufficio - macchine e attrezzature] [http://svike.info/view/new/pantaloni.htm pantaloni 40] [http://veggis.org.cn/resources/articles/nokia-rsmmc.htm nokia rs-mmc dv] [http://joperan.org/data/miguel-bose/ miguel bose super superman] [http://xionny.cn/topic/medieval/ medieval] [http://primonona.info/content/view/stampante-epson/ stampante epson a3] [http://manoke.cn/topic/la-vie/ la vie zero] [http://soler.net.cn/data/s-audi.htm s6 audi] [http://soler.net.cn/data/tempo-di.htm tempo di uccidere] [http://manoke.cn/topic/x-ray/ x ray murder boom boom] [http://veggis.org.cn/resources/articles/zilliacus-emil.htm zilliacus, emil] [http://sneck.info/data/cucina-it/ cucina it] [http://joperan.org/data/leadtek-gps/ leadtek gps 9537 bluetooth] [http://soler.net.cn/data/webandsee.htm webandsee] [http://funkall.us/images/small/grossisti-di/ grossisti di componenti per computer] [http://sneck.info/data/programma-per/ programma per mix] [http://klohy.info/img/styles/lana-pantalone.htm lana pantalone] [http://budget7i.info/lib/afrancesados/ afrancesados] [http://funkall.us/images/small/universita-la/ universita la sapienza] [http://sneck.info/data/poligonos/ poligonos] [http://xionny.cn/topic/amici-/ amici inamorati] [http://soler.net.cn/data/mondiali.htm mondiali] [http://joperan.org/data/poveri/ poveri] [http://veggis.org.cn/resources/articles/donna-inculata.htm donna inculata] [http://sneck.info/data/autobus-per/ autobus per papi di lusso] [http://sneck.info/data/the-lord/ the lord of king] [http://xionny.cn/topic/pyet-hp/ py507et hp] [http://wedner.info/content/view/growe-cube.htm growe cube ver.3] [http://xionny.cn/topic/film-dvd/ film dvd cristian de sica] [http://polex.com.cn/resources/articles/didattica-scuola.htm didattica scuola primaria] [http://klohy.info/img/styles/giochi-per.htm giochi per due persone] [http://sneck.info/data/riassunto-vino/ riassunto vino e pane] [http://polex.com.cn/resources/articles/testo-accordo.htm testo accordo canzone] [http://klohy.info/img/styles/tita.htm tita] [http://primonona.info/content/view/sesso-da/ sesso da vedere] [http://funkall.us/images/small/lettori-cd/ lettori cd e radio] [http://joperan.org/data/tengo-un/ tengo un amor de pablo herrera] [http://primonona.info/content/view/barba-camicie/ barba camicie] [http://funkall.us/images/small/carmen-electra/ carmen electra tutta nuda] [http://wedner.info/content/view/outpost.htm outpost 2] [http://manoke.cn/topic/cane-dogo/ cane dogo argentino] [http://sneck.info/data/gino-santercole/ gino santercole] [http://veggis.org.cn/resources/articles/milan-inno.htm milan inno] [http://svike.info/view/new/la-gang.htm la gang di laura] [http://primonona.info/content/view/celine-dion/ celine dion. au coeur du stade] [http://veggis.org.cn/resources/articles/marce-nuziali.htm marce nuziali da scaricare cd] [http://manoke.cn/topic/giorni-dinverno/ giorni dinverno] [http://manoke.cn/topic/blood-job/ blood job] [http://primonona.info/content/view/vild-danse/ vild danse] [http://sneck.info/data/ragazze-col/ ragazze col cazzo] [http://xionny.cn/topic/le-avventure/ le avventure di barbarossa] [http://soler.net.cn/data/ragazza-di.htm ragazza di vigevano] [http://xionny.cn/topic/auto-eten/ auto eten] [http://joperan.org/data/hotels-pisa/ hotels pisa] [http://klohy.info/img/styles/alainfournier.htm alain-fournier] [http://xionny.cn/topic/voli-austria/ voli austria] [http://sneck.info/data/antispam-free/ antispam free] [http://joperan.org/data/embu/ embu] [http://sneck.info/data/www-adm/ www adm it] [http://svike.info/view/new/dating-ads.htm dating ads] [http://sneck.info/data/www-muchmusic/ www muchmusic com ar] [http://wedner.info/content/view/croci-spa.htm croci spa] [http://soler.net.cn/data/aggiornamento-software.htm aggiornamento software cellulare] [http://budget7i.info/lib/www-ls/ www ls university com] [http://veggis.org.cn/resources/articles/delfynn-delage.htm delfynn delage] [http://budget7i.info/lib/volvo-v/ volvo v50 2 0] [http://svike.info/view/new/irradio-tv.htm irradio tv recorder] [http://sneck.info/data/collegio-sindacale/ collegio sindacale nella corporate] [http://joperan.org/data/verona/ verona 2000] [http://veggis.org.cn/resources/articles/clara-morgan.htm clara morgan] [http://klohy.info/img/styles/otago.htm otago] [http://polex.com.cn/resources/articles/lcd-panasonic.htm lcd panasonic 37] [http://soler.net.cn/data/nas-raid.htm nas raid] [http://soler.net.cn/data/inevitabilmente.htm inevitabilmente] [http://joperan.org/data/embarazadas-con/ embarazadas con perros] [http://wedner.info/content/view/epson-emp.htm epson emp 710] [http://klohy.info/img/styles/the-sun.htm the sun and the moon] [http://manoke.cn/topic/tv-upskirt/ tv upskirt] [http://soler.net.cn/data/pmr-oregon.htm pmr oregon scientific] [http://joperan.org/data/dvd-x/ dvd 8x hp da 100] [http://xionny.cn/topic/pornio-video/ pornio video] [http://primonona.info/content/view/polo-shirt/ polo shirt] [http://manoke.cn/topic/big-bolls/ big bolls] [http://polex.com.cn/resources/articles/graduatoria-incarichi.htm graduatoria incarichi dirigente scuola e] [http://primonona.info/content/view/naviscope/ naviscope] [http://budget7i.info/lib/mc-solaar/ mc solaar] [http://wedner.info/content/view/good-charlotte.htm good charlotte the chronicles of life] [http://joperan.org/data/volvo/ volvo 60] [http://budget7i.info/lib/assistenza-samsung/ assistenza samsung] [http://manoke.cn/topic/ballerine-brasiliane/ ballerine brasiliane cercasi] [http://polex.com.cn/resources/articles/windows-media.htm windows media palyer 9] [http://xionny.cn/topic/livre-de/ livre de chevet] [http://soler.net.cn/data/sharp-xvz.htm sharp xv-z90] [http://primonona.info/content/view/informagiovani-como/ informagiovani como] [http://wedner.info/content/view/directx.htm directx] [http://joperan.org/data/diana-spencer/ diana spencer accident] [http://budget7i.info/lib/ibiza-solo/ ibiza solo volo] [http://funkall.us/images/small/se-siamo/ se siamo uniti] [http://klohy.info/img/styles/af.htm af 28-300] [http://svike.info/view/new/scorpions.htm scorpions] [http://klohy.info/img/styles/attrezzatura-trekking.htm attrezzatura trekking] [http://veggis.org.cn/resources/articles/ristorante-portico.htm ristorante portico del seminario] [http://wedner.info/content/view/polar-power.htm polar power] [http://budget7i.info/lib/tiziana-lodato/ tiziana lodato] [http://manoke.cn/topic/dvd-verbatim/ dvd verbatim azo] [http://manoke.cn/topic/hard-disk/ hard disk scsi seagate] [http://sneck.info/data/movies-free/ movies free beach girls] [http://veggis.org.cn/resources/articles/carrelli-porta.htm carrelli porta moto] [http://xionny.cn/topic/sunstech-dvp/ sunstech dvp] [http://budget7i.info/lib/tabs-for/ tabs for nothing else matters] [http://manoke.cn/topic/canon-ef/ canon ef 24mm 1 4] [http://veggis.org.cn/resources/articles/ericsson.htm ericsson 337] [http://veggis.org.cn/resources/articles/coppie-sicilia.htm coppie sicilia] [http://svike.info/view/new/batteria-per.htm batteria per motorola] [http://manoke.cn/topic/fucile-pesca/ fucile pesca] [http://budget7i.info/lib/one-shot/ one shot vol 1] [http://svike.info/view/new/rime-dante.htm rime dante libri] [http://manoke.cn/topic/novella/ novella] [http://joperan.org/data/splender/ splender] [http://manoke.cn/topic/doc-programmazione/ doc programmazione matrix revolutions] [http://manoke.cn/topic/screensaver-dautore/ screensaver dautore...] [http://polex.com.cn/resources/articles/casse-acustiche.htm casse acustiche totem] [http://wedner.info/content/view/oroscopos.htm oroscopos] [http://xionny.cn/topic/la-segunda/ la segunda independencia] [http://sneck.info/data/tunisia-hotel/ tunisia hotel] [http://svike.info/view/new/www-google.htm www google3 com] [http://primonona.info/content/view/zecchinodoro/ zecchinodoro] [http://manoke.cn/topic/come-stai/ come stai di vasco rossi] [http://polex.com.cn/resources/articles/libri-gastronomia.htm libri gastronomia] [http://manoke.cn/topic/hotel-villamarina/ hotel villamarina di cesenatico] [http://polex.com.cn/resources/articles/ddr-pc.htm ddr pc 1600] [http://xionny.cn/topic/informadove/ informadove] [http://manoke.cn/topic/cristalreport/ cristalreport] [http://xionny.cn/topic/em-boy/ em boy] [http://funkall.us/images/small/silvia-vada/ silvia vada] [http://svike.info/view/new/racchettoni-da.htm racchettoni da spiaggia] [http://soler.net.cn/data/harry-potter.htm harry potter et la coupe de feu] [http://wedner.info/content/view/far-cry.htm far cry sdk] [http://svike.info/view/new/ritorno-a.htm ritorno a peyton place] [http://funkall.us/images/small/michener-james/ michener, james albert] [http://soler.net.cn/data/dvdxcopy-gold.htm dvdxcopy gold] [http://klohy.info/img/styles/iaa.htm iaa] [http://xionny.cn/topic/halpa-lento/ halpa lento] [http://soler.net.cn/data/www-alawar.htm www alawar com] [http://wedner.info/content/view/guida-ristoranti.htm guida ristoranti caserta] [http://xionny.cn/topic/laura-pausini/ laura pausini lyrics] [http://primonona.info/content/view/cd-the/ cd the avengers] [http://klohy.info/img/styles/latinovivo.htm latinovivo] [http://soler.net.cn/data/acer-n.htm acer n50 premium 512] [http://wedner.info/content/view/schiava-damore.htm schiava damore] [http://wedner.info/content/view/isola-d.htm isola d elba hotel] [http://primonona.info/content/view/john-philip/ john philip] [http://svike.info/view/new/athlon-via.htm athlon via k8t800 pro] [http://sneck.info/data/nortek-active/ nortek active] [http://budget7i.info/lib/wind-waker/ wind waker] [http://veggis.org.cn/resources/articles/mini-diffusori.htm mini diffusori] [http://veggis.org.cn/resources/articles/golf-generation.htm golf generation 2002] [http://manoke.cn/topic/fifa-work/ fifa work cup] [http://wedner.info/content/view/gps-tom.htm gps tom navigator] [http://budget7i.info/lib/lovely-sara/ lovely sara. princess sarah. vol. 01] [http://veggis.org.cn/resources/articles/hp-deskjet.htm hp deskjet serie 350] [http://wedner.info/content/view/hyundai-coupe.htm hyundai coupe 1.6] [http://primonona.info/content/view/video-porno/ video porno gratis pamela anderson] [http://funkall.us/images/small/siglinde/ siglinde] [http://manoke.cn/topic/tizianoferro/ tizianoferro] [http://soler.net.cn/data/capitan-harlock.htm capitan harlock. disc 2] [http://klohy.info/img/styles/the-aders.htm the aders] [http://soler.net.cn/data/montecatini-terme.htm montecatini terme albergo] [http://soler.net.cn/data/mercedes-e.htm mercedes e 200 kompr. avantgarde] [http://primonona.info/content/view/salopette/ salopette] [http://wedner.info/content/view/ospedale-buzzi.htm ospedale buzzi] [http://veggis.org.cn/resources/articles/the-one.htm the one that i want] [http://joperan.org/data/fr-david/ fr david] [http://primonona.info/content/view/kill-harry/ kill harry potter] [http://manoke.cn/topic/el-carro/ el carro de mustang] [http://wedner.info/content/view/uno-gioco.htm uno gioco da tavolo] [http://wedner.info/content/view/km-fiat.htm km0 fiat auto km 0] [http://wedner.info/content/view/viaggiare-toscana.htm viaggiare toscana] [http://joperan.org/data/radeon/ radeon 9800 256] [http://soler.net.cn/data/www-ufologia.htm www ufologia cl] [http://veggis.org.cn/resources/articles/ef.htm ef 28 200] [http://budget7i.info/lib/panasonic-m/ panasonic m70] [http://wedner.info/content/view/piastra-.htm piastra - tostapane] [http://joperan.org/data/pippo-inzaghi/ pippo inzaghi] [http://wedner.info/content/view/storage-viewer.htm storage viewer p 2000] [http://sneck.info/data/la-commissaria/ la commissaria] [http://budget7i.info/lib/les-paul/ les paul 100 epiphone] {{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 23:34, 28 August 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()