Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

EnumWindows, how to identify windows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zamdrist - 06 Apr 2007 14:19 GMT
I can return a list of windows and their titles using the API,
AddressOf & Callbacks, however I get all programs/processes like GDI+,
DDE Server, etc. I really just want the programs opened in the
taskbar, such as Outlook, Query Analyzer (whatever)...How can I fliter
the list?

I was hoping to use this, but if there is another method I'd like to
know.

Private Declare Function IsWindowVisible Lib "user32" _
(ByVal hwnd As IntPtr) As Long

This returns such things as:

8975933078237085696
8975933078237085697
8975933078237085697
8975933078237085696
8975933078237085696
8975933078237085697

Incidently, the ones ending in 97 are 'user program windows' if you
will. Thanks...
Mattias Sjögren - 06 Apr 2007 17:47 GMT
>How can I fliter the list?

You can find some details about how the taskbar does its selection
under the Managing Taskbar Buttons section here

http://msdn2.microsoft.com/en-us/library/aa969325.aspx

You basically have to do the same. Look at the window style bits etc.

>I was hoping to use this, but if there is another method I'd like to
>know.
[quoted text clipped - 5 lines]
>
>8975933078237085696

The return type should be a Boolean, not a Long.

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.

Zamdrist - 06 Apr 2007 21:50 GMT
On Apr 6, 10:47 am, Mattias Sjögren <mattias.dont.want.s...@mvps.org>
wrote:

> The return type should be a Boolean, not a Long.
>
[quoted text clipped - 3 lines]
> Mattias Sjögren [C# MVP]  mattias @ mvps.orghttp://www.msjogren.net/dotnet/|http://www.dotnetinterop.com
> Please reply only to the newsgroup.

Thank you Mattias, that was helpful. Changing the function to return
Boolean allowed me to test against it and filter out the unwanted
processes from the user programs.

Steve

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.