On Apr 28, 12:47*pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
It sounds like you are describing your own code within another process. *I
don't know of a way to do this. *If you are able to get the directory from an
environment variable, then why do you need to get into the other process?
"Qu" wrote:
Hi everyone.
The short version: I need a way to change the currently active process
at run-time.
The long version: I need to get a directory path out of an external
application. The only way I seem to be able to find this path is with
an environment variable: "XS_PROJECT". Therefore, I can get it via
"Environment.GetEnvironmentVariable("XS_PROJECT"); .
But before I do this, I need to change the currently active process
from my form (ProjectStatus.exe) to an open version of the application
(TeklaStructures.exe).
So if anyone could help me with this one, I'd be grateful.
Alternatively, if there's a way to get the Environment Variable
without taking focus from the form, that'd be even better!
Thanks,
Qu.- Hide quoted text -
- Show quoted text -
I don't need to get into the other process. All I need is that one
environment variable (which happends to be a directory path, which can
vary depending on how the user opened the external application).
That's all I need.
The only way I know how to retrive Environment Variables, however, is
via Environment.GetEnvironmentVariable()... which only works if the
program containing the variable has focus.
Sorry I didn't explain it well enough first time around.