RE: centering a form
From: Jay Vinton (JayVinton_at_discussions.microsoft.com)
Date: 07/11/04
- Next message: Randy Birch: "Re: centering a form"
- Previous message: Scott Baxter: "centering a form"
- In reply to: Scott Baxter: "centering a form"
- Next in thread: Randy Birch: "Re: centering a form"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 10 Jul 2004 19:24:02 -0700
> Anyform.left = (Screen.Width - Anyform.Width) / 2
> Anyform.tOp = (Screen.Height - Anyform.Height) / 2
If you always want it centered in the screen, set the StartUpPosition=CenterOwner at design time. At runtime, try this:
frm.Left = (Screen.Width \ 2) - (frm.Width \ 2)
frm.Top = (Screen.Height \ 2) - (frm.Height \ 2)
Jay
- Next message: Randy Birch: "Re: centering a form"
- Previous message: Scott Baxter: "centering a form"
- In reply to: Scott Baxter: "centering a form"
- Next in thread: Randy Birch: "Re: centering a form"
- Messages sorted by: [ date ] [ thread ]