Maximizing Browser using DOM - Codoid
Select Page
Codoid Blog

Maximizing Browser using DOM

Irrespective of the business that your client is in, marketing is an integral part of their operations. In fact, in this day and age of social.

This article explains how to maximize a browser window using HTML DOM. Actually, it is not maxmizing the browser, it resizes browser to the size what we get from maximize.

Code

Dim oPage,inScreenWidth,inScreenHeight

Set oPage=Browser("name:=Google").Page("title:=Google")

'Getting Screen Width
inScreenWidth=oPage.Object.parentWindow.screen.width

'Getting Screen Height
inScreenHeight=oPage.Object.parentWindow.screen.height

'Moving Browser to (0,0) position
oPage.Object.parentWindow.moveTo 0, 0

'Resizing Window using resizeTo method with Screen Width and Screen Height values
oPage.Object.parentWindow.resizeTo inScreenWidth,inScreenHeight
  

Written By

Submit a Comment

Your email address will not be published. Required fields are marked *


This article explains how to maximize a browser window using HTML DOM. Actually, it is not maxmizing the browser, it resizes browser to the size what we get from maximize.

Code

Dim oPage,inScreenWidth,inScreenHeight

Set oPage=Browser("name:=Google").Page("title:=Google")

'Getting Screen Width
inScreenWidth=oPage.Object.parentWindow.screen.width

'Getting Screen Height
inScreenHeight=oPage.Object.parentWindow.screen.height

'Moving Browser to (0,0) position
oPage.Object.parentWindow.moveTo 0, 0

'Resizing Window using resizeTo method with Screen Width and Screen Height values
oPage.Object.parentWindow.resizeTo inScreenWidth,inScreenHeight