DelphiFAQ Home Search:

Obtain screen and current window size in VBScript


comments8 comments. Current rating: 3 stars (6 votes). Leave comments and/ or rate it.


I want to adjust my web page's controls to the browser window size. How can I find the size of the browser's window?


VBScript has the screen variable with properties height and width. Use document.body.clientWidth and document.body.clientHeight for the viewable size.

<script language="VBScript">
document.write ("<p>VBScript is enabled and working.<p>")
document.write "Your screen width is : " & screen.width & " pixels<br>"
document.write "Your screen height is : " & screen.height & " pixels<br>"
document.write "Your viewable Width is : " & document.body.clientWidth 
document.write " pixels<br>"
document.write "Your viewable Height is : " & document.body.clientHeight 
document.write " pixels<br>"


2006-07-25, 08:18:51
anonymous from United States  
Thanks for the help!
Looking for this exact code.
2007-04-09, 00:30:39
anonymous from India  
need more details

Keywords: vbscript object model
2007-04-23, 11:11:09
anonymous from United States  
I believe that it stinks...the fact that you have taken you telephone number away from your custmers viewing...can find help/customer service numbers anywhere anymore! What do you have to say about that...additionally, why do I NEVER receive any answers when I try to communicate with you via Email??? Sure would be nice to receive a meaningful answer to this one...or would you rather continue doing nothing to assist your me, a five year customer!

Jim Huddleston, April 23, 2007
2011-10-28, 12:17:21
anonymous from United States  
Thanks, this was very helpfull.
2013-02-10, 08:12:37
uhlklntz <a href=' '>buy viagra soft online</a> >:-[ <a href=' '>buy cialis online</a> 1806
2013-02-20, 21:39:08
pfpeboe <a href=' '>how to order viagra</a> vRBaMZ <a href=' '>order cialis</a> 0850
2014-12-26, 02:39:39
Hey Andrea.The thing is that Google Adsence was not intended to be ozeimiptd. It is just compressed with that Javascript Compressor, so there is a feeling like stuff is ozeimiptd but not to the end.I have made a dig into source code and uncompressed it. But then I found original code in open sources. I can find a link if you wish.
2018-01-12, 02:21:30
Angelina from Canada  
I see you don't monetize your website, don't waste your traffic, you can earn extra cash every month because you've
got hi quality content. If you want to know how to make
extra $$$, search for: Mertiso's tips best adsense alternative



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: