Results 1 to 20 of 20

Thread: MCL Form Print Component

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    MCL Form Print Component

    One of the most common questions is "how can I print / print preview my form"? This is quite easily done by getting the form to "draw itself" on the printed page but this is often unsatisfactory because:
    * The location of components on the form may not be where you want them on the printed page
    * Text is drawn at screen resolution
    * Every control is drawn (e.g. buttons, the form border etc.)

    The attached component addresses the problem in a different manner.
    What you do is drop a FormPrintHelperComponent component onto your form an it extends each control with a bunch of new properties (look in the properties window for each control in the section named "MCL Form Print Helper"). You then set these to indicate:
    * Whether the control should be printed
    * Whether to print it as Text, Image or Owner Drawn
    * The boundary rectangle to print it in
    * The vertical / horizontal alignment within that area
    * Font and background/foreground colour to use etc.

    You can then preview the result in design time (the component has a smart tag menu) and preview or print it at run time.

    Additionally if you set the print mode for a control to be "owner drawn" the control will raise an event when the form is being printed to allow you to print the form however you feel ...

    (This is an early release - I'm going to add the niceties of grid printing and multi-page printing etc. at a later release)
    Attached Images Attached Images  
    Last edited by Merrion; May 9th, 2007 at 07:30 AM.

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