I have an application that is being used on PPC based hand held scanners but the software they use to lock the scanners allows them to move focus from the scanner software to the lockdown program. Because the lockdown software doesn't allow access to menus they return to the scanner software by running the application again.

Because the original copy has control of the scanner hardware the second copy now doesn't operate correctly.

I believe that I should be able to use the FindWindow routine in the initial startup code to check whether the software is already running and if it is I should be able to use the SetForegroundWindow routine to surface the original copy then exit the second copy.

Is this a senisble way of handling this sequence of events? If so how do I do this (code would be good).

Steve Sharkey