I have a strange issue regarding the display of dialogs: On the same machine a dialog with the same size (proven by a debugview output immediately before the Show) of 118x146 pixel looks different in VO and X#:
Visual Objects (correct):
XSharp:
Since the controls are clipped it is obviously not a scaling problem. It's also confusing that there is only a width difference.
If I set the size manually to something bigger directly before the show for measurements, the controls have the same size on both dialogs. Only the X# dialog is drawn smaller than coded.
There is no window editor involved, everything is generated by code.
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Stefan,
This looks like the manifest for "XP styles" was not included in your app.
Please choose the "suppress default win32 manifest" on the application properties page, and add the manifest from your VO program as resource to your project.
Robert
This looks like the manifest for "XP styles" was not included in your app.
Please choose the "suppress default win32 manifest" on the application properties page, and add the manifest from your VO program as resource to your project.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Thank you. How exactly would I do that (I can i.e. add a "native resource template (rct)", or an xml file where I could put the contents of my resource XML from VO into)?
Is it possible to do it once (in an assembly) fr all projects which use it instead of adding it seperately to each project?
Is it possible to do it once (in an assembly) fr all projects which use it instead of adding it seperately to each project?
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Addition: in VO I have
RESOURCE CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST %executabledir%adkomm.man
in one of the framework libraries. In X# I added a new resource "manifest.rc" and put this in it:
CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST "B:adkomm.man"
Unfortunately it doesn't change anything. Is there something I'm missing, and how could I verify the success?
RESOURCE CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST %executabledir%adkomm.man
in one of the framework libraries. In X# I added a new resource "manifest.rc" and put this in it:
CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST "B:adkomm.man"
Unfortunately it doesn't change anything. Is there something I'm missing, and how could I verify the success?
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Stefan,
- Create a new app from the VO MDI template
- This contains a file cctl6.man
- It also contains Standard Shell.Manifest.rc
- copy these to your project folder
- Include both in the project. Make sure that the item type for the RC file is a "NativeResource"
- The resource file assumes that the manifest is in a resources folder. If you put it in the same folder, then adjust the contents of the rc file.
Of course, you can put these in a shared folder, shared by all of your apps.
If you want to automatically include it in all of your apps then you would have to make a common file that is included in each project file.
An alternative is to create a Directory.Build.Props or Directory.Build.Targets file in the root of your solution. The contents of these files is automatically included by MsBuild.
I think a props file would work. See
https://thomaslevesque.com/2017/09/18/c ... ild-props/
for more info
Robert
- Create a new app from the VO MDI template
- This contains a file cctl6.man
- It also contains Standard Shell.Manifest.rc
- copy these to your project folder
- Include both in the project. Make sure that the item type for the RC file is a "NativeResource"
- The resource file assumes that the manifest is in a resources folder. If you put it in the same folder, then adjust the contents of the rc file.
Of course, you can put these in a shared folder, shared by all of your apps.
If you want to automatically include it in all of your apps then you would have to make a common file that is included in each project file.
An alternative is to create a Directory.Build.Props or Directory.Build.Targets file in the root of your solution. The contents of these files is automatically included by MsBuild.
I think a props file would work. See
https://thomaslevesque.com/2017/09/18/c ... ild-props/
for more info
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Robert,
I've tried this. Here is my project:
The cctl6.man is copied from the new VO MDI App. The Manifest.rc has the same contents as Standard.Shell.Manifest:
The results are still the same. I'm sure I missed something stupid, but I don't have a clue...
I've tried this. Here is my project:
The cctl6.man is copied from the new VO MDI App. The Manifest.rc has the same contents as Standard.Shell.Manifest:
The results are still the same. I'm sure I missed something stupid, but I don't have a clue...
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Stefan,
Please do not embed images in the messages, but use attachments.
There is something broken with the website. We will look at that asap.
But right now we cannot read your message
Robert
Please do not embed images in the messages, but use attachments.
There is something broken with the website. We will look at that asap.
But right now we cannot read your message
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Stefan,
This is not the full version of the manifest. I'm not sure if the manifest is actually causing the problem you describe, but if it is, try this manifest (just replace the description and app version with yours):
This is not the full version of the manifest. I'm not sure if the manifest is actually causing the problem you describe, but if it is, try this manifest (just replace the description and app version with yours):
Best regards,
Leonid
Leonid