I'm not new to PB but normally use comand line executeables
I was trying several times on different computers and different windows version to create window frontend.
I allways ran into the same problem and skipped window frontends but sometimes it would be much better to make use of.
My problem is that the program windows allways freeze if i start another programm or another windows placed on top.
it doesn't depent on computing power or graphic card ... so what i'm doing wrong ?
place here an example code and hopefully receive a reply of someone. Thanks
used PB version 5.73 but same happens with other version.
Code: Select all
#WIN_MAIN = 0
#Button_Program_End = 9
#Text_Line1 = 20
Global Quit.b = #False
#FLAGS = #PB_Window_ScreenCentered
OpenWindow(#WIN_MAIN, 0, 0, 200, 100, "Pits-FTP-Tool V1.0 © @P. Hermann", #FLAGS)
If UseGadgetList(WindowID(#WIN_MAIN))
ButtonGadget(#Button_Program_End, 50, 100, 60, 25, "Exit")
TextGadget(#Text_Line1, 5, 50, 195, 25, "", #PB_Text_Center)
EndIf
SetActiveGadget(#Button_Program_End)
If LoadFont(99, "Arial", 10, #PB_Font_Bold)
SetGadgetFont(#Text_Line1, FontID(99))
EndIf
Repeat
Event.l = WaitWindowEvent()
Select Event.l
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_Program_End
Quit.b = #True
EndSelect
EndSelect
Gosub Wait
Until Quit.b = #True
End
Wait:
While (FormatDate("%hh:%ii", Date())) <> FTP_Start$
SetGadgetText(#Text_Line1,"Time : " + FormatDate("%hh:%ii:%ss", Date()))
Delay(1000)
Wend
Return