Problems with EMF files on Surface Pro
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Problems with EMF files on Surface Pro
We have a program that has worked flawlessly for 10 years through Windows XP, 7, 8, and 10. But now when we run it on a Surface Pro under Win 10, the graphs are only visible in 1/4 of the space that they were previously. It is as if the EMF is prepared with the correct "canvas" size, but the chart itself is only created in 1/4 of the space (1/2 of each of the dimensions).
We found some examples on the web that use Chart.Export, but Export is not known in our release of the TeeChart software (7.12).
Any thoughts/help would be appreciated
We found some examples on the web that use Chart.Export, but Export is not known in our release of the TeeChart software (7.12).
Any thoughts/help would be appreciated
Re: Problems with EMF files on Surface Pro
Hello,
We don't have instant access to a Surface to try this out but can setup a test sometime over the next few days. In the meantime, if your program can recognise machine/sysop type, would it be possible increase the size of the image proportionally as a temporary workaround?
Regards,
Marc Meumann
We don't have instant access to a Surface to try this out but can setup a test sometime over the next few days. In the meantime, if your program can recognise machine/sysop type, would it be possible increase the size of the image proportionally as a temporary workaround?
Regards,
Marc Meumann
Steema Support
Re: Problems with EMF files on Surface Pro
Hello,
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
Your request is reasonable. I will try to get to this in the next few days.
Jon
Jon
Re: Problems with EMF files on Surface Pro
Hello,
In addition to the simple example project, we'd appreciate if we could get some extra information such as:
- What Surface Pro are you running?
- What Windows 10 build are you running?
- Have you tried to generate the emf files in a different machine and open the emf file in your Surface Pro?
In addition to the simple example project, we'd appreciate if we could get some extra information such as:
- What Surface Pro are you running?
- What Windows 10 build are you running?
- Have you tried to generate the emf files in a different machine and open the emf file in your Surface Pro?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
I have attached a ZIP file containing the following:
1) SurfaceProTestDelphi.ZIP: this contains the source code for the test program
2) Two PNG files, showing screen shots on both my Development VM (Dev VM, Win 7) and the Surface Pro 3 (Win 10). The left part of each screen shot shows the running test program, while the right part shows how Paint sees the EMF. Note the extra white space on the Surface Pro
3) Two EMF files, the two EMF files which were generated (one under Win 7 and one under Win 10 on the Surface Pro).
The Surface Pro is a Surface Pro 3 running Windows 10 Pro 64 with dual 1.9 GHz processor and 4 GB of RAM. It is fully updated.
Let me know how else I can help you understand the bug.
Jon
1) SurfaceProTestDelphi.ZIP: this contains the source code for the test program
2) Two PNG files, showing screen shots on both my Development VM (Dev VM, Win 7) and the Surface Pro 3 (Win 10). The left part of each screen shot shows the running test program, while the right part shows how Paint sees the EMF. Note the extra white space on the Surface Pro
3) Two EMF files, the two EMF files which were generated (one under Win 7 and one under Win 10 on the Surface Pro).
The Surface Pro is a Surface Pro 3 running Windows 10 Pro 64 with dual 1.9 GHz processor and 4 GB of RAM. It is fully updated.
Let me know how else I can help you understand the bug.
Jon
- Attachments
-
- SurfaceProBug.zip
- (214.11 KiB) Downloaded 614 times
Re: Problems with EMF files on Surface Pro
Hello Jon,
Your test application generates a correct .emf for me here in a Windows 10 machine.
However, if I open the "SurfaceProTest on Surface Pro.EMF" file in Paint I see it has a wrong height and width, as in your "Surface Pro Test on Surface Pro.png" screenshot.
So it looks as if the Surface Pro 3 was taking a wrong TRect from the "function TCustomTeePanel.GetRectangle:TRect;". But it's hard to say without reproducing (and debug) the problem here.
You could try forcing a repaint before creating the .emf to see if it makes any difference.
Your test application generates a correct .emf for me here in a Windows 10 machine.
However, if I open the "SurfaceProTest on Surface Pro.EMF" file in Paint I see it has a wrong height and width, as in your "Surface Pro Test on Surface Pro.png" screenshot.
So it looks as if the Surface Pro 3 was taking a wrong TRect from the "function TCustomTeePanel.GetRectangle:TRect;". But it's hard to say without reproducing (and debug) the problem here.
You could try forcing a repaint before creating the .emf to see if it makes any difference.
Code: Select all
procedure TForm1.FormShow(Sender: TObject);
//...
Draw;
SaveToMetaFileEnh(fName);
RunAppByDocument(fName);
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
Adding the Draw does not change the behavior of the program on the SurfacePro
Jon
Jon
Re: Problems with EMF files on Surface Pro
Hello Jon,
I'm afraid we couldn't get a Surface Pro 3. And it's difficult to see what's exactly happening without a device where the problem can be reproduced.
Can I ask you to add this code to check what rectangle is the Surface using?
I guess it will give 590x651 while it gives 393x433 on the desktop. This is a ratio of x1.5
You could also try GetClientRect instead of GetRectangle, to see it if gives the same result:
I'm afraid we couldn't get a Surface Pro 3. And it's difficult to see what's exactly happening without a device where the problem can be reproduced.
Can I ask you to add this code to check what rectangle is the Surface using?
Code: Select all
with Chart1 do begin
//...
Title.Caption:='GetRectangle: '+
IntToStr(GetRectangle.Right-GetRectangle.Left)+'x'+
IntToStr(GetRectangle.Bottom-GetRectangle.Top);
You could also try GetClientRect instead of GetRectangle, to see it if gives the same result:
Code: Select all
with Chart1 do begin
//...
Title.Caption:='GetClientRect: '+
IntToStr(GetClientRect.Right-GetClientRect.Left)+'x'+
IntToStr(GetClientRect.Bottom-GetClientRect.Top);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
Here are the results for Win 7 and for the Surface Pro Win 10
- Attachments
-
- Surface Pro Program on Win 7.PNG (50.33 KiB) Viewed 18987 times
-
- Surface Pro Program on Surface Pro.png (103.88 KiB) Viewed 18987 times
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
We have borrowed a Surface Pro to use for testing. We will have to return it at the end of the day on Friday. So, after that, I will be unable to respond to requests for changes in the test software.
Re: Problems with EMF files on Surface Pro
Hello,
I'm sorry, I'm afraid the code I suggested for GetClientRect is retrieving the TRect of the form, not of the TChart. Please use this instead:
I'm sorry, I'm afraid the code I suggested for GetClientRect is retrieving the TRect of the form, not of the TChart. Please use this instead:
Code: Select all
type TWinControlAccess=class(TWinControl);
//...
Title.Caption:='GetRectangle: '+
IntToStr(GetRectangle.Right-GetRectangle.Left)+'x'+
IntToStr(GetRectangle.Bottom-GetRectangle.Top);
Title.Caption:=Title.Caption+'; GetClientRect: '+
IntToStr(TWinControlAccess(Chart1).GetClientRect.Right-TWinControlAccess(Chart1).GetClientRect.Left)+'x'+
IntToStr(TWinControlAccess(Chart1).GetClientRect.Bottom-TWinControlAccess(Chart1).GetClientRect.Top);
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
This is the Surface Pro result using the new source code you provided.
- Attachments
-
- Surface Pro Test on Surface Pro.png (101.01 KiB) Viewed 18988 times
Re: Problems with EMF files on Surface Pro
Hello,
These results make me think again there must be some scaling issue. And I see some changes are giving problems to some devices:
https://blogs.technet.microsoft.com/ask ... ary-update
Could you please tell us what exact Windows 10 build is the Surface Pro 3 using?
These results make me think again there must be some scaling issue. And I see some changes are giving problems to some devices:
https://blogs.technet.microsoft.com/ask ... ary-update
Could you please tell us what exact Windows 10 build is the Surface Pro 3 using?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 10
- Joined: Wed Jun 08, 2016 12:00 am
Re: Problems with EMF files on Surface Pro
Version 1607 Build 14393.0, but we first saw this on another Surface Pro from China, so I doubt that the exact OS build is important in reproducing this bug.