Results 1 to 7 of 7

Thread: [RESOLVED] how to make form center during start up

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] how to make form center during start up

    How to make form center during start up depending on the screen resolution of the computer

    My screen resolution is 1024 X 768 pixel .I have set the form start up as form center owner during design time. The form move to center of the screenduring start up.

    But If I change the screen resolution to 1280 X 800 pixel, the form not appear on the center screen during start up but more to the right. How to make a form center in whatever resolution set on the computer screen

  2. #2

  3. #3
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: how to make form center during start up

    You can just use one of the form properties, that is in the form properties window or you can do this by code. But I will show you how to do it by a single mouse click.

    Get into the form properties window, then scroll down into the item, which is called StartUpPosition and then click on it, until you get what you are looking for.

  4. #4

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how to make form center during start up

    Quote Originally Posted by RhinoBull
    Or change StartUpPosition = 2 (Center Screen) in the properties window.
    Use this.

    Why write code if you don't have to?

  6. #6

  7. #7
    Junior Member
    Join Date
    May 2007
    Posts
    30

    Re: [RESOLVED] how to make form center during start up

    One good reason to do this programatically is that if there are dual monitors, you can end up centering the form on the secondary monitor even though you wanted it on the primary. I find the center screen option is not reliable in this situation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width