set browser window size?

I’d like to resize the browsers window when my web application loads.

I tried various things like setting self.width and height in the open and shown events… no luck…
Tried me.Parent.Width and height but parent was nil…
Tried setting the WebPage width, heigh, minWidth and minHeight… no luck.
Help?

Maybe some java script?

Here’s the Javascript you want:

http://www.w3schools.com/jsref/met_win_resizeto.asp

However, before you do that… Consider that on the desktop, half of your users (the half who use tabs) will wish violence on you and 7 generations of your descendants. On mobile, this will have no effect. One more polite way to handle this issue is to center a WebRectangle and position your controls inside it. That will totally make you a hero.

[EDIT:] I don’t rely on LockLeft, etc. to position my controls. I typically write an ArrangeControls method for each WebPage and arrange them manually. That’s how you make the centered WebRectangle work well.

I have an image in an WebImageView which is the background image for the page… and I want the browser to be at least the size of this image… I then try to center my WebControl over the center of that image.