Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Retrieving the previous window size after a Form has been maximized

Retrieving the previous window size after a Form has been maximized

Scheduled Pinned Locked Moved C#
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jjansen
    wrote on last edited by
    #1

    Does anyone know where a Form saves its previous window location and size when it is maximized? When the From is subsequently restored from its maximized state to its "normal" state, it must somehow retrieve these numbers, but how? I like to be able to retrieve this information so I can save it. Any clues would be appriciated.

    E 1 Reply Last reply
    0
    • J jjansen

      Does anyone know where a Form saves its previous window location and size when it is maximized? When the From is subsequently restored from its maximized state to its "normal" state, it must somehow retrieve these numbers, but how? I like to be able to retrieve this information so I can save it. Any clues would be appriciated.

      E Offline
      E Offline
      eliasvipin
      wrote on last edited by
      #2

      why dont u take the current size of the form before maximizing. u can do the same through wndproc and save it Els

      J 1 Reply Last reply
      0
      • E eliasvipin

        why dont u take the current size of the form before maximizing. u can do the same through wndproc and save it Els

        J Offline
        J Offline
        jjansen
        wrote on last edited by
        #3

        I want to store the application window position (including these "pre-maximized settings") ONLY when the application is shutting down so that I can show it the same way the next time the application is started. But you're right, I could store and update the information every time the window is resized or moved except when it is maximized. I was just wondering if the framework of System.Windows.Form does this somehow for me.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups