Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Centering the window

Status
Not open for further replies.

DigitalOx

Programmer
Sep 29, 1998
41
US
I'm having a couple of problems fundamentals here.<br>
1) Is there any way to center my window on the user's desktop? I'm aware of the moveTo() function, but not sure how this helps me center the window if I don't know the size of the area around it.<br>
<br>
2) A related problem - resizing the window. I don't want my window to big for their screen and make them resize it. How can I know the total area in pixels of their screen?<br>
Any help appreciated.<br>
<br>
Thanks,<br>
DigitalOx
 
Well, window.screen will solve both problems. It reports the number of available pixels and the number of colors supported by the users screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top