How to make Internet Explorer window top most?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Eugene Zelikovsky (Zelikovsky_at_discussions.microsoft.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 00:17:21 -0800

I have vb-script , which started applicatoin as "Internet Explorer" with
parameters.
How to place Internet Explorer on top(modal window).

'************************************************************
' Setup Internet Explorer
'************************************************************
Sub SetupMSIE
     MSIE.Navigate "About:Blank"
     MSIE.ToolBar = False
     MSIE.StatusBar = False
     MSIE.Resizable = False
     MSIE.FullScreen = False
     Do
     Loop While MSIE.Busy

     SWidth = MSIE.Document.ParentWindow.Screen.AvailWidth
     SHeight = MSIE.Document.ParentWindow.Screen.AvailHeight
     MSIE.Width = SWidth * .80
     MSIE.Height = SHeight * .80
     MSIE.Left = (SWidth - MSIE.Width)/2
     MSIE.Top = (SHeight - MSIE.Height)/2
     MSIE.vbApplicationModal = 0
     MSIE.Visible = True

End Sub

Sub ErrHandler(bIsMSIEAvailable)
        NErr = 1
        if bIsMSIEAvailable then
        MSIE.Document.Write "<BR>"
        MSIE.Document.Write "<font color=red>An error has occured during the script
build process.</font><BR>"
        MSIE.Document.Write "<font color=black>" & cstr(err.description)
        MSIE.Document.Write "<BR>"
        else
        msgbox("An error has occured" & vbcrlf & cstr(err.description))
        end if

End Sub



Relevant Pages

  • Re: Is there a way to pass a current XP users password into an IE form?
    ... VBScript, and can't seem to find any examples. ... Configuring Integrated Windows Authentication in IIS 6.0 ... Below I have included a short example that demonstrates automating Internet Explorer below. ... Sub IE_DownloadComplete ...
    (microsoft.public.scripting.vbscript)
  • Re: controling Internet Explorer from Excel...
    ... I display an Internet explorer from VBA, ... Then I display a userform with the only ... Dim myIE As InternetExplorer ... 'Sub SearchInWeb will wait here till the UserForm is ...
    (microsoft.public.excel.programming)
  • Re: Removing individual URLs from autocomplete
    ... This clears the addresses typed into Explorer or Internet Explorer and asks to open the History folder to delete items from the History list. ... Sub ReportErrors ... >> shown when the first few letters are typed into the address bar in IE6? ...
    (microsoft.public.windowsxp.basics)
  • RE: VBA and Internet Explorer
    ... "Jamie" wrote: ... I have a simple bit of code which opens up Internet Explorer, ... Sub photo_select ... objIE.Navigate strURL ...
    (microsoft.public.excel.programming)
  • How to use ADO to downlad information from an Excel web link
    ... up a spreadsheet in Internet Explorer. ... I have to download it as .xls and the import it into Access. ... Sub Download_Data ... Dim ie As InternetExplorer ...
    (microsoft.public.data.ado)