Results 1 to 10 of 10

Thread: How can I find a reference from any control in any application ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Brazil
    Posts
    14

    Question How can I find a reference from any control in any application ?

    In fact I need to know a reference for any control in another application but, following the next rules:

    - difference from handle number. Because he always change
    - I tried to use sendmessage API or WM_GETTEXT.
    This works for VB and common controls. But for unknown controls or user control don't. This functions always back empty result.

    There is another way or another API function to get reference for unknown object or user control ?
    Tkx for any help

  2. #2
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    How do you know hwat control you are looking for????
    Leather Face is comin...


    MCSD

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Brazil
    Posts
    14
    I'm creating a ROBOTICs project.
    My application will control trade data between two or more applications.

    It's no problem, work fine. The only problem I have is when the application use a unknown control like user control.
    I can't get the name or any reference.

    There is a specific API or way in VB to list a reference from any control, like user control or unknown control ?

  4. #4
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    but HOW are you going to know what control your after?

    You can use APIs top retrieve info on ANY window/control, but you must know what you want first..
    Leather Face is comin...


    MCSD

  5. #5
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    IE: Are you trying to get a handle to the control that a user selects? the one with focus etc..
    Leather Face is comin...


    MCSD

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Brazil
    Posts
    14
    Leather,
    let me explain a resume for my project:

    There is two programns:
    - ROBO Client in user computer
    - ROBO Server in server computer

    The robo client taks it's get, from ROBO Server, when the user turn on the computer, what application, what window, what control, he have to capture and send back to ROBO Server.

    The ROBO Server will get this information, treat, and send to another application.

    Everything about application from origin (Fields, buttons, etc) or application from destination was previosly defined by user.

    My problem is to get a reference for a object in origin application or destination, if this applications use unknown controls, or user controls.

  7. #7
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    Ok, so how does the server which window it wants the client to capture?
    Leather Face is comin...


    MCSD

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Brazil
    Posts
    14
    I'm working with SQL Server.

    The users defined before a project where:

    - he define the name from origin application he want to capture
    - he define witch window he want to capture
    - he define witch control, button, etc... he want to capture

    - he define the name from destination application he want to send
    - he define witch window he want to send
    - he define witch control, button, etc... he want to send the information that was captured.

    After that, the ROBO has information enuff to start.

    My problem: When user want define witch control, button, etc... he want to capture, ROBO looking for a reference in this control.
    Handle number it's not really good, because it's change. I need another reference, different, exclusive for this object.

  9. #9
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    Ok, so you need to get a handle to the app... (This can normally be done by searching for the window byu its caption)...

    From there you can enumerate the child windows... find specific proprties that allow you to id the window..
    Leather Face is comin...


    MCSD

  10. #10

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Brazil
    Posts
    14
    You right but,
    I still need a reference different from handle number.
    Some controls, I can't get the name. I try sendmessage API, but in few controls, this is not working

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