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. Form location

Form location

Scheduled Pinned Locked Moved C#
windows-adminquestioncareer
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.
  • T Offline
    T Offline
    the last free name
    wrote on last edited by
    #1

    Is it possible to set the location of a main form within the screen to the same position every time the app is started? The propertie Form.StartPosition seems to make little difference. I read/write the forms size from the registry, but without controling it's start position it's only half a job.

    N 1 Reply Last reply
    0
    • T the last free name

      Is it possible to set the location of a main form within the screen to the same position every time the app is started? The propertie Form.StartPosition seems to make little difference. I read/write the forms size from the registry, but without controling it's start position it's only half a job.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      Make sure you set the Form.StartPosition equal to FormStartPosition.Manual, then you can specify the Top and Left positions. Persist this value where ever you like (database, XML, config) and set properly at runtime. - Nick Parker
      My Blog | My Articles

      T 1 Reply Last reply
      0
      • N Nick Parker

        Make sure you set the Form.StartPosition equal to FormStartPosition.Manual, then you can specify the Top and Left positions. Persist this value where ever you like (database, XML, config) and set properly at runtime. - Nick Parker
        My Blog | My Articles

        T Offline
        T Offline
        the last free name
        wrote on last edited by
        #3

        Thanks for the quick reply. I found the Control.Bounds property and set this in the load event. Seems to work just fine.

        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