How to perform Undo for Form Controls in C#?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nilam2477
    New Member
    • Feb 2008
    • 38

    How to perform Undo for Form Controls in C#?

    I have wizard kind of Windows Application with Forms having Prev & Next buttons. Currently i have set the Location for all the Forms on Form_Load() method using this.Location = new Point(100, 100);

    Now my requirement is that when using "Extend my Windows desktop onto this monitor” setting in Display/Settings Properties, the form should stay in the user’s selected monitor. When i go to the Next form it defaults to the main monitor.
    I tried removed the size setting on Form_Load but when i navigate to the next/prev forms the location of the form is not properly set. It randomly positions itself.
    How can i do this?
  • vanc
    Recognized Expert New Member
    • Mar 2007
    • 211

    #2
    Originally posted by Nilam2477
    I have wizard kind of Windows Application with Forms having Prev & Next buttons. Currently i have set the Location for all the Forms on Form_Load() method using this.Location = new Point(100, 100);

    Now my requirement is that when using "Extend my Windows desktop onto this monitor” setting in Display/Settings Properties, the form should stay in the user’s selected monitor. When i go to the Next form it defaults to the main monitor.
    I tried removed the size setting on Form_Load but when i navigate to the next/prev forms the location of the form is not properly set. It randomly positions itself.
    How can i do this?
    I think you have to read the resolution of desktop before you put your form. When you extend you desktop windows will change its resolution, which is I don't know the differences, you should investigate it yourself, if there is only one monitor then nothing to say if there are some extended monitors then you have to recalculate all startup position to put your form at right place.

    Cheers.

    Comment

    Working...