Solved

What's the best way to loop thru   Dim tempList = New List(Of ApiWindow)

Posted on 2008-10-07
1
523 Views
Last Modified: 2012-05-05
What's the best way to loop thru tempList

     

Dim tempList = New List(Of ApiWindow)
 
        getTables2.Enabled = False
        ListView1.BeginUpdate()
        ListView1.Items.Clear()
 
        For Each mainP In Process.GetProcessesByName("PokerStars")
            Dim localHandle As Int32 = mainP.MainWindowHandle
            tempList = GetChildWindows(localHandle)
        Next
 
  ' Loop thru tempList
 
   ''' <summary>
    ''' Get all child windows for the specific windows handle (hwnd).
    ''' </summary>
    ''' <returns>List of child windows for parent window</returns>
    Public Overloads Function GetChildWindows(ByVal hwnd As Int32) As List(Of ApiWindow)
 
        ' Clear the window list.
        _listChildren = New List(Of ApiWindow)
 
        ' Start the enumeration process.
        EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0)
 
        ' Return the children list when the process is completed.
        Return _listChildren
 
    End Function

Open in new window

0
Comment
Question by:vaultworld
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 13

Accepted Solution

by:
SameerJagdale earned 500 total points
ID: 22666607
i think enumerator should be good. check .getenumerator() method of list.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question