HighTechTalks DotNet Forums  

EnumWindows, VB.Net

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss EnumWindows, VB.Net in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Zamdrist
 
Posts: n/a

Default EnumWindows, VB.Net - 12-19-2007 , 04:35 PM






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

Reply With Quote
  #2  
Old   
Kerem Gümrükcü
 
Posts: n/a

Default Re: EnumWindows, VB.Net - 12-20-2007 , 04:36 AM






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

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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.