Jump to content

Recommended Posts

Posted

Hi guys (and gals).

 

I am currently creating an internal website for work.

 

I have been asked to make the site load in a 'clean' window. What we would like is to be able to remove toolbars and address bar when the pages are displayed.

 

Any help would be greatly appreicated.

 

David

Posted

I've got this bit of code which will open IE with specified website, then you can change the lines lower down for various effects. Without changes, it should load the website in an IE window which will fill the screen, minus an address, menu and toolbar. Not sure, but perhaps it could be adapted into VBScript that can be embedded in your web pages...

 

' URL for website

strURL = "http://www.foobar.com"

 

' Get the screen size

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_DesktopMonitor")

For Each objItem in colItems ' Because we get 2 results for some strange reason

If objItem.ScreenHeight <> "" Then intScreenHeight = objItem.ScreenHeight

If objItem.ScreenWidth <> "" Then intScreenWidth = objItem.ScreenWidth

Next

 

Set objIE = CreateObject("InternetExplorer.Application")

 

objIE.FullScreen=False

objIE.TheaterMode=False

 

objIE.AddressBar=False

objIE.MenuBar=False

objIE.ToolBar=False

 

objIE.Left=0

objIE.Top=0

objIE.Width=intScreenWidth

objIE.Height=intScreenHeight-30 ' Takes into account the Windows toolbar

 

objIE.Navigate(strURL)

objIE.Visible=True

Posted

Didn't know about that kiosk mode argument for IE. It's possible "TheaterMode" is similar, can't test at the moment. But Kiosk Mode sounds just like what you want. Makes my code look OTT!

As for your 2nd question, not sure sorry.

 

I use this site for help with HTML and more: W3 Schools

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...