Edit:
PROBLEM - If there is a webgadget in the window and it's minimized , when you try to use SetWindowState(#Window,#PB_Window_Normal) it will work ONLY if the focus is not in PB IDE/elsewhere however it won't be brought up on the current layer , stickywindow will help but then there's no way to set the focus , how do you fix this problem?
Test code proof
Code: Select all
OpenWindow(0,0,0,320,240,"",#PB_Window_Minimize | #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
WebGadget(0,0,0,320,240,"")
Global r
Procedure max(a)
Delay(1000)
SetWindowState(0,#PB_Window_Normal)
StickyWindow(0,1)
r=1
EndProcedure
CreateThread(@max(),0)
Repeat
If r=1
SetActiveWindow(0)
r=0
EndIf
Until WaitWindowEvent(10)=#WM_CLOSE


