Exit application from oninit window.

Exit application from oninit window.

Postby Horizon » Mon Apr 11, 2016 7:33 pm

Any advice?

Code: Select all  Expand view
#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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Re: Exit application from oninit window.

Postby Antonio Linares » Mon Apr 11, 2016 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Exit application from oninit window.

Postby Horizon » Tue Apr 12, 2016 6:04 am

Enrico Maria Giordano wrote:Did you try

Code: Select all  Expand view
oWnd:End()


?


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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Exit application from oninit window.

Postby Enrico Maria Giordano » Tue Apr 12, 2016 8:33 am

This sample works fine here:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Exit application from oninit window.

Postby Horizon » Tue Apr 12, 2016 8: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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests