Results 1 to 3 of 3

Thread: duplicate classnames? - SOLVED - GO AWAY SANCHEZ

  1. #1

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472

    duplicate classnames? - SOLVED - GO AWAY SANCHEZ

    Im trying to send text to a textbox with api, easy. The problem is, there are 2 text boxes in the program and they have the same classname and same text. The only thing that keeps them independant is their hwnds.
    Problem is, I am getting the first textbox's hwnd and not the second one, which is what I need.
    Is it possible to like skip the first result my app gets and then continue to the next one?

    Heres what im using:
    VB Code:
    1. Private Sub Command1_Click()
    2. hwndd = FindWindow("parentCLASS", vbNullString)
    3. MsgBox FindWindowEx(hwndd, 0, "textCLASS", vbNullString)
    4. End Sub

    which gives me the first textbox's hwnd.
    Last edited by Sacofjoea; Nov 3rd, 2002 at 06:30 PM.
    That arranged can be

  2. #2
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631

    Re: duplicate classnames?

    Try this:
    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. Dim hwndd&, hwndd2&
    4.  
    5. hwndd = FindWindow("parentCLASS", vbNullString)
    6. hwndd2 = FindWindowEx(hwndd, 0, "textCLASS", vbNullString)
    7. MsgBox FindWindowEx(hwndd, hwndd2, "textCLASS", vbNullString)
    8. End Sub

    Using OE in your coding wouldn't hurt either.
    Please rate my post.

  3. #3

    Thread Starter
    Hyperactive Member Sacofjoea's Avatar
    Join Date
    May 2000
    Location
    Never Never Land
    Posts
    472
    scorage, works
    appreciate it
    That arranged can be

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width