Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / April 2008

Tip: Looking for answers? Try searching our database.

Setting Active Process

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Qu - 28 Apr 2008 01:45 GMT
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.
Family Tree Mike - 28 Apr 2008 03:47 GMT
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?

> Hi everyone.
>
[quoted text clipped - 16 lines]
> Thanks,
> Qu.
Qu - 28 Apr 2008 06:27 GMT
On Apr 28, 12:47 pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.com> wrote:
> 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
[quoted text clipped - 22 lines]
>
> - 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.