@TEAM ENVI^ EnviMode=1|ENVI^ ForceLocal=1   //这个不能掉了，否则显示出来的因多次转换，而失真
SET  WM_SIZE=0x0005
SET SIZE_MAXHIDE=4
SET SIZE_MAXSHOW=3
SET SIZE_MAXIMIZED=2
SET SIZE_MINIMIZED=1
SET SIZE_RESTORED=0

_SUB WIN1,W750H680,进程查看器PECMD%PECMDVER%,,,,, -maxb -size 
    ENVI I=0
    SET-def  run=1
    CHEK BAUTO,L70T10W50H25,自动, CALL OnAuto,1  
    EDIT  -vcenter IntMs,L130T10W60H25,1000 
    ITEM ITEM3,L220T10W40H25,刷新, CALL OnT1 
    MEMO E1,L10T40W724H625,,,0x40  
//244,155    
    ENVI @WIN1.MSG=%&WM_SIZE%::&&wParm,&&lParm,CALL OnSize_WIN1 %&wParm%  %&lParm% 
    SCRN -win  &&maxX,&&maxY 
    ENVI @this.POS=0:0:%&maxX%:%&maxY%
    @TEAM TIME  T1, 0, CALL OnT1
    CALL OnAuto 
_END
call @WIN1
_SUB OnAuto
    IFEX $%BAUTO.Check%=1, CALL OnITEM2 ! CALL  OnITEM1
_END 
_SUB OnITEM1
    ENVI @T1=0
_END 
_SUB OnITEM2
    CALL OnT1
    CALC #IntMs=%IntMs%
    IFEX $%IntMs%<101, SET IntMs=1000
    ENVI @T1=%IntMs%
_END 
_SUB OnT1
    FIND --pid*@  &&V,
    ENVI. @E1=%&V%
_END

_SUB OnSize_WIN1
   TEAM ENVI &&sz=0| ENVI &&w=0| ENVI &&h=0
   IFEX $%1 = %&SIZE_MAXIMIZED%, ENVI &sz=1
   IFEX $%1 = %&SIZE_MAXSHOW%, ENVI &sz=1
   IFEX $%1 = %&SIZE_RESTORED%, ENVI &sz=1
//MESS wParm=[%1] [] sz=[%&sz%] @调试信息#OK
   IFEX $1=%&sz%,
   {
        ENVI &&LP=%2
        CALC #&w= %&LP% & 0xFFFF   //LOW
        CALC #&h= %&LP% / 0x10000  //HIGH
//MESS wParm=[%1] [%&w%,%&h%] sz=[%&sz%] @调试信息#OK

        CALC #&w= %&w% - 20
        CALC #&h= %&h% - 50
        
        ENVI @E1.POS=::%&w%:%&h%
   }
    
_END
