By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,511 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

Who Called me?

P: n/a
Hello,

I need to run my application from another one, and I need to know which
application called me.
Any help is appreciated.

Regards,

Roy
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You can always call the application with parameters like
c:\go.exe -from MyCallerAppName -......
and retrieve them in then go.exe application.

Fred.

"Roy Barr" a écrit :
Hello,

I need to run my application from another one, and I need to know which
application called me.
Any help is appreciated.

Regards,

Roy

Nov 21 '05 #2

P: n/a
Simplest way would be to set up your target app (the one which will be
run from another application) to use parameters, like so

App1: TargetApp App1
App2: TargetApp App2
App3: TargetApp App3

Then in "TargetApp", simply parse out the Environment variables
(returned in an array of strings)

Of course, you could mess around with .NET remoting and do the cool
way, but that would cause you to write abit more code. :)

Nov 21 '05 #3

P: n/a
Isn't there a way to get the application with the focus?

Regards,

Roy

"Jerry H." <bo*********@gmail.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.com...
Simplest way would be to set up your target app (the one which will be
run from another application) to use parameters, like so

App1: TargetApp App1
App2: TargetApp App2
App3: TargetApp App3

Then in "TargetApp", simply parse out the Environment variables
(returned in an array of strings)

Of course, you could mess around with .NET remoting and do the cool
way, but that would cause you to write abit more code. :)

Nov 21 '05 #4

P: n/a
Do a google search for GetForegroundWindow

Private Declare Function GetForegroundWindow Lib "user32" () As Long
http://msdn.microsoft.com/library/de...oundwindow.asp

Nov 21 '05 #5

P: n/a

"Jerry H." <bo*********@gmail.com> schrieb im Newsbeitrag
news:11**********************@z14g2000cwz.googlegr oups.com...
Do a google search for GetForegroundWindow

Private Declare Function GetForegroundWindow Lib "user32" () As Long
http://msdn.microsoft.com/library/de...oundwindow.asp

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.