Results 1 to 1 of 1

Thread: (VB6) Implement the Print method on any object

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,997

    (VB6) Implement the Print method on any object

    You can implement the Print method on any object with the IVBPrint interface (I discovered it some time ago thanks to The Trick).

    But besides the interface, you also need some code to handle it.
    This sample has in a class module the basics of that code.

    It prints on a form, just used as the canvas and also for comparison with the Form's own Print method.

    I'm posting this mainly trying to help the new Basics developers, just in case they can take any advantage of this information.

    As a side note: this Print method prints Unicode.

    Here is the Print method documentation on MSDN.

    I have also code for the implementation of all the other related properties and methods:
    Circle
    Line
    PaintPicture
    ScaleMode
    Scale
    ScaleLeft/ScaleTop/ScaleWidth/ScaleHeight
    ScaleX/ScaleY

    They are not included here, but if they are needed I could help.
    Attached Files Attached Files

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