EnumWindows, VB.Net

  • Thread starter Thread starter Zamdrist
  • Start date Start date
Z

Zamdrist

I know that a callback function can be used to run the EnumWindows
function of WIn32 API in VB.Net.

My question is however...is there a strictly VB.Net way of doing this,
not using a callback function and the Win32 API?

i.e. What is the .Net *way*...or is there one?

Thanks
 
My question is however...is there a strictly VB.Net way of doing this,
not using a callback function and the Win32 API?

No there isn't.


Mattias
 
Hi,

there is no real .NET way, but you can enumerate
all processes and try to get their Main Window Handles
and Window Captions by using this:

For Each p As Process In Process.GetProcesses()

Debug.WriteLine("Window Handle: " + p.MainWindowHandle.ToString() + " -
Window Title: " + p.MainWindowTitle)

Next p

Regards

Kerem

--
 

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

Back
Top