Re: centering a form
From: Randy Birch (rgb_removethis_at_mvps.org)
Date: 07/12/04
- Next message: Jezebel: "Re: centering a form"
- Previous message: Jezebel: "Re: centering a form"
- In reply to: Jezebel: "Re: centering a form"
- Next in thread: Jezebel: "Re: centering a form"
- Reply: Jezebel: "Re: centering a form"
- Reply: Tom Esh: "Re: centering a form"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 11 Jul 2004 22:19:41 -0400
I have too, on one machine, and usually with msgboxes. It's almost as if
something has told windows the screen is larger than it is, such as when
using a virtual desktop greater than the maximum screen resolution.
-- Randy Birch MVP Visual Basic http://vbnet.mvps.org/ Please respond only to the newsgroups so all can benefit. "Jezebel" <dwarves@heaven.com.kr> wrote in message news:OYZGae5ZEHA.3708@TK2MSFTNGP10.phx.gbl... : Yes Randy, I understood that from the comments to the code you posted. But : the original poster's problem is that these coordinates (whether as one move : or two) are not in fact putting his form in the middle of the screen. I've : seen this problem also. : : : "Randy Birch" <rgb_removethis@mvps.org> wrote in message : news:OzhN7E2ZEHA.3596@tk2msftngp13.phx.gbl... : > On some systems the form can be seen to change first its left, then top : > placement when the individual properties are set. Move eliminates the : > dual-move. : > : > -- : > : > Randy Birch : > MVP Visual Basic : > http://vbnet.mvps.org/ : > Please respond only to the newsgroups so all can benefit. : > : > : > "Jezebel" <dwarves@heaven.com.kr> wrote in message : > news:OAwRRExZEHA.1356@TK2MSFTNGP09.phx.gbl... : > : This method might be better from a performance point of view, but it's : > using : > : the same co-ordinates, so the end result will surely be the same? And if : > the : > : original doesn't actually put the form in the middle ....? : > : : > : : > : : > : "Randy Birch" <rgb_removethis@mvps.org> wrote in message : > : news:efkuuUvZEHA.3480@TK2MSFTNGP11.phx.gbl... : > : > Use the Move method, not the left and top properties ... : > : > : > : > http://vbnet.mvps.org/code/faq/centreform.htm : > : > http://vbnet.mvps.org/code/faq/centreparent.htm : > : > : > : > : > : > -- : > : > : > : > Randy Birch : > : > MVP Visual Basic : > : > http://vbnet.mvps.org/ : > : > Please respond only to the newsgroups so all can benefit. : > : > : > : > : > : > "Scott Baxter" <sbaxter@websearchstore.com> wrote in message : > : > news:#9WRDcuZEHA.3228@TK2MSFTNGP12.phx.gbl... : > : > : I have been trying to center a form on Windows 2000 using the : > following : > : > : subroutine: : > : > : : > : > : Public Sub center(Anyform As Form) : > : > : Anyform.left = (Screen.Width - Anyform.Width) / 2 : > : > : Anyform.tOp = (Screen.Height - Anyform.Height) / 2 : > : > : DoEvents : > : > : End Sub : > : > : : > : > : However, the form ends up on the lower right of the computer when : > : > : autostarted during windows startup. : > : > : : > : > : If I run it in development mode, it works perfectly. : > : > : : > : > : In startup mode the screen.height and width seem totally wrong. : > : > : : > : > : What is the answer? Any help would be great. : > : > : : > : > : Scott Baxter : > : > : : > : > : : > : > : > : : > : : > : :
- Next message: Jezebel: "Re: centering a form"
- Previous message: Jezebel: "Re: centering a form"
- In reply to: Jezebel: "Re: centering a form"
- Next in thread: Jezebel: "Re: centering a form"
- Reply: Jezebel: "Re: centering a form"
- Reply: Tom Esh: "Re: centering a form"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|