Pourtant, il y a bien un ecran d'ouvert !

look:
Code : Tout sélectionner
InitSprite()
InitMouse()
OpenWindow(0, 0, 0, 220, 160, "Un écran dans une fenêtre...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CreateGadgetList(WindowID(0))
ButtonGadget(0, 170, 135, 45, 20, "Quitter")
OpenWindowedScreen(WindowID(0), 0, 0, 160, 160, 0, 0, 0)
CreateSprite(0, 20, 20)
StartDrawing(SpriteOutput(0))
Box(0, 0, 20, 20, RGB(255, 0, 155))
Box(5, 5, 10, 10, RGB(155, 0, 255))
StopDrawing()
direction = 2
Repeat
Repeat
Event = WindowEvent()
Select Event
Case #PB_Event_Gadget
If EventGadget() = 0
End
EndIf
Case #PB_Event_CloseWindow
End
EndSelect
Until Event = 0
ExamineMouse() ; DISPARITION DU POINTEUR DE LA SOURIS !!!
FlipBuffers()
ClearScreen(RGB(0, 0, 0))
DisplaySprite(0, x, x)
x + direction
If x > 140 : direction = -2 : EndIf
If x < 0 : direction = 2 : EndIf
Delay(1)
ForEver