Closing a PB app. from another PN app.

Closing a PB app. from another PN app.

Post by Krishna Sast » Thu, 16 Feb 1995 06:02:44



I launch a PB app. (A) that launches another PB app. (B). When a user closes app. A,
the closequery of app. A sends a WM_CLOSE message to app. B. In the closequery of
app. B, a messagebox is displayed to the user to confirm if he/she wants to quit the
application. The problem that I am having is that the messagebox from the closequery
of the 2nd application locks up, I cannot tab between the OK and Cancel buttons or
use the mouse. The messagebox does not always lock up, it happens at random. Any
suggestions would be very helpful.
 
 
 

1. Closing an VO App from another VO App...

Regards VOers!!!

I'm building a aplication that needs to close another VO aplication...
But, I don't have success.
I'm trying for this way:

----------------------------------------------------------------------------
--------------------------------

FUNCTION CloseRunningInstanceApp(cAppID) AS LOGIC PASCAL
LOCAL lAlreadyRunning AS LOGIC
LOCAL ptrFoundWin AS PTR


~"ONLYEARLY+"
Global_cGuid:=cAppID
Global_dwMyAppMessage := RegisterWindowMessage( String2Psz( Global_cGuid ) )
Global_hMutex := CreateMutex( NULL_PTR, FALSE, String2Psz( Global_cGuid ) )
IF (GetLastError() = DWORD(_CAST, ERROR_ALREADY_EXISTS)) .or.
(GetLastError() = DWORD(_CAST, ERROR_ACCESS_DENIED))
   lAlreadyRunning := TRUE
ENDIF
IF lAlreadyRunning

   IF ptrFoundWin <> NULL_PTR
      ptrFoundWin := GetLastActivePopup(ptrFoundWin)
      SetForegroundWindow(ptrFoundWin)
      SendMessage(ptrFoundWin,WM_QUIT,0,0)
   ENDIF
ENDIF

RETURN lAlreadyRunning
~"ONLYEARLY-"

METHOD DetonarTudo() CLASS PrincipalWindow

 (InfoBox{SELF,"Detonar Sistema","Detonando sistema agora..."}):Show()
 DO WHILE .T.
  IF AlreadyRunningInstance("sucata2000.exe")
   CloseRunningInstanceApp("sucata2000.exe")
   WaitFor(6)
  ELSE
   EXIT
  ENDIF
 ENDDO

----------------------------------------------------------------------------
-------------------------------------------------

If the target app is running, AlreadyRunningInstance() returns true.
But, the target app don't close.  It still running...

thanks...

Lucio Chiessi

2. Help please

3. Anyone know a "Close All Apps" app?

4. NetWare API

5. Sharing MDI Windows between PB and non-PB apps.

6. O2 Memory Question

7. help on CDPlayer.app & Sound.app

8. Antwort: Change date on HP-UX 8.02???

9. Data transmission Vxworks app. to NT app.

10. Seeking advice -- testing online service apps and I-net apps.

11. Windows app and QnX app.

12. Help - Running a VO Tray App from another VO App

13. Compile an link VO app from another VO app