Slide Show

Asked By Ramachandran T
06-Nov-09 06:27 AM
Earn up to 0 extra points for answering this tough question.

Hi,

This is extension of my previous question.

Assume there are 5 or more open winword (microsoft word documents.) are open and minized.

I need to write a program such that , it displaya the window title of all the open documents. User can select  1 or more documents. The selected documents must be brought to maxised state one by one in a fixed time period.

Any idea how to do this in c#

 

 

  Re:

web mavin replied to Ramachandran T
07-Nov-09 11:15 PM

You could try making use of "System.Diagnostics" namespace to find the window title using a snip as this:-

Process[] processes = Process.GetProcessesByName("Winword");

 foreach(Process process in processes)
{
    Console.WriteLine(process.MainWindowTitle);
}

Further, to maximize this on timely basis as you want it, you could make use of WINDOWPLACEMENT structure, FindWindow, GetWindowPlacement and SetWindowPlacement windows methods. Refer a sample for this here.

Hope this helps.

  Slide Show

mv ark replied to Ramachandran T
08-Nov-09 12:01 AM
This link contains code (scroll to the middle of the page) to list all running applications - http://www.neowin.net/forum/lofiversion/index.php/t369213.html

Adapt that code to filter out those related to Word & manipulate them
Create New Account