5 replies
by charliespencer Accepted solution
by cmiller5400 Accepted solution
The only way that I can think of is to use a "starter" program that checks to see if the app is already running and if so, then focus the window and maximize it; if not, then it launches the app.
You could do this in VB.Net in a couple of minutes.
by charliespencer Accepted solution
by cmiller5400 Accepted solution
Download VB.net express edition.
Create a new windows application. Double click on the form. It should take you to a code window that states something like "private sub form1_Load byVal sender..."
"end sub"
This looks for the process "Outlook", (converts it to uppercase (ucase) and checks it to see if it is running. If it is then it activates the window.
Paste this code in the sub...
Dim plist As Process()
Dim proc As Process
plist = Process.GetProcesses
For Each proc In plist
If UCase(proc.ProcessName) = "OUTLOOK" Then
AppActivate(proc.Id)
Me.Close()
End If
Next
Shell("path to executable", AppWinStyle.MaximizedFocus, False)
by charliespencer Accepted solution
I found this:
http://huddledmasses.org/tag/runonlyone/
that appears to do what I want. The source code is available but I don't know what a .7z format is or how to open it.
I wasn't implying you should write an applet for me, but I appreciate your efforts. I'm not sure what's happening inside the 'If'. Are you closing the process with the 'Me.Close' and then restarting the app with the 'Shell' statement? I don't want that, I want the existing process to continue without having a new one start. (Although for all I know the app I found does the same thing; I haven't tested it yet. I'm asking for my own education and the benefit of others who may want to use your code.)
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending