Au lieu d'utiliser la fonction OpenScreen(), vous allez créer la fenêtre d'une application avec la fonction OpenWindow()
Documentation : http://www.purebasic.com/french/documen ... indow.html
Deux façon de faire :
■ A l'ancienne.
Code : Tout sélectionner
Enumeration Window
#MainForm
EndEnumeration
;Mise en place de la fenêtre de l'application
OpenWindow(#MainForm, 0, 0, 500, 250, "Premiere feneêtre", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
Repeat : Until WaitWindowEvent(10) = #PB_Event_CloseWindow
Code : Tout sélectionner
Enumeration Window
#MainForm
EndEnumeration
;Plan de l'application
Declare Start()
Declare Exit()
Start()
Procedure Start()
;Mise en place de la fenêtre de l'application
OpenWindow(#MainForm, 0, 0, 500, 250, "Premiere feneêtre", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
;Procédure à déclencher quand on quitte l'application
BindEvent(#PB_Event_CloseWindow, @Exit())
Repeat : WaitWindowEvent() : ForEver
EndProcedure
Procedure Exit()
End
EndProcedure