Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Center a graphic in a form
Message
From
23/10/1996 23:37:14
 
 
To
23/10/1996 22:39:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00010830
Message ID:
00010836
Views:
36
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform