OpenWindow and Purebasic 4 beta 7 help please

Everything else that doesn't fall into one of the other PB categories.
jbernard13
User
User
Posts: 21
Joined: Sun Feb 13, 2005 10:47 pm

OpenWindow and Purebasic 4 beta 7 help please

Post 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
  
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: OpenWindow and Purebasic 4 beta 7 help please

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
jbernard13
User
User
Posts: 21
Joined: Sun Feb 13, 2005 10:47 pm

Post by jbernard13 »

thank you very much PB
Post Reply