Solved

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

Posted on 2008-10-07
1
510 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

932 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now