|
-
Jun 28th, 2000, 12:36 AM
#1
Thread Starter
New Member
I have a VB application that gets invoked from another
Java application. I need to check in my VB code to see if
this VB application is already running. If it is, I need to
terminate it before continuing...
Can someone give any tips to continue ?
I know I can detect the previous instance using the
App.previnstance method, but how do I kill the previous
instance ?
Thanks
-
Jun 28th, 2000, 12:38 AM
#2
_______
' See if there is already and instance.
If App.PrevInstance Then
' Activate the previous instance
AppActivate App.Title
' Send a key (here SHIFT-key) to set the
' form from the previous instance to the
' top of the screen.
SendKeys "+", True
' Terminate the new instance
Unload Me
End If
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 28th, 2000, 01:06 AM
#3
Thread Starter
New Member
detect running process and terminate
Hello HeSaidJoe,
I tried your code, but it didn't help.
In my VB application, I get some arguments passed from
the Java application. Based on these arguments, I do
some data retrieval and post the results in a MDI window.
When the java program re-invokes the VB program, I want
to terminate the previous instance and continue processing
with the new set of arguments. This way, the MDI window
now shows data for the latest arguments.
If I use the code to terminate the current application,
the MDI window still shows the old data...
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|