<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Very small chart using PrintToDC</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Chart Control : Very small chart using PrintToDC]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Apr 2026 05:15:01 +0000</pubDate>
  <lastBuildDate>Tue, 31 May 2011 17:10:14 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=18461</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Very small chart using PrintToDC : Hi FabianThank you! Everything...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64680&amp;title=very-small-chart-using-printtodc#64680</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6811">robertmdc</a><br /><strong>Subject:</strong> 18461<br /><strong>Posted:</strong> 31 May 2011 at 5:10pm<br /><br />Hi Fabian<br>Thank you! Everything works fine!]]>
   </description>
   <pubDate>Tue, 31 May 2011 17:10:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64680&amp;title=very-small-chart-using-printtodc#64680</guid>
  </item> 
  <item>
   <title><![CDATA[Very small chart using PrintToDC : Hi Robertmdc  Probably the following...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64675&amp;title=very-small-chart-using-printtodc#64675</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=841">Fabian</a><br /><strong>Subject:</strong> 18461<br /><strong>Posted:</strong> 31 May 2011 at 9:54am<br /><br />Hi Robertmdc<DIV>&nbsp;</DIV><DIV>Probably the following code snippet in VB6 will help. but the result still depends on the printer resolution (BTW: I use the VSPrinter as canvas control):</DIV><DIV>&nbsp;</DIV><DIV>Public Sub DrawChart(VSPrinter1 As VSPrinter, ChartControl1 As ChartControl, ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long, Optional ByVal AsBitmap_OK As Boolean = False)<BR>&nbsp; Const MM_ISOTROPIC = 7<BR>&nbsp; Const MM_ANISOTROPIC = 8<BR>&nbsp; Dim Path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As String<BR>&nbsp; Dim OldMapMode&nbsp;&nbsp;&nbsp; As Long<BR>&nbsp; Dim OldVE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As POINTAPI<BR>&nbsp; Dim OldWE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As POINTAPI<BR>&nbsp; Dim OldOrg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As POINTAPI<BR>&nbsp; Dim OldSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As POINTAPI<BR>&nbsp; Dim PW&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As Long<BR>&nbsp; Dim ph&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As Long<BR>&nbsp; <BR>&nbsp; If AsBitmap_OK Then<BR>&nbsp;&nbsp;&nbsp; Path = GetTempPathName() + ".BMP"<BR>&nbsp;&nbsp;&nbsp; Call ChartControl1.SaveAsImage(Path, (x2 - x1) / Screen.TwipsPerPixelX, (y2 - y1) / Screen.TwipsPerPixelY)<BR>&nbsp;&nbsp;&nbsp; Call VSPrinter1.DrawPicture(LoadPicture(Path), x1, y1, x2 - x1, y2 - y1)<BR>&nbsp;&nbsp;&nbsp; Call KillFiles(Path)<BR>&nbsp; Else<BR>&nbsp;&nbsp;&nbsp; PW = (VSPrinter1.PageWidth - 1440) / VSPrinter1.TwipsPerPixelX<BR>&nbsp;&nbsp;&nbsp; ph = (VSPrinter1.PageHeight - 1440) / VSPrinter1.TwipsPerPixelY / 3<BR>&nbsp;&nbsp;&nbsp; OldMapMode = SetMapMode(VSPrinter1.hDC, MM_ISOTROPIC)<BR>&nbsp;&nbsp;&nbsp; Call SetWindowOrgEx(VSPrinter1.hDC, 0, 0, OldOrg)<BR>&nbsp;&nbsp;&nbsp; Call SetWindowExtEx(VSPrinter1.hDC, PW, ph, OldWE)<BR>&nbsp;&nbsp;&nbsp; Call SetViewportExtEx(VSPrinter1.hDC, PW / 100, ph / 100, OldVE)<BR>&nbsp;&nbsp;&nbsp; Call ScaleViewportExtEx(VSPrinter1.hDC, 1200 / VSPrinter1.TwipsPerPixelX, 1, 1200 / VSPrinter1.TwipsPerPixelY, 1, OldSize)<BR>&nbsp;&nbsp;&nbsp; Call ChartControl1.PrintToDC(VSPrinter1.hDC, x1 / 12, y1 / 12, (x2 - x1) / 12, (y2 - y1) / 12)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Call SetWindowOrgEx(VSPrinter1.hDC, OldOrg.x, OldOrg.y, OldOrg)<BR>&nbsp;&nbsp;&nbsp; Call SetViewportExtEx(VSPrinter1.hDC, OldVE.x, OldVE.y, 0)<BR>&nbsp;&nbsp;&nbsp; Call SetWindowExtEx(VSPrinter1.hDC, OldWE.x, OldWE.y, 0)<BR>&nbsp;&nbsp;&nbsp; Call SetMapMode(VSPrinter1.hDC, OldMapMode)<BR>&nbsp; End If<BR>End Sub</DIV>]]>
   </description>
   <pubDate>Tue, 31 May 2011 09:54:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64675&amp;title=very-small-chart-using-printtodc#64675</guid>
  </item> 
  <item>
   <title><![CDATA[Very small chart using PrintToDC : Most easy way is to use our PrintPreview...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64655&amp;title=very-small-chart-using-printtodc#64655</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 18461<br /><strong>Posted:</strong> 30 May 2011 at 1:31pm<br /><br />Most easy way is to use our PrintPreview control from CommandBars.<div>for 15.0.3 we added new methods to show PrintPreview and send to printer.</div>]]>
   </description>
   <pubDate>Mon, 30 May 2011 13:31:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64655&amp;title=very-small-chart-using-printtodc#64655</guid>
  </item> 
  <item>
   <title><![CDATA[Very small chart using PrintToDC : On screen, this is my chart:To...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64634&amp;title=very-small-chart-using-printtodc#64634</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6811">robertmdc</a><br /><strong>Subject:</strong> 18461<br /><strong>Posted:</strong> 28 May 2011 at 5:00am<br /><br />On screen, this is my chart:<br><br><img src="uploads/6811/chart.jpg" height="503" width="715" border="0" /><br><br>To print, I use PrintToDC method (VB6):<br><br>&nbsp; Printer.Print " ";<br>&nbsp; ChartControl.PrintToDC Printer.hDC, 500, 500, 3000, 3000<br>&nbsp; Printer.EndDoc<br><br>...on Printer<br><br><img src="uploads/6811/charttoprint.jpg" height="643" width="457" border="0" /><br><br>Why chart and labels are very small?<br>How to print chart like "wysiwhg" using PrintToDC method?<br><br><br><br><br><br>]]>
   </description>
   <pubDate>Sat, 28 May 2011 05:00:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18461&amp;PID=64634&amp;title=very-small-chart-using-printtodc#64634</guid>
  </item> 
 </channel>
</rss>