ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 The scale of the screen is incorrect
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

foxdingding

11 Posts

Posted - Nov 09 2021 :  04:32:18  Show Profile  Reply
The scale of the screen is incorrect

xequte

6513 Posts

Posted - Nov 09 2021 :  19:31:40  Show Profile  Reply
Hi

What version of Delphi is this? Does your project use "Per Monitor v2" DPI awareness?



You might be better to enable Windows style Open/Save dialogs:

https://www.imageen.com/help/TIEImageEnGlobalSettings.UseWindowsOpenSaveDialogs.html

Also see:

https://www.imageen.com/help/TIEImageEnGlobalSettings.AutoScale.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

foxdingding

11 Posts

Posted - Nov 09 2021 :  21:44:46  Show Profile  Reply
No change.The scale of the screen is incorrect.



EmbarcaderoŽ Delphi 10.3

Go to Top of Page

xequte

6513 Posts

Posted - Nov 09 2021 :  23:55:28  Show Profile  Reply
What are the Windows Display (Scale and Layout) settings on that machine?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

6513 Posts

Posted - Nov 10 2021 :  18:11:28  Show Profile  Reply
Actually, we have found an issue with the dialog. It is still not ideal if the open dialog is opened on a form with different scaling than the active one.

You can email me to test the fix.

But you are better to use the modern Windows dialog:

IEGlobalSettings().UseWindowsOpenSaveDialogs := True;

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

foxdingding

11 Posts

Posted - Nov 11 2021 :  00:21:14  Show Profile  Reply
// open file
procedure TMainForm.Button1Click(Sender: TObject);
begin
IEGlobalSettings().UseWindowsOpenSaveDialogs := True;

ImageEnView1.ClearAll();
with ImageEnView1.IO do
LoadFromFile( ExecuteOpenDialog( ExtractFilePath( Application.ExeName )) );

ImageEnView1.Fit();
TrackBar1.Position := trunc(ImageEnView1.Zoom);
end;







// open file
procedure TMainForm.Button1Click(Sender: TObject);
begin
//IEGlobalSettings().UseWindowsOpenSaveDialogs := True;

ImageEnView1.ClearAll();
with ImageEnView1.IO do
LoadFromFile( ExecuteOpenDialog( ExtractFilePath( Application.ExeName )) );

ImageEnView1.Fit();
TrackBar1.Position := trunc(ImageEnView1.Zoom);
end;




Go to Top of Page

xequte

6513 Posts

Posted - Nov 11 2021 :  17:35:23  Show Profile  Reply
That's weird. You're not seeing the modern dialog, which should look like this:




What happens if you put a TOpenImageEnDialog on the form and call it instead:

// open file
procedure TMainForm.Button1Click(Sender: TObject);
begin
  ImageEnView1.ClearAll();
  OpenImageEnDialog1.ModernDialog := TRUE;
  if OpenImageEnDialog.Execute() then
  begin
    ImageEnView1.IO.LoadFromFile( OpenImageEnDialog1.Filename );
    ImageEnView1.Fit();
  end;
end;




Nigel
Xequte Software
www.imageen.com
Go to Top of Page

foxdingding

11 Posts

Posted - Nov 11 2021 :  19:36:52  Show Profile  Reply
It is very strange!!

Picture 1



Picture 2


Go to Top of Page

xequte

6513 Posts

Posted - Nov 11 2021 :  23:30:28  Show Profile  Reply
Sorry, reviewing your images above, it is working as expected. The Modern Windows dialog does not have issues with scaling.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

foxdingding

11 Posts

Posted - Nov 12 2021 :  19:53:17  Show Profile  Reply
Thanks.

However,The Modern Windows dialog, IEN files cannot be previewed.

This dialog box allows preview IEN files

Go to Top of Page

xequte

6513 Posts

Posted - Nov 14 2021 :  17:25:31  Show Profile  Reply
Hi

Yes, that is correct. Unfortunately the old Windows dialogs do not support scaling well.

It is improved in the current beta, but only if the open dialog has the same scaling as the active form.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: