开发者

How to get window title of a program reduced in taskar?

With C#, i use this code to list main win开发者_JAVA百科dow processes titles

Process[] ProcessArray = Process.GetProcesses();
try {
    foreach (Process proc in ProcessArray) {
        Console.WriteLine(proc.MainWindowTitle);
    }
} catch (Exception ex) {
    Console.WriteLine(ex.Message);
}

but this doesn't work to see mainwindowtitle of processes reduced in the taskbar. How to do this ?


Instead of looping through the processes you can probably use the EnumWindows api function through the P/Invoke layer.

Once you have the window handles, you can call the GetWindowText to get the title of the window.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜