Enter data into other applications

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Usarian Skiff

    #1

    Enter data into other applications

    Is it possible to enter data into other applications' textboxes and
    datagrids?

    I want to automate our production control software (like a macro). It's
    written in VB6, and I have access to the form names. I'm programming in
    VB.net (1.1).



  • 

    #2
    Re: Enter data into other applications


    "Usarian Skiff" <usarian.skiff@ servicecenterme tals.com> wrote in message
    news:OWJ2xLmqFH A.1252@TK2MSFTN GP09.phx.gbl...
    | Is it possible to enter data into other applications' textboxes and
    | datagrids?
    |
    | I want to automate our production control software (like a macro). It's
    | written in VB6, and I have access to the form names. I'm programming in
    | VB.net (1.1).

    well, that's where good architecture comes into play. if the old app has
    it's business logic and data storage functionality in reusable dlls, you can
    bypass the form and just use the dll interfaces. otherwise, your new
    automating process will become just as ugly as the code behind the vb6 form
    you're trying to manipulate. if you don't require the business logic or data
    storage functionality, why not just write your data directly to the same
    data source the vb6 app uses...since it sounds like this is your own
    company's system.

    anyway, good ol' sendkeys.send or .sendwait should do the job for answering
    your specific question.


    Comment

    • pmclinn

      #3
      Re: Enter data into other applications

      Other than

      Appactivate and send keys, would there be another way to tap into these
      apps via the windows api?

      Good Question.

      Comment

      • 

        #4
        Re: Enter data into other applications

        "pmclinn" <pmclinn@gmail. com> wrote in message
        news:1125082443 .457941.73910@g 14g2000cwa.goog legroups.com...
        | Other than
        |
        | Appactivate and send keys, would there be another way to tap into these
        | apps via the windows api?


        yes...each form and most of its constituant controls have window handles.
        once you have them, you can send them messages via sendmessage and
        sendmessagebyte xt (as far as i can remember)...but this is, again, a very
        convoluted way to get your job done and will be more extensive than what it
        seems the op may be capable of at present.


        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: Enter data into other applications

          "pmclinn" <pmclinn@gmail. com> schrieb:[color=blue]
          > Other than
          >
          > Appactivate and send keys, would there be another way to tap into these
          > apps via the windows api?[/color]


          'EnumWindows', 'EnumChildWindo ws', 'FindWindow', 'FindWindowEx',
          'SetWindowText' , 'SendMessage' + 'WM_SETTEXT', etc.

          Similar to 'SendKeys': 'keybd_event', 'mouse_event', 'SendInput'.

          --
          M S Herfried K. Wagner
          M V P <URL:http://dotnet.mvps.org/>
          V B <URL:http://classicvb.org/petition/>

          Comment

          Working...