Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
How to Format a Custom Internet Explorer window?
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- How to Format a Custom Internet Explorer window?
How to Format a Custom Internet Explorer window?
18-09-2008 1:13 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi all
We launch a formatted Internet Explorer window to display progress to our users during lengthy installations. We use 2 files in total:-
1) Animated gif 'progress bar' to simulate a real progress bar.
2) A VBScript that create a custom Internet Explorer window, complete with text and animated gif 'progress bar' to provide on-screen feedback to users:-
----------------------------
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("Winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
intHorizontal = objItem.ScreenWidth
intVertical = objItem.ScreenHeight
Next
Set objExplorer = CreateObject _
("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Left = (intHorizontal - 350) / 2
objExplorer.Top = (intVertical - 200) / 2
objExplorer.Width = 403
objExplorer.Height = 310
objExplorer.Visible = 1
objExplorer.document.ParentWindow.document.body.style.backgroundcolor = "White"
objExplorer.document.ParentWindow.document.body.scroll="no"
objExplorer.document.ParentWindow.document.body.style.Font = "10pt 'Arial'"
objExplorer.document.ParentWindow.document.body.style.borderStyle = "outset"
objExplorer.document.ParentWindow.document.body.style.borderWidth = "4px"
objExplorer.Document.Body.Style.Cursor = "wait"
objExplorer.Document.Title = "Installing XXXX"
objExplorer.Document.Body.InnerHTML = "Installing XXXX. <P><B>PLEASE DO NOT OPEN ANY APPLICATIONS UNTIL THE INSTALLATION HAS COMPLETED AND THIS WINDOW HAS DISAPPEARED.</B><P>" _
& "<img src='\\server\share\XXXX\progress.gif' WIDTH=345><P><B>Please wait...</B><P> "
----------------------------
We just need to amend the VBScript according to the affected application then call it in a batch file. There is a sample script on Scripting Guy website that talks through how to create a 'real' progress bar if preferred but a 'simulated' progress bar is good enough for our purposes.
I've been meaning to disable the Mininise/Maximise/Exit buttons from the Internet Explorer window to prevent users prematurely closing the window, but as yet have not found a way to do so. You will see what I mean from the attached screenshot. I think we need to play with the "objExplorer." variable but not sure quite how. Answers on a postcard....
Thanks
Scott
We launch a formatted Internet Explorer window to display progress to our users during lengthy installations. We use 2 files in total:-
1) Animated gif 'progress bar' to simulate a real progress bar.
2) A VBScript that create a custom Internet Explorer window, complete with text and animated gif 'progress bar' to provide on-screen feedback to users:-
----------------------------
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("Winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
intHorizontal = objItem.ScreenWidth
intVertical = objItem.ScreenHeight
Next
Set objExplorer = CreateObject _
("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Left = (intHorizontal - 350) / 2
objExplorer.Top = (intVertical - 200) / 2
objExplorer.Width = 403
objExplorer.Height = 310
objExplorer.Visible = 1
objExplorer.document.ParentWindow.document.body.style.backgroundcolor = "White"
objExplorer.document.ParentWindow.document.body.scroll="no"
objExplorer.document.ParentWindow.document.body.style.Font = "10pt 'Arial'"
objExplorer.document.ParentWindow.document.body.style.borderStyle = "outset"
objExplorer.document.ParentWindow.document.body.style.borderWidth = "4px"
objExplorer.Document.Body.Style.Cursor = "wait"
objExplorer.Document.Title = "Installing XXXX"
objExplorer.Document.Body.InnerHTML = "Installing XXXX. <P><B>PLEASE DO NOT OPEN ANY APPLICATIONS UNTIL THE INSTALLATION HAS COMPLETED AND THIS WINDOW HAS DISAPPEARED.</B><P>" _
& "<img src='\\server\share\XXXX\progress.gif' WIDTH=345><P><B>Please wait...</B><P> "
----------------------------
We just need to amend the VBScript according to the affected application then call it in a batch file. There is a sample script on Scripting Guy website that talks through how to create a 'real' progress bar if preferred but a 'simulated' progress bar is good enough for our purposes.
I've been meaning to disable the Mininise/Maximise/Exit buttons from the Internet Explorer window to prevent users prematurely closing the window, but as yet have not found a way to do so. You will see what I mean from the attached screenshot. I think we need to play with the "objExplorer." variable but not sure quite how. Answers on a postcard....
Thanks
Scott
2 REPLIES 2
Re: How to Format a Custom Internet Explorer window?
18-09-2008 11:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
have you considered Auto3 free from
http://www.autoitscript.com/autoit3/
Its dead easy to write scripts and it produces a exe file. One line of code can do what it takes 10 lines to do in VB not only that you can do a progress bar which is built in. If you get the full package there is a designer like vb so you can design the screen and it will produce the code for you.
You will never go back to vb if you try it
http://www.autoitscript.com/autoit3/
Its dead easy to write scripts and it produces a exe file. One line of code can do what it takes 10 lines to do in VB not only that you can do a progress bar which is built in. If you get the full package there is a designer like vb so you can design the screen and it will produce the code for you.
You will never go back to vb if you try it
Re: How to Format a Custom Internet Explorer window?
19-09-2008 10:09 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks samuria, will give it a go.
Scott
Scott
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- How to Format a Custom Internet Explorer window?