Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

17 Experts available now in Live!

Get 1:1 Help Now