FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Beep exiting dialogs
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Beep exiting dialogs
Posted: Tue Feb 14, 2006 08:35 PM
Try to close this dialog using ESC and you will hear a beep:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oGet

    LOCAL cVar := SPACE( 30 )

    DEFINE DIALOG oDlg

    @ 1, 1 GET oGet VAR cVar

    @ 3, 1 BUTTON "&Close" ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Beep exiting dialogs
Posted: Wed Feb 15, 2006 01:53 AM

Enrico,

Is that for the new release? I do not hear a beep using FW2.7, May 2005 build.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Beep exiting dialogs
Posted: Wed Feb 15, 2006 07:49 AM
James Bott wrote:Enrico,

Is that for the new release? I do not hear a beep using FW2.7, May 2005 build.

James


Yes, February build.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Beep exiting dialogs
Posted: Wed Feb 15, 2006 12:38 PM

Enrico,

It is something related with the GET because if the button has the focus, then there is no beep. We are searching... :)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Beep exiting dialogs
Posted: Wed Feb 15, 2006 12:46 PM
Fixed:

METHOD KeyChar( nKey, nFlags ) CLASS TGet

   local nHi, nLo
   local lAccept
   local bKeyAction := SetKey( nKey )
   local nDefButton

   if nKey == VK_ESCAPE     // new
      return 1                        
   endif                               

   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Beep exiting dialogs
Posted: Fri Feb 17, 2006 09:29 PM
Enrico,

This is the right code:
METHOD KeyChar( nKey, nFlags ) CLASS TGet

   local nHi, nLo
   local lAccept
   local bKeyAction := SetKey( nKey )
   local nDefButton

   if nKey == VK_ESCAPE  // avoids a beep!
      ::oWnd:KeyChar( nKey, nFlags )
      return 1
   endif   

   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Beep exiting dialogs
Posted: Fri Feb 17, 2006 10:34 PM

Thank you again!

EMG

Continue the discussion