Results 1 to 2 of 2

Thread: Print a form

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    IL
    Posts
    39

    Post

    I want to print ONE form, only ONE form. I want only printed what is visible on that form. How do I do this.

  2. #2
    Guest

    Post

    You coul use:
    PRINT FORM METHOD

    Syntax

    object.PrintForm

    The object placeholder represents an object expression that evaluates to an object in the Applies To list. If object is omitted, the Form with the focus is assumed to be object.

    Remarks

    PrintForm prints all visible objects and bitmaps of the Form object. PrintForm also prints graphics added to a Form object or PictureBox control at run time if the AutoRedraw property is True when the graphics are drawn.

    The printer used by PrintForm is determined by the operating system's Control Panel settings.

    Examples:
    This example uses the PrintForm method to print the current form. To try this example, paste the code into the Declarations section of a form. Place on the form any controls you want to see on the printed form, and then press F5 and click the form.
    Code:
    Private Sub Form_Click ()
    	Dim Msg	' Declare variable.
    	On Error GoTo ErrorHandler	' Set up error handler.
    	PrintForm	' Print form.
    	Exit Sub
    ErrorHandler:
    	Msg = "The form can't be printed."
    	MsgBox Msg	' Display message.
    	Resume Next
    End Sub
    This is straight from help.



    ------------------
    Boothman
    There is a war out there, and it is about who controls the information, it's all about the information.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width