Running single instance of VB program 
Author Message
 Running single instance of VB program

Is there any way that one can limit a program so that only one
instance of it runs at a time? i.e. if one tries to launch the program
while another instance of that same program is running, it won't
start, or the running instance will be activated.



Mon, 03 Dec 2001 03:00:00 GMT  
 Running single instance of VB program
'Put this your startup -form's Form_Load -event
If App.PrevInstance = True Then
  MsgBox "Program allready started!", 48, "MyProg"
  Unload Me
End If

Regards

Tim

Quote:

> Is there any way that one can limit a program so that only one
> instance of it runs at a time? i.e. if one tries to launch the program
> while another instance of that same program is running, it won't
> start, or the running instance will be activated.



Mon, 03 Dec 2001 03:00:00 GMT  
 Running single instance of VB program
:)
How can I do it while using only OCX called from scripts or html
pages?



Quote:
>'Put this your startup -form's Form_Load -event
>If App.PrevInstance = True Then
>  MsgBox "Program allready started!", 48, "MyProg"
>  Unload Me
>End If

>Regards

>Tim


>> Is there any way that one can limit a program so that only one
>> instance of it runs at a time? i.e. if one tries to launch the program
>> while another instance of that same program is running, it won't
>> start, or the running instance will be activated.



Mon, 03 Dec 2001 03:00:00 GMT  
 Running single instance of VB program
oh, sorry
I tought that u are developing
VB -program, not using some
VBA -script.
hmmm....  
Cannot answer to your question,
maybe there is some API -calls
that can solve your prob.

Tim

Quote:

> :)
> How can I do it while using only OCX called from scripts or html
> pages?



> >'Put this your startup -form's Form_Load -event
> >If App.PrevInstance = True Then
> >  MsgBox "Program allready started!", 48, "MyProg"
> >  Unload Me
> >End If

> >Regards

> >Tim


> >> Is there any way that one can limit a program so that only one
> >> instance of it runs at a time? i.e. if one tries to launch the program
> >> while another instance of that same program is running, it won't
> >> start, or the running instance will be activated.



Mon, 03 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Running A single instance of a program

2. Single Instance of VB program

3. Limit to single running instance - how?

4. Only running 1 instance of VB program

5. single instance and program restart

6. Single instance of a program

7. Single Instance of a program - problem

8. Multiple Instances or Single Instances

9. How to create a single instance of an object in VB

10. How to Limit an VB Application to a Single Instance

11. Help finding instance of program running over network!!!

12. Check if instance of program already running

 

 
Powered by phpBB® Forum Software