Page 1 of 1
New updated resource file makes form enormous
Posted: Wed Jan 11, 2023 4:23 pm
by FdeRaadt
Hello everyone,
I have a question regarding the resource files of a xsforms.
The current situation is that if I make a change to a xsform my window size gets notably bigger.
These changes are stored in the .rc file.
Is there a setting or some kind of option to limit the constructor from touching the resource in X#?
I've already tried to limit the Visual Studio Scaling to 100% stated in this thread:
https://learn.microsoft.com/en-us/visua ... ew=vs-2022
< i have attached a sample showing the differences between the sizes >
Frank
Versions:
Visual Studio 2019
Windows 10
XSharp 2.14
New updated resource file makes form enormous
Posted: Wed Jan 11, 2023 9:45 pm
by Chris
Hi Frank,
Not changing the resource will mean that new controls will not appear in the window, if you change positions or styles those will not appear either etc.
Can you please post a version of the resource before saving it and one after? Is it the locations/sizes the only difference between them? I'm think that the most quick (and dirty admittedly, but working) solution to cover all such bizarre cases with different windows scaling etc options is to offer a x/y multiplier that the window editor will use when saving the resource files, to make them match the one generated by VO.
.
New updated resource file makes form enormous
Posted: Fri Jan 13, 2023 11:56 am
by FdeRaadt
Hi Chris,
Not changing the resource will mean that new controls will not appear in the window, if you change positions or styles those will not appear either etc....Not changing the resource will mean that new controls will not appear in the window, if you change positions or styles those will not appear either etc.
That makes sense.
.. is to offer a x/y multiplier that the window editor will use when saving the resource files
How would you suggest implementing this solution.
I'm using Visual Studio 2019
I've looked at Tools > Options > X# Custom Editors but it does not allow me any options to set a multiplier for window scalings.
I've attached the files before and after saving. Because this website does not allow the .rc file extension I had to change the format of the files to .txt. The content of the file however is exactly the same as in the resource.
Frank
New updated resource file makes form enormous
Posted: Fri Jan 13, 2023 4:24 pm
by Chris
Hi Frank,
Thanks, I see that all x-axis values are larger by 33% and all y-axis values are larger by 23%, so it's easy to adjust them all with two multipliers.
This is not an available option right now, we will need to implement it. Will get back to you about this in the next days.
.
New updated resource file makes form enormous
Posted: Mon Jan 23, 2023 9:59 am
by Chris
Hi Frank,
In the next build, there will be two new options in the VS options page, allowing you to manually adjust with a multiplier the positions/sizes saved in the resource file, this way it will always be possible to override the default calculations, when they do not give the correct results in various windows settings.
.
New updated resource file makes form enormous
Posted: Mon Jan 23, 2023 10:07 am
by FdeRaadt
Hi Chris,
Thanks a lot!
I'll be sure to check it out when the next build becomes available.
Frank
New updated resource file makes form enormous
Posted: Mon Jan 23, 2023 11:40 am
by Chris
Hi Frank,
You're welcome! I also attempted to prepare an updated dll that you could use right now, but unfortunately couldn't make it work, due to other changes in VS integration that have happened since the previous release. So I'm afraid you'll need to wait a bit more, for the next build.
New updated resource file makes form enormous
Posted: Sun Feb 26, 2023 9:34 am
by Chris
Hi Frank,
This has been implemented in the just released (2.15) build. You need to go to Tools/Options->X# Custom Editors->VO Window Editor and adjust the values for Size adjustment X/Y. From the calculations I had done based on the resource files you had sent, I think you need to use 0.812 for x and 1.23 for y
.