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
 
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

--
 
Back
Top