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:
I am fairly new to VB.NET.
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.