Here's what I want to do. When my app is starting the _screen.caption is 'Starting Program'. During the initial startup I want to use a API function to see if the app is already running. If it is, I want to give the user the chance to switch to the already running version or actually start another session. If he wants to start another session, I then change the screen caption to the true app name. The problem- I cannot get what I think is the correct API function FindWindow to function within VFP. If I type: 'Declare integer FindWindow in Win32api string string' and then try to use the function by typeing 'FindWindow('',AppName)' it always returns 0 or tells me I have an incorrect number of paramters. I am new to using Win32 from within FoxPro but I have something similiar in Delphi and it seems to work there.
Can I do what I want to do from within VFP, am I using the wrong API function or What ?
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!