1

I have a Standard Win application using VS2015, Mostly we copy same project to many different solution based on custom development. Currently I am facing some issue related to Form size. In Both Projects all forms and Properties are same. When I run both project in same machine, the form size is different.

I have Compared the form properties in both projects like Auto Scale Mode, Auto Size mode, Min Size, Max Size etc,. There is no difference. I am not sure which property causing this issue.

Note: Both Project developed by myself. It happens once already in another development. So its time to take action for this issue. Thanks

Application 1 is copied from Application 2 enter image description here

Update: 1 Just find app.manifest file from your project and add the piece of line from the link @jimi comment. The Form Size Back to Normal. Here is the code which i added to my app.manifest

 <asmv1:application>
<asmv1:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
  <dpiAware>false</dpiAware>
</asmv1:windowsSettings>

Mdyahiya
  • 167
  • 3
  • 15
  • do you mean that when running the form on machine1 is bigger/smaller than that on machine 2? – styx Jan 22 '19 at 07:11
  • Both application are running in Same Machine(I mean same Computer). – Mdyahiya Jan 22 '19 at 07:14
  • so, you copy - paste the solution in the same computer and now you see the form is a different size? can you add a screenshot? – styx Jan 22 '19 at 07:17
  • @styx Updated the post with Image. – Mdyahiya Jan 22 '19 at 08:04
  • 1
    Check if one of them has been given a manifest which makes it dpi aware. – Lasse V. Karlsen Jan 22 '19 at 08:16
  • try to change both AutoScaleMode to the other option, i.e if they are now on font change to dpi , and vice verse if both on dpi change to font – styx Jan 22 '19 at 08:42
  • @styx I have tried other options. Either its same or smaller than the current size – Mdyahiya Jan 22 '19 at 09:04
  • 1
    Check out what Lasse Vågsæther Karlsen told you. The first image shows a DPIAware application, the second a NON DPIAware one. Check the `app.manifest`. Or see the notes here: [DPI Awareness - Unaware in one Release, System Aware in the Other](https://stackoverflow.com/a/50276714/7444103). – Jimi Jan 22 '19 at 15:05
  • @Jimi . and Lasse You guys are awesome. Its another new lesson i learned today. I just follow your answer from the link and change my application1 manifest. The dpiaware I set to false instead of true to get my normal screen. Thanks again guys. I am going to vote both of you. Cheers. – Mdyahiya Jan 23 '19 at 02:09

0 Answers0