I have being long away from PB and now im finding this silly problem.
When i click the button the GUI freezes.
I dont want to use Threads, i need to use some timer.
Maybe i am tired but can't find the solution, any help are welcome. Thanks
Code: Select all
Procedure Run1(nada)
KillTimer_(WindowID(0),1)
Debug "RUN1"
Repeat
Delay(1000)
ilu+1
Debug ilu
Until a = 9
EndProcedure
Result = ExamineDesktops()
ww = DesktopWidth(0)
hh = DesktopHeight(0)-100
If OpenWindow(0,0,0,ww,hh,"",#PB_Window_SystemMenu )
TextGadget(30,10,7,100,25,"Enter")
StringGadget(31,100,5,400,25,"")
ButtonGadget(32,500,5,50,25,"GO")
PanelGadget(10,0,30,WindowWidth(0),WindowHeight(0))
AddGadgetItem(10,-1,"1")
AddGadgetItem(10,-1,"2")
AddGadgetItem(10,0-1,"3")
;CloseGadgetList()
Repeat
Event = WaitWindowEvent(100)
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 32
r = SetTimer_(WindowID(0),1,500,@Run1())
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
End

