
How to get the Windows Size (Screen Size)
Quote:
> In VB 4 or 5 use the Screen Object.
> I.e. .... lngWidth = Screen.Width or lngHeight = Screen.Height
> Center the form with the following:
> In VB 5 set the form's start-up location property to centered.
> In VB 4 ...
> Me.Top = ((Screen.Height / Screen.TwipsPerPixelY) \ 2) - Me.Height
> Me.Left = ((Screen.Width / Screen.TwipsPerPixelX) \ 2) - Me.Width
> --
> Tony Selke
> (please remove the _No-Junk-Mail_ prior to responding)
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> > How to get the screen size Height and Width ?
> > I need to centrate a windows in the screen.
This might be easier:
frmYourform.Top = (Screen.Height - frmYourform.Height) / 2
frmYourform.Left = (Screen.Width - frmYourform.Width) / 2
This will center the form on any size monitor screen. (I believe
anyway).
Regards,
--
Richard Knechtel
EDS
(Systems Engineer/System Administrator)
(Aspiring AS/400 GURU)
(Aspiring Linux GURU)
The contents of this message express only MY opinion.
This message does not necessarily reflect the policy or views of
my employer, EDS. All responsibility for the statements
made in this posting resides solely and completely with the
ME.
I Ex-Spaminate spammers!
See US Code Title 47, Sec.227(a)(2)(B), Sec.227(b)(1)(C)
and Sec.227(b)(3)(C).