Centrage de fenetre
Bonjour,
voila je vsui un debutant en progrmation et je veus faire un jeu video simple mais je n'arive pas a center la fenetre du jeu
je suis sous just basic
voici le code en question
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
upperLeftY=int((DisplayHeight-WindowHeight)/2)
pouvez vous m'aidez??
voila je vsui un debutant en progrmation et je veus faire un jeu video simple mais je n'arive pas a center la fenetre du jeu
je suis sous just basic
voici le code en question
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
upperLeftY=int((DisplayHeight-WindowHeight)/2)
pouvez vous m'aidez??
Configuration: Windows XP Firefox 3.0.11
2 réponses
-
alors personne???
-
ContributeurNOMAINWIN
WindowWidth=300
WindowHeight=100
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
BUTTON #1.btn, "CLOSE", [quit], LL, 120, 10, 60, 30
OPEN "My First GUI" FOR WINDOW AS #1
PRINT #1, "trapclose [quit]"
WAIT
[quit]
CLOSE #1
END