Print Page | Close Window

print with dialog box

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=17979
Printed Date: 23 November 2024 at 8:54pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: print with dialog box
Posted By: samydavic
Subject: print with dialog box
Date Posted: 01 March 2011 at 10:16am
I need help...
I want to print a chart without the printpreview activex,
does anyone know how to do this?

thanks.






Replies:
Posted By: jpbro
Date Posted: 01 March 2011 at 10:52am
You can use the PrintToDc method with the Printer.Hdc to print the chart without any dialogs or other controls.

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Xander75
Date Posted: 02 March 2011 at 10:47am
Hi,

I have already asked this question to the CJ Support team.

If you need the Print Dialog the only current method is to display it in a hidden PrintPreview control then display the Print Dialog from there. It works as a workaround but I did suggest that a PrintChart method would be nice just as we have PrintReport & PrintReport2 for the ReportControl.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: jpbro
Date Posted: 02 March 2011 at 12:01pm
Why can't you use the CommonDialog print dialog and then print to the Printer.Hdc?

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: McKloony
Date Posted: 03 March 2011 at 3:44am
If I use:

ChCon.PrintToDC Printer.hDC, 400, 200, Printer.ScaleWidth - 400, Printer.ScaleHeight - 400

nothing happens.




-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6


Posted By: jpbro
Date Posted: 03 March 2011 at 8:08am
Does it work if you do this:


Printer.Print ""
ChCon.PrintToDc Printer.Hdc, 200, 200, Printer.Width - 400, Printer.Height - 400
Printer.EndDoc


?


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: McKloony
Date Posted: 03 March 2011 at 9:42am
It prints empty pages Cry

maybe it has something to do, taht it runs under VMWare.



-------------
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net