Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot run .exe

Status
Not open for further replies.

shangrilla

Programmer
Nov 21, 2001
360
0
0
US
Ok this is really messed up. I can build my project, Build my exe and run it from within foxpro. After I click on the myApp.exe itself in my c:\myApp or its shortcut on the desktop it doesn't run. The hourglass comes up for a second and then disappears. If I try running it again it says that the app is already running. I press CTRL+ALT+DEL and I can see the myApp.exe under the processes tab and I have to kill it there before I can do anything. Whats wrong?

***The following code checks to see if theApp is already ***running.

*Turn off DDE error messages.

=ddesetoption( "SAFETY", .f.)

*Check to see if DDE service was already started.

achan = ddeinitiate( "pkf4", "System" )
If achan # -1
Wait WINDOW "App is already running"
Quit
Endif

*If we got here, the service was not started, so start it.
=ddesetservice( "pkf4", "DEFINE" )

*The last line of this program turns off the service.
*Clears settings that help control multiple instances
*At the end of the program, turn off the service,
*so we can get in next time.

=ddesetservice( "pkf4", "RELEASE" )
 
Do you use the main VFP window, or your own top-level form? Do you have SCREEN=OFF in your config.fpw file?

Ian
 
I hate to say it because it sounds so basic but could it be you miss a read events in your main program loop.

i.e. Do mainmenu.mpr

read events Dancing is easy. Now dancing on a floating raft in the middle of an October storm in the middle of the North Atlantic, that is hard.
 
I don't think it's the lack of a READ EVENTS...his app still shows up in the Task Manager. It's just not appearing on the screen, and he has to force it to shut down before he can try again.

Ian
 
It could be you are using a SCREEN = OFF in your config.fpw and having your main form not a top level form. This might explain the continuation of your app invisible or in my case(some years ago ;-) ):

I had this once, when using a splash screen but forgetting to show the main VFp screen after the splash screen stopt running.

HTH,
Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top