Code: Select all
Global hwnd,count
Procedure Restoresize(count)
Delay(count)
If GetWindowLong_(hwnd, #GWL_STYLE) & #WS_MINIMIZE
ShowWindow_(hwnd, #SW_RESTORE )
EndIf
Goto again
EndProcedure
count=2000
hwnd = OpenWindow(0, 0, 0, 400, 250, "Anti Minimize", #PB_Window_ScreenCentered| #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
again:
Thread = CreateThread(@Restoresize(), count)
Repeat
EventID.l = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
Quit = 1
EndIf
Until Quit = 1
End