C# - getting window list and changing activ window

T

tylerdurden

Hi.
I want to write application which
1) Get list of windows
2) Change activ window

ad1 I have writen:
Process [] localAll = Process.GetProcesses();
String lista = "Lista procesow\n";
for (int i=0; i<localAll.Length; i++){
if (localAll.MainWindowHandle.ToInt32() == 0) continue;
lista = lista + "\n" + i + "\t:" + localAll.MainWindowTitle;

So I have list of handlers form localAll.MainWindowHandle method.
But what to do next ?

I have tried
Control a = Form.FromChildHandle(localAll.MainWindowHandle);
or
Control a = Form.FromHandle(localAll.MainWindowHandle);
and then
Form f = a.FindForm();
But it's not working. It's only gives not null reference to my program
window.

TIA, Tyler
 
A

Alan Balmer

On 15 Mar 2005 15:29:13 -0800, (e-mail address removed) wrote:

(Question regarding C# program)

C is not the same language as C#. Try one of the MS newsgroups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top