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
Mattias Sjögren - 20 Dec 2007 06:06 GMT
>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

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Kerem Gümrükcü - 20 Dec 2007 09:36 GMT
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

Signature
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."