Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to control an exe from another exe.

How to control an exe from another exe.

Scheduled Pinned Locked Moved Visual Basic
questionlinuxtutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    okdeshpande
    wrote on last edited by
    #1

    Hi All, Assume that you have an exe. Now you are creating a new application which opens or launches the existing exe. Launching an exe from your application can be done using Shell command. Now my question is with out opening that exe you have to do operations what you are doing in that exe. eg: If are able to create new record in that exe then from your application you should be able to activate the new button in that exe.? Thanks Omprakash

    C 1 Reply Last reply
    0
    • O okdeshpande

      Hi All, Assume that you have an exe. Now you are creating a new application which opens or launches the existing exe. Launching an exe from your application can be done using Shell command. Now my question is with out opening that exe you have to do operations what you are doing in that exe. eg: If are able to create new record in that exe then from your application you should be able to activate the new button in that exe.? Thanks Omprakash

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Basically, if you're writing both apps, you need to write code to create communication between them, probably using WCF, named pipes, or the WM_COPYDATA message.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      O 1 Reply Last reply
      0
      • C Christian Graus

        Basically, if you're writing both apps, you need to write code to create communication between them, probably using WCF, named pipes, or the WM_COPYDATA message.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        O Offline
        O Offline
        okdeshpande
        wrote on last edited by
        #3

        Hi Christian Thanks for reply. I am using VB6 to do this. The exe what i am using is not developed by me. So i don't have source code of that exe also.

        D 1 Reply Last reply
        0
        • O okdeshpande

          Hi Christian Thanks for reply. I am using VB6 to do this. The exe what i am using is not developed by me. So i don't have source code of that exe also.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          What you want to do is very problematic. Using SendKeys and posting mouse messages to another window depends on the input focus NOT being touched by the user using your application. If they click off your target application during an interactive operation, that operation will fail. You'll have no way of knowing it and no way of resetting the target app back to a known state so you can retry the operation.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          O 1 Reply Last reply
          0
          • D Dave Kreskowiak

            What you want to do is very problematic. Using SendKeys and posting mouse messages to another window depends on the input focus NOT being touched by the user using your application. If they click off your target application during an interactive operation, that operation will fail. You'll have no way of knowing it and no way of resetting the target app back to a known state so you can retry the operation.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            O Offline
            O Offline
            okdeshpande
            wrote on last edited by
            #5

            Hi Dave Thanks Dave. Even i tried to send the keys but problem is when you are using send keys if target exe don't have any shortcut keys then it will not work. Thanks once again.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups