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

??? How To - Control IE Using VB.NET ???

Status
Not open for further replies.

nomaam

Programmer
Dec 29, 2003
39
CA
Is it possible to limit the number of open Internet Explorer windows?

My VB.NET program will be using IE, and I would like to ensure that only one IE window can be open. This will be done to prevent pop-up windows from interfering with its work.

I know there are free pop-up blocking programs that I can use, but I would like to have this function built into my program.

Any help would be appreciated.

I have found this code to ensure that only one instance of the VB.NET program is open; could this be modified to control the amount of IE windows?

This is the code:

Code:
Private Sub Form_Load()
    ' See if there is already and instance.
    If App.PrevInstance Then
        ' Activate the previous instance
        AppActivate App.Title

        ' Send a key (here SHIFT-key) to set the
        ' form from the previous instance to the
        ' top of the screen.
        SendKeys "+", True

        ' Terminate the new instance
        Unload Me
    End If
End Sub


I am fairly new to VB.NET.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top