locked
How to change AutoScaleDimensions RRS feed

  • Question

  • Hi,
    I have written an User control designed for windows mobile 6 sdk.
    I want to set AutoScaleDimensions value to (192, 912).
    this.AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);

    But each time i do some changes in the designer, the AutoScaleDimensions value changes to (240, 240).
    this.AutoScaleDimensions = new System.Drawing.SizeF(240F, 240F);

    Is there a way to stop this roll backing of AutoScaleDimensions?

    Thanks,
    Rayudu

    Thursday, April 16, 2009 4:15 PM

All replies

  • Hi BobbyRayudu,


    Better set AutoScale mode to DPi on user control form.

    Please let me know if my answer is not giving solutions for your question.


    Regards,
    Malleswar

    Thursday, April 16, 2009 4:22 PM
  • Hi,
    the AutoScale mode is set to DPi.
    My problem is that each time i do some changes in the designer, the AutoScaleDimensions value changes to (240, 240) from (192, 192) in designer.cs file.

    this

     

    .AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;

    Any idea why this is happening and to stop this ??

    Thanks,
    Rayudu

    Monday, April 20, 2009 5:54 PM
  • Hi Rayudu,

    I think you should change resolution code in Designer.cs file,  this is by design. It is changed by "FormFactor" property of  form or control. If you want to set it to 192F, we can change "FormFactor" property to VGA emulator.



    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, April 21, 2009 3:21 AM
  • Hi BobbyRayudu83,

    If you still can't solve the problem, feel free to unmark my answer and let me know, I will continue to work with you.



    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, April 23, 2009 3:07 AM
  • Hi,
    The "FormFactor" property for the control is already set to "Windows Mobile 6 Professional VGA"
    this is not working.
    I have other forms in another project with in the same solution for which the "FormFactor" property is set to "Windows Mobile 6 Professional VGA", but the AutoScaleDimensions value remains (192, 912) with out any problem.

    Is there anything else that i can try ?

    Monday, April 27, 2009 7:56 PM
  • Hi BobbyRayudu83,

    Can you create a new form in the project and check whether can reproduce the problem?



    Best regards,
    Guang-Ming Bian - MSFT
    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, April 29, 2009 9:52 AM