Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: FoxPro FAQ


How to create a Print Preview toolbar to replace the default one. by Mike Gagnon
Posted: 26 Mar 04

  1. Create a program and place the following code in it.

  2. CODE

    Report Form C:\REPORT3.FRX Preview

    Define Class MyToolBar As Toolbar
        Caption = "Print Preview"
        Add Object cmdTop As CommandButton With;
            caption = "Top"
        Add Object cmdBack As CommandButton With;
            caption = "Previous"
        Add Object cmdNext As CommandButton With;
            caption = "Next"
        Add Object cmdLast As CommandButton With;
            caption = "End"
        Add Object cmdZoom As CommandButton With;
            caption = "Zoom"
        Add Object cmdPrint As CommandButton With;
            caption = "Print"
        Add Object cmdQuit As CommandButton With;
            caption = "Quit"
        Procedure cmdTop.Click
        Keyboard "{HOME}"
        Procedure cmdBack.Click
        Keyboard "{PGUP}"
        Procedure cmdNext.Click
        Keyboard "{PGDN}"
        Procedure cmdLast.Click
        Keyboard "{END}"
        Procedure cmdQuit.Click
        Keyboard "{ESC}"
        Procedure cmdZoom.Click
        Keyboard "Z"


    Procedure removeWindow
    If Wexist("Print Preview")
        Deactivate Window "Print Preview"

  3. In the init of the dataenviroment of the report, put the following:

  4. CODE

    Public oTbr
    oTbr = Createobject("MyToolBar")
    oTbr.Visible = .T.

  5. In the "On entry" band of the page header of the report, put :

  6. CODE


Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close