FormState Oddity

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #2600
      Barry Wood
      Participant

        Hi,

        I use TRzFormState on all my forms to remember the last position of the form on the screen (writes to an INI file). Works great – except for the first form that is shown.

        When the application starts the form initially shows in a different position on the screen (design position?), but as soon as FormActivate and FormShow complete it moves to where it’s position was last saved.

        Not a big issue but perhaps not the best way to start an application with the main window switching around. Is there a way around this?

      • #2602
        Barry Wood
        Participant

          I can add something, which might help … I run with 3 screens on my development PC. I have had the main form set to ‘Position = poScreenCenter’ – which I’m thinking now may be the screen centre of the 3 screens together, rather than the screen centre of my main (central) screen, as it first appears tp the left of my main screen.

          However, it doesn’t make much difference what the ‘Position’ setting is, the main form starts somewhere else and eventually goes to where the FormState component tells it to.

        • #2607
          Steve Gill
          Participant

            I have the same issue and I only have 1 screen.  I’m also interested in a solution to this.

            = Steve

             

          • #2616
            Ray Konopka
            Keymaster

              Hi Barry and Steve,

              I’ve been trying to duplicate the behavior you are describing but the TRzFormState component is working properly for me.

              If you create a brand new VCL Forms Application and drop a TRzFormState component along with a TRzRegIniFile component, connect the TRzFormState to the TRzRegIniFile and then run the app, does the form start up properly?

              I’m wondering if you both have code in your initialization or startup that is interfering with the TRzFormState component.

              Ray

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.