.net - procedure for calling an exe only one time -


I am using process.info, start the process (); Clicking on the button to make an XE call on C # .net, but every time I click on the button, it says an exe and opens a duplicate file on the taskbar. I just want to maximize the exchange which was already on the taskbar.

I am facing the problem that it is repeatedly opening the same file on the button click. Is there any way that he can open the exchanges once and click on the button, if he is already opened instead of creating duplicate entries then can maximize the xi file?

itemprop = "text">

process. Start () a process gives a class what you can do a class Is variable (for example, the process has been initiated; ) that is initiated when the button is clicked. If that variable is null, it means that the process has not started yet , And that application should be launched, else it is already running, and we should ignore it.

Yes is a basic example: Process start process = faucet; Public Zero Button 1_Clicked (Object Sender, EventArgs E) {If (processed process == zero) start process = process.start ("path \ \ To \\ process.exe ");}

If you want to automatically switch to that window that is already running, then in .NET There are no ways to do this basically. You will need DLLImports from user32.dll. An example can be found in the comments on this page:


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -