Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exe will not run correctly
Message
From
28/06/2005 17:44:19
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Exe will not run correctly
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01027223
Message ID:
01027223
Views:
63
The following code, when it is compiled as an exe, does not work unless the line "wait '' timeout .1" is included. I am content that I am able to get this to work but my anal coworker insists that we need to know why...

_screen.windowstate=2 && max
_screen.caption=' Get New Patriot Files'
set sysmenu off
_SCREEN.VISIBLE=.T.

wait '' timeout .1

set safety off
set talk off

ini=NEWOBJECT('writeextendini','c:\vfpcomm\myextend')
release myarr
dimension myarr[1]

=adir(myarr,'c:\homeland\sdnfiles\*.ff')

ini.retrievesdnfiles(@myarr)
* this launches a Delphi app that compares the timestamps on certain
* files on an ftp server. This does not run if the wait line is not included.
IF ini.ok=.t.
cf=JUSTPATH(SYS(2019))
torun=ADDBS(cf)+'ftpengine.exe'
runin=cf
SET PROCEDURE TO runwait additive
=launchappandwait(torun,runin)
RELEASE PROCEDURE runwait
endif

ini=.null.
* other stuff happens
declare integer FindWindow in Win32api string cClass, string Cwindow
nHwd=FindWindow(0,' Get New Patriot Files')
if nHwd <> 0
wParam=''
lParam=0
Msg=18 && quit
DECLARE SHORT PostMessage IN user32;
INTEGER hWnd,;
INTEGER Msg,;
STRING @ wParam,;
INTEGER lParam
PostMessage (nHwd,Msg,@wParam,lParam)
ENDIF
* if the wait line is not included and the _screen is not set to visible the hour glass comes up for about 5 seconds and then disappears without the delphi app running. The exe file is still running as a process but not as an application. If _screen.visible=.t. the app will start but will always show up in the task manager as not responding. Thanks for any help...
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Next
Reply
Map
View

Click here to load this message in the networking platform