BBC BASIC for Windows
« Detect program already running »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:45pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Detect program already running  (Read 366 times)
mavison
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Detect program already running
« Thread started on: Jan 6th, 2010, 12:25pm »

Does anyone have BB4W code that would ...
1. Detect (on startup) if the program is already running
2. Bring original program window to front

I have searched, but not found!
Thanks
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Detect program already running
« Reply #1 on: Jan 6th, 2010, 2:09pm »

Quote:
Does anyone have BB4W code that would ...
1. Detect (on startup) if the program is already running
2. Bring original program window to front

1. is here:

http://bb4w.wikispaces.com/Detecting+a+second+instance+of+a+program

2. might be a little tricky, because Windows tries not to let one process fiddle with the window positioning of another process (because it's open to abuse). You might be able to do something by sending your original program a message for it to bring itself to the front.

Richard.
User IP Logged

mavison
New Member
Image


member is offline

Avatar




PM


Posts: 14
xx Re: Detect program already running
« Reply #2 on: Jan 6th, 2010, 2:47pm »

Thanks Richard ... sorry, I had forgotten to search the Wiki!

The Mutex stuff works a treat. Still pondering if I can be bothered to find how to send a message and move window to top!
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls