|
-
Oct 2nd, 2000, 06:21 AM
#1
Thread Starter
New Member
I have found another problem in a small app I have written. I need to check if an instance of the program is already open before it opens a second copy. If it is already open, I want to stop the second copy from loading. Does anybody know the procedure for detecting a loaded version of the program?
Cheers,
Russ
-
Oct 2nd, 2000, 06:23 AM
#2
_______
<?>
Code:
' See if there is already and instance.
If App.PrevInstance Then
' Activate the previous instance
AppActivate App.Title
' 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
-
Oct 2nd, 2000, 07:38 AM
#3
Addicted Member
Hi,
(working with Russ on this one!).
The app's previous instance is hidden. We have got it now so that it doesn't load up a second version (thanks, HeSaidJoe), but how do we get the original one to show again when a user tries to load a second one. AppActivate just doesn't seem to be working!
Any ideas
Cheers
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
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
|