Wednesday, August 11, 2010

How to find active windows and current browser

Microsoft HTML Object Library - Microsoft.mshtml.dll (MSHTML)
Microsoft Internet Controls - Interop.SHDocVw.dll (SHDocVw)
using SHDocVw;
using mshtml;
using System.IO;
WebBrowser m_browser = null;
ShellWindows shellWindows = new ShellWindows();
string filename;
foreach (SHDocVw.WebBrowser ie in shellWindows)
{
    filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
    if (filename.Equals("iexplore"))
    {
        m_browser = ie;
        break;
    }
}

No comments:

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...