Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_memberdata in Forms
Message
De
22/07/2005 11:29:52
 
 
À
22/07/2005 10:57:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01035124
Message ID:
01035136
Vues:
15
This message has been marked as the solution to the initial question of the thread.
Hi Greg.

>Does anyone know the logic in the _memberdata assignment when hacking the FORM table.

It's not just _memberdata; the format for any property over 255 bytes is different than those that are less.

The new format uses 517 CHR(1) characters as padding, followed by eight bytes containing the length of the property value, followed by the actual property value.

Here's some code, taken from the MemberData Editor, that extracts the value of the _memberdata property from the current Properties memo field in a VCX or SCX file. It could, of course, be modified to work with any property.
#define ccPROPERTIES_PADDING_CHAR  chr(1)
  * the padding character used for properties with values > 255 characters
#define cnPROPERTIES_PADDING_SIZE       517
  * the size of the padding area for properties with values > 255 characters
#define cnPROPERTIES_LEN_SIZE             8
  * the size of the length structure for properties with values > 255 characters

lnPos = at('_memberdata = ', PROPERTIES)
if lnPos > 0
  lnPos = lnPos + 14
  if substr(PROPERTIES, lnPos, 1) = ccPROPERTIES_PADDING_CHAR
    lnLen        = val(alltrim(substr(PROPERTIES, ;
      lnPos + cnPROPERTIES_PADDING_SIZE, ;
      cnPROPERTIES_LEN_SIZE)))
    lcMemberData = substr(PROPERTIES, lnPos + ;
      cnPROPERTIES_PADDING_SIZE + cnPROPERTIES_LEN_SIZE, ;
      lnLen)
  else
    lcMemberData = strextract(substr(PROPERTIES, lnPos), ;
      '', ccCR)
  endif substr(PROPERTIES, lnPos, 1) = ccPROPERTIES_PADDING_CHAR
...
Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform