Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?

Louis LaBrunda
Hi Guys,

Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?  I would like to bring the window to the forefront.

Is there some event I can catch?

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?

Louis LaBrunda
Well I guess there isn't any way to do this or someone would have said so by now.  I think it would need to be implemented in the VM.  The VM would need to detect that another copy was running and that the -singleinstance option was set, tell the other instance about it being started and then go away.  Now I think it just quietly goes away.  Can I make this a request to be added to the VM.

Lou

On Monday, August 3, 2015 at 11:21:17 AM UTC-4, Louis LaBrunda wrote:
Hi Guys,

Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?  I would like to bring the window to the forefront.

Is there some event I can catch?

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?

Seth Berman
Hello Lou,

A "restore focus on existing instance" may be a good option if running with -singleinstance on windows.  We will certainly look into it.

-- Seth

On Wednesday, August 5, 2015 at 12:19:34 PM UTC-4, Louis LaBrunda wrote:
Well I guess there isn't any way to do this or someone would have said so by now.  I think it would need to be implemented in the VM.  The VM would need to detect that another copy was running and that the -singleinstance option was set, tell the other instance about it being started and then go away.  Now I think it just quietly goes away.  Can I make this a request to be added to the VM.

Lou

On Monday, August 3, 2015 at 11:21:17 AM UTC-4, Louis LaBrunda wrote:
Hi Guys,

Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?  I would like to bring the window to the forefront.

Is there some event I can catch?

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?

Louis LaBrunda
Hi Seth,

That would be great!  Some of my GUI programs are part of a system where they monitor the running system.  Users often leave them running.  As the day goes on the window can get buried and the user can forget if it was already started, so they just try to start it again from a shortcut.  That's fine but if the program is running and the window is buried, nothing happens and the user wonders why the program didn't start.  Even then, they don't always think to look for the buried window.

Too bad Windows doesn't make this an attribute of the exe/manifest/shortcut.  It seems to me that is where it belongs.  It would be easier for the OS to do than the program having to find an already running instance and restore its focus.

Lou


On Thursday, August 6, 2015 at 11:33:06 AM UTC-4, Seth Berman wrote:
Hello Lou,

A "restore focus on existing instance" may be a good option if running with -singleinstance on windows.  We will certainly look into it.

-- Seth

On Wednesday, August 5, 2015 at 12:19:34 PM UTC-4, Louis LaBrunda wrote:
Well I guess there isn't any way to do this or someone would have said so by now.  I think it would need to be implemented in the VM.  The VM would need to detect that another copy was running and that the -singleinstance option was set, tell the other instance about it being started and then go away.  Now I think it just quietly goes away.  Can I make this a request to be added to the VM.

Lou

On Monday, August 3, 2015 at 11:21:17 AM UTC-4, Louis LaBrunda wrote:
Hi Guys,

Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?  I would like to bring the window to the forefront.

Is there some event I can catch?

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?

Instantiations mailing list
Hello,

hmm, very old this entry, whatever, under windows you can create a mutex to check for running instance, can you create it, fine, is the first, otherwise is not. Then you can find your window und bring it to front, then close the second instance of your application. But it's very hard to bring a window in front under windows. We have a lot of problems with it. 

Mutex will destroyed by the system if application closed.

Ralf

Am Donnerstag, 6. August 2015 20:37:37 UTC+2 schrieb Louis LaBrunda:
Hi Seth,

That would be great!  Some of my GUI programs are part of a system where they monitor the running system.  Users often leave them running.  As the day goes on the window can get buried and the user can forget if it was already started, so they just try to start it again from a shortcut.  That's fine but if the program is running and the window is buried, nothing happens and the user wonders why the program didn't start.  Even then, they don't always think to look for the buried window.

Too bad Windows doesn't make this an attribute of the exe/manifest/shortcut.  It seems to me that is where it belongs.  It would be easier for the OS to do than the program having to find an already running instance and restore its focus.

Lou


On Thursday, August 6, 2015 at 11:33:06 AM UTC-4, Seth Berman wrote:
Hello Lou,

A "restore focus on existing instance" may be a good option if running with -singleinstance on windows.  We will certainly look into it.

-- Seth

On Wednesday, August 5, 2015 at 12:19:34 PM UTC-4, Louis LaBrunda wrote:
Well I guess there isn't any way to do this or someone would have said so by now.  I think it would need to be implemented in the VM.  The VM would need to detect that another copy was running and that the -singleinstance option was set, tell the other instance about it being started and then go away.  Now I think it just quietly goes away.  Can I make this a request to be added to the VM.

Lou

On Monday, August 3, 2015 at 11:21:17 AM UTC-4, Louis LaBrunda wrote:
Hi Guys,

Is there any way to tell if a user has tried to run a program with the -singleinstance option set for a second time?  I would like to bring the window to the forefront.

Is there some event I can catch?

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.