Hi milk,
We can use Microsoft Internet Control to get the reference of each IE
window and get information from these IE window. For more information,
please refer to the link below:
"Automating IE Remotely Using C#"
http://weblogs.asp.net/stevencohn/ar.../23/62117.aspx
Below is the source code for enumerating all the IE windows and make them
Full screen. Also, I have attached to the BeforeNavigate2 for a demo:
private void button1_Click(object sender, System.EventArgs e)
{
string filnam;
SHDocVw.ShellWindows shellWindows =
new SHDocVw.ShellWindowsClass();
foreach (SHDocVw.InternetExplorer ie
in shellWindows)
{
Console.WriteLine(ie.LocationURL);
filnam = System.IO.Path.GetFileNameWithoutExtension(
ie.FullName).ToLower();
if (filnam.Equals("iexplore"))
{
ie.BeforeNavigate2+=new
DWebBrowserEvents2_BeforeNavigate2EventHandler(ie_ BeforeNavigate2);
ie.FullScreen=true;
}
}
}
private void ie_BeforeNavigate2(object pDisp, ref object URL, ref object
Flags, ref object TargetFrameName, ref object PostData, ref object Headers,
ref bool Cancel)
{
MessageBox.Show("IE navigating to another URL ");
}
Hope this helps.
================================================== ===
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.