verutil.prg

来自「MSComm控件资料,Visual Basic 6.0(以下简称VB) 是一种功」· PRG 代码 · 共 74 行

PRG
74
字号
LPARAMETER tcDirectory

IF DIRECTORY( tcDirectory )
   
   LOCAL laVCX[1], ;
         lcCurDir, ;
         lcCurDir, ;
         lnNumVCX, ;
         lnRow, ;
         lcVCXName, ;
         lnPropLength, ;
         lnNumberOfVersionProperties, ;
         lnCount, ;
         lnVersionPropertyNameStart, ;
         lcVersionValue, ;
         lnVersionValueBegin, ;
         lnVersionValueEnd, ;
         lnVersionValueLength, ;
         lcVersion, ;
         lcNewProperties
         
   lcCurDir = SYS(5) + CURDIR()
   CD (tcDirectory)
   lnNumVCX = ADIR( laVCX, "*.VCX" )
   FOR lnRow = 1 TO lnNumVCX
      lcVCXName = laVCX[lnRow,1]
      USE ( tcDirectory + lcVCXName )
      SCAN

         SCATTER MEMO MEMVAR 
         lnPropLength = LEN(ALLTRIM(m.properties))

         lnNumberOfVersionProperties = OCCURS( UPPER("cVersion"), UPPER(m.properties) )
         FOR lnCount = 1 to lnNumberOfVersionProperties
                                     
            lnVersionPropertyNameStart = AT( UPPER("cVersion"), ;
                                                   UPPER(m.properties), ;
                                                   lnCount )
   
            IF lnVersionPropertyNameStart > 0
               *----------------------------------------------------------------------
               *-- Obtain a string that begins with the property name "cVersion"
               *---------------------------------------------------------------------- 
               lcVersionValue = SUBSTR( m.properties, lnVersionPropertyNameStart, 87)

               *---------------------------------------------------
               *-- Extract the value of the cSecurityLabel property
               *---------------------------------------------------                                
               lnVersionValueBegin  = AT( "=", lcVersionValue ) + 1
               lnVersionValueEnd    = AT( CHR(13), lcVersionValue )
               lnVersionValueLength = lnVersionValueEnd - lnVersionValueBegin
               lcVersion            = SUBSTR( lcVersionValue, ;
                                              lnVersionValueBegin, ;
                                              lnVersionValueLength )

               *-----------------------------------------------------------------------
               *-- If no Security Label has been assigned to this control, skip over it
               *-- and move to the next one.
               *-----------------------------------------------------------------------
               IF EMPTY( lcVersion )
                  LOOP
               ENDIF
               lcNewProperties = STRTRAN(m.properties,lcVersion,"06.00.0001")
               REPLACE properties WITH lcNewProperties
               
            ELSE
               LOOP
            ENDIF
         ENDFOR && -lnCount = 1 to lnNumberOfSecurityLabels
      ENDSCAN
      USE 
      COMPILE CLASSLIB ( tcDirectory + lcVCXName )
   ENDFOR
ENDIF

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?