Salut Kwai,
@RV
Pour info, ce code y marche pas chez moi (Normal )
Premièrement...t'as un écran?
Balancer un code qui ne marche pas alors ouais je te réponds qu'effectivement ce n'est pas normal!
Je l'ai pourtant testé dans tous les sens avant de le poster et chez moi il marche nickel!
Mais avant de se lancer dans un recherche du 'Pourquoi il marche chez moi et pas chez toi?',
y a plus simple...prenons la soluce de Denis!
Si si...crois-moi il a fait ses preuves!
Pour ma part je dirais un grand merci à Denis pour son code!
Je ferai autrement maintenant!
Voila ce que je voulais faire.
Code : Tout sélectionner
SystemParametersInfo_(#SPI_GETWORKAREA,0,@Ecran.RECT, 0)
Largeur_Ecran = Ecran\right - Ecran\Left
Hauteur_Ecran = Ecran\bottom - Ecran\top
CreateImage(0,Largeur_Ecran,Hauteur_Ecran)
StartDrawing(ImageOutput(0))
Box(0,0,Largeur_Ecran,Hauteur_Ecran,RGB(255,255,255))
Box(1,1,Largeur_Ecran-2,Hauteur_Ecran-2,RGB(0,0,0))
LineXY(0,0,Largeur_Ecran,Hauteur_Ecran,RGB(255,255,255))
LineXY(Largeur_Ecran,0,0,Hauteur_Ecran,RGB(255,255,255))
txt$="Echap pour quitter"
DrawText((Largeur_Ecran-TextWidth(txt$))/2,(Hauteur_Ecran-TextHeight(txt$))/2,txt$,RGB(0,0,0),RGB(255,255,255))
StopDrawing()
If OpenWindow(0, Ecran\left, Ecran\top, Largeur_Ecran, Hauteur_Ecran, "PureBasic Window", #PB_Window_BorderLess) ;#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
StartDrawing(WindowOutput(0))
DrawImage(ImageID(0),0,0)
StopDrawing()
Repeat
EventID = WaitWindowEvent()
Until GetAsyncKeyState_(#VK_ESCAPE)
EndIf
End
J'ai pris le fameux bon bout de code de Denis (SystemParametersInfo_()) en espérant qu'il ne me tapera sur les doigts!
Et pas dans les cou... non plus! (dit ma copine)
