473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Setting Active Process

Qu
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.
Jun 27 '08 #1
2 2394
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.
Jun 27 '08 #2
Qu
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.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: microsoft | last post by:
Hi People, when I try to modify an active directory user programatically, I receive the following exception: The server is unwilling to process the request Reading the microsoft web site, I...
1
by: Will | last post by:
I have a combo box on a form which is based on table tblMachine. On that combo box I have four columns visible MachineNumber, description, location and type. The bound column is the MachineNumber...
8
by: eggie5 | last post by:
Hi, I'm trying to set the class of an element on my page w/ javascript like this: function ResetNavigation(element) { element.className = "active"; }
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: windy | last post by:
Hi all, I wanna know the function to make an process active. i.e. I have my own process runing. And I want to pass the focus(active window) to another existing program on the process list what...
3
by: Rotsey | last post by:
Hi, I am writing app that I want to be able to hit a shortcut key (windows wide) and have it all launch my app and then be able to get the name of the process that was active when the key was...
7
by: James | last post by:
Today my friend ask me a question about setting logsecond to -1. The following sentences were copied from DB2 InforCenter: "By setting logsecond to -1, you will have no limit on the size of the...
0
by: Arthernan | last post by:
I have an Active-X control provided by a vendor that will inadvertenly crash while processing. The good part is that I do have a way to save information routinely as it is processing in the event...
1
by: nicerun | last post by:
I'm using the Application_Start event at Global.asax.cs to invoke thread that do some job. I know that Application_Start event occurs when the very first request to Web Application received. -...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.