Re: centering a form
From: Jezebel (dwarves_at_heaven.com.kr)
Date: 07/11/04
- Next message: J French: "Re: centering a form"
- Previous message: Randy Birch: "Re: centering a form"
- In reply to: Randy Birch: "Re: centering a form"
- Next in thread: Randy Birch: "Re: centering a form"
- Reply: Randy Birch: "Re: centering a form"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 11 Jul 2004 16:34:01 +1000
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: J French: "Re: centering a form"
- Previous message: Randy Birch: "Re: centering a form"
- In reply to: Randy Birch: "Re: centering a form"
- Next in thread: Randy Birch: "Re: centering a form"
- Reply: Randy Birch: "Re: centering a form"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|