To bring the IE window in front of the Screen

Posted by Parameswari on Stack Overflow See other posts from Stack Overflow or by Parameswari
Published on 2012-03-22T07:22:16Z Indexed on 2012/07/06 21:16 UTC
Read the original article Hit count: 152

I am creating new IE browser instance dynamically, and opening a aspx page from there. Everything works fine , but the browser is not popping in the Front of the screen .Able to see the Aspx page in the task bar when I click it from there it comes to the Front . How to bring that page in front of all the Screen as soon as IE is created.

I have pasted the code I used to create new IE instance.

public class IEInstance
{
    public SHDocVw.InternetExplorer IE1;
    public void IEInstanceCls(string check)
    {
        IE1 = new SHDocVw.InternetExplorer();
        object Empty = 0;
        string urlpath = " ";            
        urlpath = "http://localhost/TestPage.aspx?";         
        object URL = urlpath;
        IE1.Top = 260;
        IE1.Left = 900;
        IE1.Width = 390;
        IE1.Height = 460;
        IE1.StatusBar = false;
        IE1.ToolBar = 0;
        IE1.MenuBar = false;
        IE1.Visible = true;
        IE1.Navigate2(ref URL, ref Empty, ref Empty, ref Empty, ref Empty);
    }
}

Help me to solve this problem.

Thank You

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about internet-explorer-8