Goodmorning,
we have an issue with a DesktopApp developed in Vb6 on OS Windows 10.
The problem is that teechart component don't retreive all properties from default printer.
This cause error "operation not supported on selected printer" if i programmatically change some properties about printer reference.
In example:
I want to change printer orientation from Protrait to Landscape and print the chart.
If i change the Orientation property without Confirm the printer devide by ShowSetupDlg method, i receive the error listed above and print output is blank.
Against if i confirm it using that method, the print process work fine.
This issue is only on Windows 10 OS (in all older systems this dows not occour).
P.S. Teechart8.ocx version is the latest (8.0.1.3)
In attachment a simple project to explain the issue (exe must be run on win10)
Best regards,
Lorenzo Lavezzo
[AX V8 - VB6 SP6] teechart does not retreive default print
-
- Newbie
- Posts: 2
- Joined: Mon Jun 22, 2009 12:00 am
- Contact:
[AX V8 - VB6 SP6] teechart does not retreive default print
- Attachments
-
- test win10.rar
- (9.24 KiB) Downloaded 1278 times
Re: [AX V8 - VB6 SP6] teechart does not retreive default print
Hello,
It works fine for me with TeeChart v8.0.1.1 if I change this line from your Form2:
for this:
It works fine for me with TeeChart v8.0.1.1 if I change this line from your Form2:
Code: Select all
.PrintPartialHandle Printer.hDC, x, Y, TChart1.Printer.PageWidth, TChart1.Printer.PageHeight
Code: Select all
.PrintPartialHandle Printer.hDC, x, Y, Form1.TChart1.Printer.PageWidth, Form1.TChart1.Printer.PageHeight
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 2
- Joined: Mon Jun 22, 2009 12:00 am
- Contact:
Re: [AX V8 - VB6 SP6] teechart does not retreive default print
Hello,
my ocx version is v8.0.1.3.
I've applied the fix to the code, but still having same error on TeePreviewPanel when i try to change printer orientation.
I've tried to downgrade Teechart8.ocx at V8.0.1.1 and it works.
But this is a "work around", what is the change log between v8.0.1.1 and v8.0.1.3?
Can i hope into a Fix on v8.0.1.3 component? I've hundreds installations into the world...
Best Regards,
Lorenzo Lavezzo
my ocx version is v8.0.1.3.
I've applied the fix to the code, but still having same error on TeePreviewPanel when i try to change printer orientation.
I've tried to downgrade Teechart8.ocx at V8.0.1.1 and it works.
But this is a "work around", what is the change log between v8.0.1.1 and v8.0.1.3?
Can i hope into a Fix on v8.0.1.3 component? I've hundreds installations into the world...
Best Regards,
Lorenzo Lavezzo
Re: [AX V8 - VB6 SP6] teechart does not retreive default print
Hello,
I've tried with v8.0.1.3 and I'm not able to reproduce the problem either with it.
I'm not sure if I should do anything special to reproduce it. I'm adding selecting an orientation and pressing "Print".
BTW, I've changed the code in Option1_Click to make the options match the print and preview orientations.
I've also added the TeeChart version in use to the title.
I've tried with v8.0.1.3 and I'm not able to reproduce the problem either with it.
I'm not sure if I should do anything special to reproduce it. I'm adding selecting an orientation and pressing "Print".
BTW, I've changed the code in Option1_Click to make the options match the print and preview orientations.
I've also added the TeeChart version in use to the title.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: [AX V8 - VB6 SP6] teechart does not retreive default print
...a note on this. During checks, reviewing this sample code, we have noticed that the return string for TeeChart Printer DeviceName, that influences the loop that sets the environment printer, includes spurious characters at the end of the devicename string. That causes the code not to enter the loop.
As partial check on the first part of the string rather than a check over the whole string might be better placed here. This is resolved as part of bugfix: http://bugs.teechart.net/show_bug.cgi?id=1983
Regards,
Marc Meumann
Code: Select all
If Mid(a.DeviceName, 1, Len(Form1.TChart1.Printer.PrinterSettings.DeviceName)) Like Form1.TChart1.Printer.PrinterSettings.DeviceName Then
Set Printer = a
Printer.PaperSize = Form1.TChart1.Printer.PrinterSettings.PaperSize
If Form1.TChart1.Printer.PrinterSettings.Orientation = vbPRORPortrait Then
Printer.Orientation = vbPRORPortrait
Else
Printer.Orientation = vbPRORLandscape
End If
End If
Regards,
Marc Meumann
Steema Support