Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print Preview
Message
 
To
13/06/2002 13:01:27
Jonathan Hayton
Cbl Business Solutions Limited
Leeds, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00668083
Message ID:
00668424
Views:
20
This message has been marked as the solution to the initial question of the thread.
Hi, Jonathan!

>>
Does anybody know how to set the zoom setting on the visual foxpro print preview programmatically.
<<

Here we are <s>! Put code similar like the following in the Click event of any buttom:
* starting the report's preview
REPORT FORM report3 PREVIEW NOWAIT

IF WEXIST( "print preview" )
   * Preview toolbar exists

   * BTW: Here you need additional stuff to save the mouse position!
   * Use MROW(), MCOL(), MWINDOW() for that job!

   * activate the Zoom combo
   MOUSE CLICK AT 20,170 PIXELS WINDOW "print preview"

   * set the wished zoom factor
   * (0-100%, 1-75%, 2-50%, 3-25%, 4-10%, 5-Zoom)
   LOCAL lnCount
   lnCount = 4

   * put the related key into the keyboard buffer
   KEYBOARD "{HOME}" + REPLICATE( "{DNARROW}", m.lnCount ) + "{ENTER}" CLEAR

   * BTW: Here you need additional stuff to restore the mouse position!
   * Use MOUSE command to do that job!

ENDIF
NOTE 1: This only works if the report preview toolbar is visible - but if not there isn't any interactive way to zoom the preview too <vbg>!
NOTE 2: This didn't work if the report preview toolbar is rearranged, e.g. in a vertical manner!
SeBaFlu
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform