FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Exit application from oninit window.
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Exit application from oninit window.
Posted: Mon Apr 11, 2016 07:33 PM
Any advice?

Code (fw): Select all Collapse
#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()
    
    DEFINE oFont ...........

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
      TITLE "Building a DialogBox"

   ACTIVATE WINDOW oWnd MAXIMIZED ON INIT Login(oWnd)

    oFont:End()
    
return nil

PROCEDURE Login(oWnd)

    IF <conditions>
            ... I want to quit program. Tried QUIT but APPCRASH is created.
    ENDIF

RETURN


Thanks,
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Exit application from oninit window.
Posted: Mon Apr 11, 2016 07:46 PM
Did you try

Code (fw): Select all Collapse
oWnd:End()


?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Exit application from oninit window.
Posted: Mon Apr 11, 2016 07:47 PM

Hakan,

Please review FWH\samples\login.prg

We should not call QUIT from a FWH app

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Exit application from oninit window.
Posted: Tue Apr 12, 2016 06:04 AM
Enrico Maria Giordano wrote:Did you try

Code (fw): Select all Collapse
oWnd:End()


?


Tried. Aplication is ended but there is still Task Manager.
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Exit application from oninit window.
Posted: Tue Apr 12, 2016 08:33 AM
This sample works fine here:

Code (fw): Select all Collapse
#include "FiveWin.ch"

static oWnd

//----------------------------------------------------------------------------//

function Main()
    
   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
      TITLE "Building a DialogBox"

   ACTIVATE WINDOW oWnd MAXIMIZED ON INIT oWnd:End()

return nil


EMG
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Exit application from oninit window.
Posted: Tue Apr 12, 2016 08:54 AM

Hi,

You are right. I was using oWnd:End() in a function. I realized that I dont have RETURN on some conditions.

Solved.

Thank you.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06

Continue the discussion