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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch IE Maximized?? 2

Status
Not open for further replies.

sparkbyte

Technical User
Sep 20, 2002
879
US
OK guys and dolls I am stumped.

Here is the code snippet.

Code:
			Set objIE=WScript.createobject("internetexplorer.application","objIE")
			objIE.visible = True
			objIE.TheaterMode = False 
			objIE.AddressBar = True  
			objIE.StatusBar = False
			objIE.MenuBar = True
			objIE.FullScreen = False 
			objIE.Navigate "about:blank"
			Do Until objIE.ReadyState = 4
			    WScript.Sleep 100
			Loop 
			URL = "//" & UserComputer & "/CoreDirector_" & strCoreServerVersion &_
			"/login.aspx?BK=" & strBank
			objIE.Navigate(URL)

This launches IE and goes to the correct page, no problem. What I want it to do is also maximize the browser.

The 2 modes that I thought would be helpful change the look and feel of the UI, TheaterMode and FullScreen.

FullSrenn turns to many things off to be useful.
Property FullScreen As Boolean

Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.

I like TheaterMode but it also changes the overall look of the "home" screen and I can't change how things look and feel without many approvals.

Any thoughts????

Thanks

John Fuhrman
Titan Global Services
 
I don't know of a way to set it to maximized. But, I would make it appear maximized by positioning it at 0,0 and set the height and width. If everyone uses a default resolution, you could just use something like this:
Code:
oIE.Top = 0
oIE.Left = 0
oIE.width = 1024
oIE.height = 740
 
This seems to do the trick:

Code:
Set objIE=WScript.createobject("internetexplorer.application","objIE")
objIE.visible = True
objIE.TheaterMode = False 
objIE.AddressBar = True
objIE.StatusBar = False
objIE.MenuBar = True
objIE.FullScreen = False 
objIE.Navigate "about:blank"
Do Until objIE.ReadyState = 4
WScript.Sleep 100
Loop
[b]Set shl = WScript.CreateObject("WScript.Shell")
shl.SendKeys "% X" [/b]
URL = "[URL unfurl="true"]www.tek-tips.com"[/URL]
objIE.Navigate(URL)

Hope this helps.

[vampire][bat]
 
the default behavior for ie explorer is to open in the same state as it was last closed. the only way that i'm aware of is, as was said before is to specify a size like skie suggested.
 
I believe EarthandFire's suggestion may be the answer. We are running the RDP sessions in a Kiosk mode so that IE is the only application being launched at logon.

Thanks EarthandFire, I had thaught of using the sendkeys method but was having trouble finding the right key equivalance.



Thanks

John Fuhrman
Titan Global Services
 
earthandfile,
that's a pretty slick and ingenious way of doing it. why didn't i think of that? i've done this sendkeys thingy so much.
you deserve a star.
 
Ironically, that method only works for me on an old "unprotected" machine. It won't work on any of my other machines because ZoneAlarm intercepts the attempt by Sendkeys to communicate with another program (and therefore has the effect of consuming the keystrokes [wink])

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top