Results 1 to 4 of 4

Thread: Screen Resolution????

  1. #1

    Thread Starter
    Lively Member bhaskerg's Avatar
    Join Date
    Mar 2001
    Location
    india
    Posts
    68

    Cool

    Hi all,
    How to get the user's resolution in vbscript?

    Like there is the "screen.width and screen.height" in javascript?...what is the equivalent in vbscript?

    Thanx in advance!!!

    -Bhasker G

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Why don't you want to use javascript?
    Mark
    -------------------

  3. #3

    Thread Starter
    Lively Member bhaskerg's Avatar
    Join Date
    Mar 2001
    Location
    india
    Posts
    68
    since i dunno how to call the function inside the vbscript code...i dont have any <form> also ...so i cant use hidden variables....any suggestions?

  4. #4
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Hi,
    Here's a bit of code I use to decide which size picture to put in my header...

    Code:
    <html>
     <body>
      <script language="VBScript"> 
       If Screen.Width = 1280 then 
        Document.Write "<body background=""Images/Header1280.gif"">"
        Document.Write "<font color=""#FFFF00"" size=""3"" face=""Courier New"">"
        Document.Write "<br><br><br><br><br><br><br><br>"
       End If	
       If Screen.Width = 1024 then 
        Document.Write "<body background=""Images/Header1024.gif"">"
        Document.Write "<font color=""#FFFF00"" size=""2"" face=""Courier New"">"
        Document.Write "<br><br><br><br><br>"
       End If
       If Screen.Width = 800 then 
        Document.Write "<body background=""Images/Header800.gif"">"
        Document.Write "<font color=""#FFFF00"" size=""1"" face=""Courier New"">"
        Document.Write "<br><br><br><br>"
       End If
      </script>
     </body>
    </html>
    Hope it helps...
    Nick Cook
    VB6 (SP6)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width