Is there a way to bring a window to the top? I have an alarm clock app. when it goes off I'd like for it to come on top of all other window. So far I'm using the minimize/restore trick.
Is there a better way?
Thanks
Is there a better way?
Thanks
SuperStrict 'End Of external Header File Global Window2:TGadget Global Window3:TGadget Window2:TGadget = CreateWindow:TGadget("Window2",475,99,169,71,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_STATUS |WINDOW_CLIENTCOORDS ) Local Window1:TGadget = CreateWindow:TGadget("Window1",267,127,329,182,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_STATUS |WINDOW_CLIENTCOORDS ) Local Button1:TGadget = CreateButton:TGadget("Window2",43,40,75,23,Window1:TGadget,BUTTON_PUSH) Local Button1_c2:TGadget = CreateButton:TGadget("Window3",43,98,75,23,Window1:TGadget,BUTTON_PUSH) Window3:TGadget = CreateWindow:TGadget("Window3",468,255,180,79,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_STATUS |WINDOW_CLIENTCOORDS ) Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE Select EventSource() Case Window2 Window2_WC( Window2:TGadget ) Case Window1 Window1_WC( Window1:TGadget ) Case Window3 Window3_WC( Window3:TGadget ) End Select Case EVENT_GADGETACTION Select EventSource() Case Button1 Button1_GA( Button1:TGadget ) Case Button1_c2 Button1_c2_GA( Button1_c2:TGadget ) End Select End Select Forever Function Window2_WC( Window:TGadget ) DebugLog "Window Window2 wants to be closed" ' HideGadget( Window:TGadget ) End End Function Function Window1_WC( Window:TGadget ) DebugLog "Window Window1 wants to be closed" ' HideGadget( Window:TGadget ) End End Function Function Window3_WC( Window:TGadget ) DebugLog "Window Window3 wants to be closed" ' HideGadget( Window:TGadget ) End End Function Function Button1_GA( Button:TGadget ) DebugLog "Button Button1 was pressed" ActivateWindow(Window2) End Function Function Button1_c2_GA( Button:TGadget ) DebugLog "Button Button1_c2 was pressed" HideGadget(Window3) ShowGadget(window3) End Function