HomeProductsSupportDownloadsOnline StoreOnLine DocumentationLicensingAbout UsContact Us

Need technical support or assistance?

Click Here.

Please remember to read our guidelines first.

 

 

You will receive advance information about products and web updates as well as free software and source code that we will soon make available.

Subscribe Now

Once your subscription is activated you will receive instructions on how to leave the list.

 
     
Hundreds of free Visual Basic source code snippets, activeX controls, tutorials, tips, projects and articles covering VB.NET and VB6! Great code on topics like MAPI, winsock programming, COM, MTS, XML, graphics, threading, timers, networking, API's and more!
Welcome to the largest single directory of ASP.NET resources. This free directory links to examples, articles, and tutorials. A searchable code library allows you to find scripts. A daily newsletter keeps you up to date on the latest submissions.
Search the best developer Web sites and hundreds of developer newsgroups... updated every thirty minutes!

TN00006 - Maintaining a uniform scale when printing the ActiveGantt control with different resolution printers

Applies to:
  • ActiveGantt Scheduler Component for Visual Basic 6.0
  • ActiveGantt Scheduler Component for Visual C++ 6.0 (MFC ActiveX Control)
Summary:

The size of the ActiveGantt control will vary when sending the output to different resolution printer. A 300 dpi printer will print the ActiveGantt control correctly, while a 600dpi printer generates a much smaller output.

Originally when the control was developed, the TwipsPerPixel property of the printers that were used to test the control was 4. Some printers have a TwipsPerPixel property of 2.4, so the output will normally vary. To correct this problem you can use the following formula:



ScaleFactor = Scale * (4 / Printer.TwipsPerPixelX)

The Following example demonstrates the use of the formula in Visual Basic 6.0 code:



    With ActiveGanttVBCtl1
        .InitializePrinter #9/1/2003#, #1/7/2004#
        Printer.Print
        .PrintControl Printer.hDC, 0, 0, 16000, 4780, 30, 30, 400 * (4 / Printer.TwipsPerPixelX) , 0.25
        Printer.NewPage
         .PrintControl Printer.hDC, 0, 4781, 16000, 4780, 30, 30, 400 * (4 / Printer.TwipsPerPixelX), 0.25
        Printer.EndDoc
    End With

This code will ensure correct aspect independent of the printing device used.

Home | Products | Support | Downloads | OnLine Store

Online Documentation | Licensing | About Us | Contact Us

Privacy Terms of use Copyright (c)2002-2004 Source Code Store. All trademarks are property of their legal owner.