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. How to get the form at design time to the center of the screen

How to get the form at design time to the center of the screen

Scheduled Pinned Locked Moved C#
csharpvisual-studiowinformsdesigntutorial
7 Posts 4 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.
  • U Offline
    U Offline
    User 12941702
    wrote on last edited by
    #1

    When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.

    L K D 3 Replies Last reply
    0
    • U User 12941702

      When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This is not a programming issue. You need to talk to Microsoft, it's their product.

      1 Reply Last reply
      0
      • U User 12941702

        When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.

        K Offline
        K Offline
        kalberts
        wrote on last edited by
        #3

        I had to check this out, and I see the same thing. But to me it seems quite natural. When I create a new text file, I start writing in the upper left hand corner, too. All sorts of boes and forms, frames and whatever to be filled in, I feel it natural to fill left to rigth, top to bottom. If I want to drag a box larger, I alway drag the lower right corner (so the old contents stays in the same positions, unless it is flowing, of course. Personal taste varies. But I am starting to ask myself why the window is centered when you work with a WPF app. I think upper left would be better.

        1 Reply Last reply
        0
        • U User 12941702

          When I start a new Windows Forms project in Visual Studio it always places the form at the upper left of the screen which seems stupid to me to put it there. I'm looking for a way to move it to center screen. As far as I know adjusting the Properties only affects run-time position of the form.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Were you looking for the StartPosition property of your form? You can set that to "CenterScreen".

          Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
          Dave Kreskowiak

          U 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Were you looking for the StartPosition property of your form? You can set that to "CenterScreen".

            Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
            Dave Kreskowiak

            U Offline
            U Offline
            User 12941702
            wrote on last edited by
            #5

            That only affects what your form looks like when you're at run-time. I was wondering if I can get the form positioned closer to the center of the screen at design-time, but I don't think that can be changed.

            D 1 Reply Last reply
            0
            • U User 12941702

              That only affects what your form looks like when you're at run-time. I was wondering if I can get the form positioned closer to the center of the screen at design-time, but I don't think that can be changed.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              No, you can't. If you want that, switch to WPF, but you're going to have to rewrite your entire app to do that.

              Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
              Dave Kreskowiak

              K 1 Reply Last reply
              0
              • D Dave Kreskowiak

                No, you can't. If you want that, switch to WPF, but you're going to have to rewrite your entire app to do that.

                Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                Dave Kreskowiak

                K Offline
                K Offline
                kalberts
                wrote on last edited by
                #7

                I can see good reasons to switch to WPF, but this is not one of them.

                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