Page 1 of 1

OpenWindow and Purebasic 4 beta 7 help please

Posted: Sun Mar 26, 2006 8:24 am
by jbernard13
Hello

I have to problem with my code and Purebasic 4.00 beta 7

impossible to post my window , however front the Beta 7 , it to go very well

Thank You for your assistance please

jbernard13

Code: Select all

Enumeration
 #fenetre_0
EndEnumeration 

Procedure test()
  If OpenWindow(#fenetre_0,0,0,800,600,"test Pb,4",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
  EndIf
EndProcedure


test()

 Repeat
 Select WaitWindowEvent()
  Case #PB_Event_CloseWindow
  fermer=0
 EndSelect 
 Until fermer=0
 End
  

Re: OpenWindow and Purebasic 4 beta 7 help please

Posted: Sun Mar 26, 2006 8:35 am
by PB
In your code, fermer=0 when the app starts, so therefore it quits immediately.
(Remember: all numeric variables are 0 by default).

So just put fermer=1 before the Repeat line and it works fine.

Posted: Sun Mar 26, 2006 8:48 am
by jbernard13
thank you very much PB