[RESOLVED] What is the API function for convert any scale for twips or characters?
i understand that, normaly, the API functions works in pixels or in the client coordinates. but imagine that i need convert that coordenates to character or twips, what function can i use?
Re: What is the API function for convert any scale for twips or characters?
I believe you'll have to call the SetMapMode function. See Mapping Modes and Translations for additional details.
Re: What is the API function for convert any scale for twips or characters?
Quote:
Originally Posted by
Bonnie West
how can i declare SetMapMode() in VB2010?
Re: What is the API function for convert any scale for twips or characters?
I don't know to declare it in VB2010, but in VB6, you would declare the 2 parameters and the return value of SetMapMode As Long, that is, they are all 32 bits wide (4 Bytes).
Re: What is the API function for convert any scale for twips or characters?
Quote:
Originally Posted by
Bonnie West
ok..thanks for all
if MM_TEXT is for pixels, what is for text scalemode? is the MM_TWIPS?
Re: What is the API function for convert any scale for twips or characters?
Quote:
Originally Posted by
joaquim
if MM_TEXT is for pixels, what is for text scalemode? is the MM_TWIPS?
If by "text" you mean character (as you've mentioned above), then according to VB6's ScaleX, ScaleY Methods:
vbCharacters |
4 |
Character (horizontal = 120 twips per unit; vertical = 240 twips per unit). |
To convert any scalemode to Character, it must be converted first to Twips.
BTW, doesn't VB2010 have methods equivalent to VB6's ScaleX and ScaleY methods?
Re: What is the API function for convert any scale for twips or characters?
Quote:
Originally Posted by
Bonnie West
If by "text" you mean
character (as you've mentioned above), then according to VB6's
ScaleX, ScaleY Methods:
vbCharacters |
4 |
Character (horizontal = 120 twips per unit; vertical = 240 twips per unit). |
To convert any scalemode to Character, it must be converted first to Twips.
BTW, doesn't VB2010 have methods equivalent to VB6's ScaleX and ScaleY methods?
no... they put pixel by defauld. but i'm trying don't need convert them too;)
thanks for all