Printer Settings
Printer Settings
I have a color printer and I want it to print in black and white mode my custom TeeChart. I work on VC++ 6.0.
I used the CPrintDlg dialog box to modify the printer settings. This code works because when i look the printer settings in Windows 2000, the modifications i made were correctly saved. In my code, I called next the GetPrinterDescription and SetPrinterIndex to link my TChart with the correct printer. In my custom TeePreviewPanel, I call the AddChartLink method to link my TChart to the TeePreviewPanel. I call next the PrintPage Method. But The PrintPage method does not use the modified printer settings. Why?
Because i create a custom TeeChart, i cannot use the ShowPreview Method to do this. I create my own TeePreviewPanel with my own behaviors. All works fine except that i cannot modify printer settings. Is there a solution?
thanx
I used the CPrintDlg dialog box to modify the printer settings. This code works because when i look the printer settings in Windows 2000, the modifications i made were correctly saved. In my code, I called next the GetPrinterDescription and SetPrinterIndex to link my TChart with the correct printer. In my custom TeePreviewPanel, I call the AddChartLink method to link my TChart to the TeePreviewPanel. I call next the PrintPage Method. But The PrintPage method does not use the modified printer settings. Why?
Because i create a custom TeeChart, i cannot use the ShowPreview Method to do this. I create my own TeePreviewPanel with my own behaviors. All works fine except that i cannot modify printer settings. Is there a solution?
thanx
Hi Fred,
I've just tried here (using vb), chaning the the printer settings of a printer to Black & White, and then just using :
TeePreviewPanel1.Chart = TChart1
TeePreviewPanel1.PrintPage
worked fine. Have you tried if changing th printer settings through Windows "Printers and Faxes" option works fine for you ?
I've just tried here (using vb), chaning the the printer settings of a printer to Black & White, and then just using :
TeePreviewPanel1.Chart = TChart1
TeePreviewPanel1.PrintPage
worked fine. Have you tried if changing th printer settings through Windows "Printers and Faxes" option works fine for you ?
Pep Jorge
http://support.steema.com
http://support.steema.com
I'am also breaking my neck on the same issue; I have exactly the same problem in VB.
I also created a custom printdialog and everything works fine, except color settings.
When windows print color settings are in color; and application is started, printing is done in color
When window print color settings are black & white, and application is started, printing is done in b&w
Using the settings button from the tc print preview, works indeed. And changing the settings with this button has no influence on windows print settings, which is great. I tried with vb commondialog and ms vbprinter dialog.dll(pss). Printer.colormode has apparantly no influence on color settings.
I hope Teechart will come with an answer soon
Bush
I also created a custom printdialog and everything works fine, except color settings.
When windows print color settings are in color; and application is started, printing is done in color
When window print color settings are black & white, and application is started, printing is done in b&w
Using the settings button from the tc print preview, works indeed. And changing the settings with this button has no influence on windows print settings, which is great. I tried with vb commondialog and ms vbprinter dialog.dll(pss). Printer.colormode has apparantly no influence on color settings.
I hope Teechart will come with an answer soon
Bush
When I change the printer settings through Windows "Printers and Faxes" option, it didn't work. It's still printing in Color Mode.
It didn't work either when using the CPrintDlg CommonDialog. Same problem as Bush but in VC++ 6.0. I cannot ask the user to change the settings by using the Windows Settings. You should try to modify the printer settings by code and you will see that TChart doesn't use the settings modified.
My custom TChart is a Draw of many TCharts in a single one to obtain a WYSIWYG Combo of TChart (this means it keeps the color of background, axes ...). Maybe this could help.
I use TeeChart V6
PS : Edit of my reply after several tests.
It didn't work either when using the CPrintDlg CommonDialog. Same problem as Bush but in VC++ 6.0. I cannot ask the user to change the settings by using the Windows Settings. You should try to modify the printer settings by code and you will see that TChart doesn't use the settings modified.
My custom TChart is a Draw of many TCharts in a single one to obtain a WYSIWYG Combo of TChart (this means it keeps the color of background, axes ...). Maybe this could help.
I use TeeChart V6
PS : Edit of my reply after several tests.
Last edited by Fred on Wed Apr 12, 2006 1:58 pm, edited 1 time in total.
Hello,
TeeChart loads the Windows-set printing options when loading an instance. Changing those settings at Windows level will not then change update the local printer settings after the Chart is loaded. Isolated in that way means that TeeChart print settings do not affect the Windows defaults.
We're looking at options. One option would be for us to add a method to TeeChart's Printer interface that calls the Printer Setup dialog directly (the same dialog that you see if Window's 'Printing Preferences' for a printer or when you press the 'Setup' button in a conventional TeeChart Print Preview). That could be used at application level.
If that is acceptable we'll go ahead and include that in the next maintenance release.
Regards,
Marc Meumann
TeeChart loads the Windows-set printing options when loading an instance. Changing those settings at Windows level will not then change update the local printer settings after the Chart is loaded. Isolated in that way means that TeeChart print settings do not affect the Windows defaults.
We're looking at options. One option would be for us to add a method to TeeChart's Printer interface that calls the Printer Setup dialog directly (the same dialog that you see if Window's 'Printing Preferences' for a printer or when you press the 'Setup' button in a conventional TeeChart Print Preview). That could be used at application level.
If that is acceptable we'll go ahead and include that in the next maintenance release.
Regards,
Marc Meumann
Steema Support
Re: Printer Settings
In what version was this problem fixed?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Printer Settings
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |