General information
Category:
Forms & Form designer
Hi,
>>
I am wondering if there are any guidelines for working with these scenarios such that we can figure out the offset that is causing the discrepancies.
>>
The problems you're seeing probably arise because all your calculations are based on the screen resolution rather than that of the printer. To accurately calculate the amount of text which will fit into a specified physical space on the printer you'd have to resort to using API's such as GetTextExtentExPoint() using the specific printer hdc and then map this back to the physical screen.
Another potential problem is that not all fonts provide sufficiently accurate character sizing information - expecially when using italic etc.
Essentially, if you require real accuracy I don't think you can achieve it in VFP - we ended up building a set of VB ActiveX controls to do the job.
HTH,
Viv
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only