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 7692313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:49:30+00:00 2026-05-31T20:49:30+00:00

Possible Duplicate: Restore a minimized window of another application I want to restore (show

  • 0

Possible Duplicate:
Restore a minimized window of another application

I want to restore (show and give focus) to an external program.

The problem is that if it is on the tray the MainWindowHandle is 0, so I can not restore the window.

Process[] process = Process.GetProcessesByName("MyApp");
//process.MainWindowHandle  == 0 if it is on tray!! :(

I’ve already searched google and stackoverflow. I found some threads with the same question, but there is no answer to this.

[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr windowHandle, ShowWindowFlag flag);

How can I pop the external application out of tray and bring it to taskbar?


I can use FindWindow,

    [DllImport("User32.dll", CharSet = CharSet.Unicode)]
    public static extern IntPtr FindWindow(string className, string windowName);

but if there is more the one process with the same class and title, FindWindow will return only one of them, how can i solve this?

  • 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-05-31T20:49:32+00:00Added an answer on May 31, 2026 at 8:49 pm

    The thing is, that Windows does not have a support to minimize the window into system tray. There is no such state. And in order to simulate this behavior applications simply hide the windows totally.
    You can use Spy++ tool to find the window of your target app while it is visible.
    Then “minimize” it to tray, and see what was changed in the attributes. Then in your app you should revert the attributes. This is needed, because there several ways to hide a window and different apps use one of them.

    For example Windows Task Manager change the style from VS_VISIBLE to VS_MINIMIZED (and remove VS_VISIBLE).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Restore WindowState from Minimized I have window which is normally hidden in
Possible Duplicate: Sql server version problem when database restore I would like to restore
Possible Duplicate: Firefox extension: check if window is minimized I've written a Firefox extension
Possible Duplicate: Maintain/Save/Restore scroll position when returning to a ListView how to save scroll
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: How to do the vector of sets in C++? I want to
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: check whether internet connection is available with C# I just want to
Possible Duplicate: How to backup SQL Server Agent jobs? Hi,I want to backup my
Possible Duplicate: Can’t create handler inside thread that has not called Looper.prepare() inside AsyncTask

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.