User Tools

Site Tools

Navigation:  Language Reference > App C - PROP: Runtime Properties > Complete Property List >====== PROP:Active ====== Previous pageReturn to chapter overviewNext page

A WINDOW, SYSTEM or IMAGE property. If the target is a WINDOW, PROP:Active returns 1 if the window is the active window, blank if not. Set to 1 to make the top window of a thread the active window.

If the SYSTEM variation is used, SYSTEM{Prop:Active} returns the number of active thread.

Setting PROP:Active to TRUE for an IMAGE control (runtime only) makes it active: it can be a parent/child of other controls and is painted separately without caching into the metafile of the owner window's background (i.e.,IMAGE controls with scroll bars).




X# = START(AnotherThread)        ! Start another thread



 OF EVENT:LoseFocus              ! When this window is losing focus

  IF Y# <;> X#                    ! check for the first focus change

   Window{PROP:Active} = 1       ! and return focus to this thread

   Y# = X#                       ! then flag first focus change completed




AnyActiveThread PROCEDURE !lets any calling procedure know what thread

ActiveThread LONG,AUTO !is active.


ActiveThread = SYSTEM{PROP:Active}

RETURN CHOOSE(ActiveThread = THREAD(), 0, ActiveThread)

prop_active.htm.txt · Last modified: 2021/04/15 15:57 (external edit)