Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Center a graphic in a form
Message
De
23/10/1996 23:37:14
 
 
À
23/10/1996 22:39:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00010830
Message ID:
00010836
Vues:
37
Use low level file functions to open your bmp file and read 8 chars starting with the 16th. (First char in the file is the 1st. Count them from 1 not from 0.)
Be MyDimensions the string that contains these 8 chars.
BMPWidth=DWORDToInteger( left( MyDimensions, 4))
BMPHeight=DWORDToInteger( right( MyDimensions, 4))

Function DWORDToInteger
  LParameter DWORD
  Local RetValue
  if Len( DWORD) < 4
     DWORD=DWORD+Replicate( 4-Len(DWORD), chr(0))
  endif
  RetValue=Asc( Left( DWORD, 1))+;
           Asc( Substr( DWORD, 2, 1))*256+;
           Asc( Substr( DWORD, 3, 1))*65536+;
           Asc( Substr( DWORD, 4, 1))*16777216
Return RetValue && DWORDToInteger
It must work, but I didn't try it. Please let me know if it's working or not.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform