Any suggestions on programmatically (safely) closing non-VFP and/or VFP apps: i.e., "Calculator","MyExtra.exe", etc.?
...
*******************
The following API calls does bring the Calculator window to top (but doesn't attempt to close it)
DECLARE Long FindWindow in Win32API String, String
DECLARE Long BringWindowToTop in Win32API Long
Local lnHWND,lcTitle
lcTitle = "Calculator" && or My.Exe or whatever
lnHWND = FindWindow(null,m.lcTitle)
IF m.lnHWND >0 &&if calculator is open
BringWindowToTop(m.lnHWND)
ENDIF
*******************
How might we close the window (captioned lcTitle) using API calls or such?
Thanks in advance,
Philip
...
*******************
The following API calls does bring the Calculator window to top (but doesn't attempt to close it)
DECLARE Long FindWindow in Win32API String, String
DECLARE Long BringWindowToTop in Win32API Long
Local lnHWND,lcTitle
lcTitle = "Calculator" && or My.Exe or whatever
lnHWND = FindWindow(null,m.lcTitle)
IF m.lnHWND >0 &&if calculator is open
BringWindowToTop(m.lnHWND)
ENDIF
*******************
How might we close the window (captioned lcTitle) using API calls or such?
Thanks in advance,
Philip