ENVI^ EnviMode=1
SET  ::WM_KEYDOWN=0x0100
SET  ::WM_KEYUP=0x0101
SET  ::WM_SYSKEYDOWN=0x0104
SET  ::WM_SYSKEYUP=0x0105
SET  ::VK_ALT=0x12

//临时禁用控件，响应AltMove,不变灰

Windows1
 _SUB Windows1,W360H440,控件上AltMove(不变灰),,,20,,-altmv
      SWIN  -:WinIn:SwinWin1,L0T0W360H440, 
      SET &bAlt=1  
      TIME -t:1 ,0,CALL * RegAltMove1
_END
 _SUB WinIn,W360H440,
      ITEM item1,l50t100w200h50,ABC
      ITEM item2,l50t160w200h50,ABC
      SET &SubCtr=item1 item2
      TIME -t:1 ,0,CALL * RegAltMove
_END

_SUB  ForAltMove
    @IFEX #%~1=%bAlt%, EXIT 
    WAIT -scan:%&VK_ALT% &&VAlt
    IFEX #0=%~1, IFEX #%VAlt%<0x80, EXIT
    IFEX #1=%~1, IFEX #%VAlt%>=0x80,  EXIT
    SET bAlt=%1
    ENVI @SwinWin1.Enable=%1
_END

_SUB  RegAltMove1 *
    ENVI @this.MSG=$%WM_KEYDOWN%::&&wp,&&lp, ForAltMove 0
    ENVI @this.MSG=$%WM_SYSKEYDOWN%::&&wp,&&lp, ForAltMove 0
    ENVI @this.MSG=$%WM_SYSKEYUP%::&&wp,&&lp, ForAltMove 1
_END

_SUB  RegAltMove *
    FORX * %&SubCtr%,&&Ctr,
    {*  ^ENVI @%&Ctr%.MSG=$%WM_KEYDOWN%::&&wp,&&lp, ForAltMove 0
        ^ENVI @%&Ctr%.MSG=$%WM_SYSKEYDOWN%::&&wp,&&lp, ForAltMove 0
        ^ENVI @%&Ctr%.MSG=$%WM_SYSKEYUP%::&&wp,&&lp, ForAltMove 1
    }
_END
