?
Solved

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

Posted on 2008-10-07
1
Medium Priority
?
532 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 2000 total points
ID: 22666607
i think enumerator should be good. check .getenumerator() method of list.
0

Featured Post

Industry Leaders: 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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

777 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