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
Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Calling web service and its methods dynamically 2 73
Exit the loop 4 49
write xml in vb.net 2 33
how to hit button in form and close application from main() 4 22
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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 …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

829 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