CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Posts
    131

    controling another program

    I dont know if this is possible.
    But is there a way to control another program.
    Ex:
    lets so i run a program programmitacaly.
    Then i want to use one of its features lets say update.

    is there a way to do this?

  2. #2
    Join Date
    Feb 2002
    Posts
    5,757
    One solution is messages. Spawn the process and keep a copy of its handle.

    Kuphryn

  3. #3
    Join Date
    Jan 2004
    Posts
    131
    WHAT?

  4. #4
    Join Date
    Jul 1999
    Location
    San Jose,CA
    Posts
    246

    ...

    What he means, is use messages to control the other program

    You can send messages to another program using sendmessage or postmessage, and handle those messages in the prgram that you want to control

    To start the program use the CreateProcss function.

    Lokk at the following link for a tutorial on messages

    http://www.codeproject.com/dialog/messagehandling.asp
    1. Search in MSDN
    2. Search in Google
    3. Search in CodeGuru.com
    4. Ask in the forum

    ABNM.....asih b*&6 nahi mardeh

  5. #5
    Join Date
    Jan 2004
    Posts
    131
    ok i now know how to run and close another program.
    Let's say there is a button on the other program.
    How can i send a message to that program to click that button?

  6. #6
    Join Date
    Jan 2004
    Posts
    131
    does anyone know how to do that?

  7. #7
    Join Date
    Jul 1999
    Location
    San Jose,CA
    Posts
    246

    ...

    1. Search in MSDN
    2. Search in Google
    3. Search in CodeGuru.com
    4. Ask in the forum

    ABNM.....asih b*&6 nahi mardeh

  8. #8
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Originally posted by immortal20
    ok i now know how to run and close another program.
    Let's say there is a button on the other program.
    How can i send a message to that program to click that button?
    The easist solution is to send a WM_COMMAND message with a BN_CLICKED notification code to the dialog or other window that has the button. You should be able to find previous answers in this forum with samples of doing that. I know I have posted a sample at least once.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

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

Featured