获取的未完成任务列表

获取的未完成任务列表

本文介绍了C# - 获取的未完成任务列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一种方式来获得在C#中打开任务。我一直在谷歌上搜索,只能找到如何获得的进程的列表。我想唯一的任务将出现在任务栏上。

I'm trying to find a way to get the open tasks in C#. I've been searching on google and can only find how to get a list of the processes. I want the only the tasks that would show up on the taskbar.

此外,伴随着的是,这将是冷静,如果我能得到的任务关联的过程。如果有可能得到,而Vista在此图像中使用的ALT-TAB菜单,像缩略图:

Also, along with that, it would be cool if I could get the process the task is associated with. And if possible get the thumbnail images that Vista uses for the ALT-TAB menu, like in this image:

我以为我将不得不使用pinvokes,因为它实在不像有任何图书馆已经做到这一点。任何想法?

I assume that I will have to use pinvokes because it really doesn't look like there are any libraries to do this already. Any ideas?

推荐答案

这篇文章应该pretty的多告诉你到底该怎么做,它显示了如何构建自己的任务切换,包括需要对code枚举所有窗口,并确定它们是否任务,并展示了如何在使用PrintWindow API来获取previews在XP。

This article should pretty much tell you exactly what to do, it shows how to build your own task switch and includes the code needed to enumerate all windows and determine if they are "tasks" and it shows you how to use PrintWindow api to get the previews on XP.

http://msdn.microsoft.com/en-us/library/ ms997649.aspx

此外,这里是一篇博客文章的有关用于确定显示在而alt + tab视图,算法会谈。基本上你需要检查WS_EX_APPWINDOW和WS_EX_TOOLWINDOW随着如果窗口都有一个所有者。

Also, here is a blog post that talks about the algorithm used to determine what shows up in the Alt+Tab view. Basically you need to check the WS_EX_APPWINDOW and WS_EX_TOOLWINDOW along with if the window has an owner.

这篇关于C# - 获取的未完成任务列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 11:37