Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8560863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:22:27+00:00 2026-06-11T16:22:27+00:00

How can I minimize the IE Browser using C#? I tried the code mentioned

  • 0

How can I minimize the IE Browser using C#? I tried the code mentioned below which didn’t work:

var processes = Process.GetProcessesByName("*iexplorer.*");

if (processes.Any()) 
{

    var handle = processes.First().MainWindowHandle;
    ShowWindow(handle, SW_SHOWMINIMIZED); 

}

Are there any other methods to achieve minimizing of the IE Browser?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:22:28+00:00Added an answer on June 11, 2026 at 4:22 pm

    As Damien says, there is no fullproof way to do this as the user owns the browser, not your app. Your code isn’t working because you are trying to use a wildcard symbol (*) like you would do on Google, but this doesn’t work here. GetProcessesByName is literally looking for a process named *iexplorer.*. You can confirm this by placing a breakpoint underneath this line, and hovering over processList, it is an empty array. Changing this to iexplore fixes this problem.

    Some tested and working code is below:

    using System;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    
    namespace ConsoleApplication1
    {
        class Program
        {
            [DllImport("user32.dll")]
            static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
    
            static void Main()
            {
                var processes = Process.GetProcessesByName("iexplore");
    
                foreach (var process in processes)
                {
                    ShowWindow(process.MainWindowHandle, 2);
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i Minimize the window to the Taskbar? im using: FormBorderStyle = Windows.Forms.FormBorderStyle.None
How can I minimize the footprint of a website built using MVC. My application
Can I disable the minimize button in JFrame? I have already tried setUndecorated() and
I'm using mx:WindowedApplication, I'm wondering how I can skin the title bar and close/minimize
I'm making a small tool application that user can minimize in the taskbar .
I'm trying to use forward declarations as much as I can to minimize compilation
Under the .NET Compact Framework, there is no FormWindowState.Minimize value. How can I minimize
How can I have my application minimize itself to the system tray in WindowsXP/Vista?
Can anyone point me in the right direction on how I would minimize ambient
My Problem When I minimize the browser window the category menu does not minimize

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.