locked
Any conventions for window position? RRS feed

  • Question

  • Hello,

    I always wonder, under what circumstances would you chose which window start-position? Surely you'd always want it to appear centre-screen; am I the only one who thinks that that looks better than the default start position? Is it wrong to make the main form start centre-screen? Does anybody know?

    Thanks for your help, as always, and Merry Christmas (a bit early)! :)

    Friday, December 22, 2017 9:31 PM

Answers

  • Hello,

    While presenting a window in the center of the display screen surely is appealing to many there are times when business requirements setup by business analyst as per user requirements may have a form perhaps set to the top or bottom of the screen etc. or that a child form does not get centered over the parent window but instead next to the parent window and perhaps when the parent window moves the child follows.

    For the follow child, have seen this asked here more than a handful of times and with that here is a code sample

    If you make all the decisions customers may or may not care for this and may not even tell you but simply grin and bear having the window pop-up centered and simply move it as they see fit.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, December 22, 2017 9:41 PM
  • Hi

    Preference. You say main form, OK, but many projects can have many Forms, and may have several open together.

    My own preference is to store the Form(s) location on Close and restore that Form to stored location next time it is opened.


    Regards Les, Livingston, Scotland

    Friday, December 22, 2017 9:44 PM

All replies

  • Hello,

    While presenting a window in the center of the display screen surely is appealing to many there are times when business requirements setup by business analyst as per user requirements may have a form perhaps set to the top or bottom of the screen etc. or that a child form does not get centered over the parent window but instead next to the parent window and perhaps when the parent window moves the child follows.

    For the follow child, have seen this asked here more than a handful of times and with that here is a code sample

    If you make all the decisions customers may or may not care for this and may not even tell you but simply grin and bear having the window pop-up centered and simply move it as they see fit.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, December 22, 2017 9:41 PM
  • Hi

    Preference. You say main form, OK, but many projects can have many Forms, and may have several open together.

    My own preference is to store the Form(s) location on Close and restore that Form to stored location next time it is opened.


    Regards Les, Livingston, Scotland

    Friday, December 22, 2017 9:44 PM
  • Thanks for your responses, Karen and Ieshay,

    I think I'll start doing as Karen suggested and store my form at the top (NW).

    Thanks again!

    Friday, December 22, 2017 9:55 PM