Search found 75 matches

by JoséQuintas
Wed Mar 12, 2025 2:37 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Detect ESC on dialog
Replies: 11
Views: 10269

Re: Detect ESC on dialog

From an older fivewin user: GetKeyState()

Code: Select all | Expand

   ::xDlg:bValid := { || iif( GetKeyState( VK_ESCAPE ), ::lHitEsc := .T., Nil ), ::lCanClose }
These are 2 different things.
lCanClose - if dialog can be closed
lHitEsc - if user hit ESC, this will be used by routine

This solves my current need.
by JoséQuintas
Wed Mar 12, 2025 2:05 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Detect ESC on dialog
Replies: 11
Views: 10269

Re: Detect ESC on dialog

Not sure if can be interesting or not:

On VB6 there exists the KeyPress(), anything like bKeyDown.
It works like harbour INKEY_FILTER.

function KeyPress( KeyAscii )
IF KeyAscii = ESC
KeyAscii = 0
ENDIF
RETURN


equivalent fivewin:

dialog:bKeyDown := { | nkey | routine( @nKey ), nKey ...
by JoséQuintas
Wed Mar 12, 2025 1:36 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Detect ESC on dialog
Replies: 11
Views: 10269

Re: Detect ESC on dialog

On this class, NOT DIALOG, I use this:

VAR lHitESC INIT .F.

I use like Inkey(), to end process first


DO WHILE ! class:lHitEsc .AND. ! :eof()
:MoveNext()
ENDDO
:CloseRecordset()
IF class:lHitEsc
Dialog:Close()
ENDIF


ESC will not close dialog, but will be used to terminate process before ...
by JoséQuintas
Wed Mar 12, 2025 1:10 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Detect ESC on dialog
Replies: 11
Views: 10269

Re: Detect ESC on dialog

Do not solve.
Comment about SetDialogEsc(.F.):
it changes ALL DIALOGS, may be I want to change only a specific dialog.
As example, dialog with a single browse, I want to use the ESC to exit.

Is possible to detect ESC on dialog valid ?
by JoséQuintas
Mon Mar 10, 2025 7:19 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Detect ESC on dialog
Replies: 11
Views: 10269

Detect ESC on dialog

try this:

Code: Select all | Expand

   ::xDlg:bKeyDown := { | nKey | ;
      iif( nKey == VK_ESCAPE, ::lHitEsc := .T., Nil ), ;
      MsgExclamation( iif( ::lHitEsc, "ESC", "other" ) ) }
ESC do nothing, but other keys show "other"

What I can do about this ?
by JoséQuintas
Thu Mar 06, 2025 2:56 pm
Forum: FiveWin for Harbour/xHarbour
Topic: harbour behaviour on DIALOG INIT
Replies: 3
Views: 955

Re: harbour behaviour on DIALOG INIT

Found this way


IF ::bCodeBlock != Nil
::xDlg:bInit := ::bCodeBlock
ENDIF
ACTIVATE DIALOG ::xDLG CENTERED


Thanks.

Note:
Behaviour is created by #xcommand using self as parameter, to be used on codeblock.

[{|Self|<uInit>}]

If change this, it may becames incompatible with existing routines ...
by JoséQuintas
Wed Mar 05, 2025 4:14 pm
Forum: FiveWin for Harbour/xHarbour
Topic: harbour behaviour on DIALOG INIT
Replies: 3
Views: 955

Re: harbour behaviour on DIALOG INIT

May be the #translate or anything else.
I will made a test using oDlg:bInit.
by JoséQuintas
Wed Mar 05, 2025 3:40 pm
Forum: FiveWin for Harbour/xHarbour
Topic: harbour behaviour on DIALOG INIT
Replies: 3
Views: 955

harbour behaviour on DIALOG INIT


SYSTEM ERROR
Error BASE/1004 Message not found: TDIALOG:BCODEBLOCK
Called from __ERRRT_SBASE(0)
Called from TDIALOG:ERROR(0)
Called from (b)HBOBJECT(0)
Called from TDIALOG:MSGNOTFOUND(0)
Called from TDIALOG:BCODEBLOCK(0)
Called from (b)DLGTEXTMSGCLASS_EXECUTE(118)
Called from TDIALOG ...
by JoséQuintas
Mon Mar 03, 2025 1:36 pm
Forum: FiveWin para Harbour/xHarbour
Topic: Multihilo y cierre de DBF
Replies: 11
Views: 11346

Re: Multihilo y cierre de DBF


En otra función lanzo un proceso en un Hilo independiente, esta función deberá cerrar la ventana del XBrowse.
Entonces el proceso que está trabajando en el hilo independiente, cuando intenta cerrar la ventana no puede cerrar el DBF.
¿Cómo puedo cerrar un DBF abierto en el hilo principal del ...
by JoséQuintas
Sun Mar 02, 2025 10:17 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Text scroll and time graph
Replies: 7
Views: 6188

Re: Text scroll and time graph

https://i.postimg.cc/FHZY9G10/error2.png


#include "fivewin.ch"

PROCEDURE ze_fwTextMsg

LOCAL oDlgMsg, nCont, bOldError

hb_ThreadStart( { || oDlgMsg := DlgTextMsgClass():New(), oDlgMsg:Execute() } )

bOldError := ErrorBlock()
ErrorBlock( { | e | oDlgMsg:lCanClose := .T., oDlgMsg:End(), iif ...
by JoséQuintas
Tue Feb 25, 2025 2:30 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Text scroll and time graph
Replies: 7
Views: 6188

Re: Text scroll and time graph

https://i.postimg.cc/QtytY72V/debug.png

Text scroll using xbrowse.

I know about INIT, but use multithread on test.
And can debug it using harbour debug.


#include "fivewin.ch"

PROCEDURE ze_fwTextMsg

LOCAL oVar, nCont // , oDialog

hb_ThreadStart( { || oVar := DlgTextMsgClass():New(), oVar ...
by JoséQuintas
Sun Feb 23, 2025 5:07 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Text scroll and time graph
Replies: 7
Views: 6188

Re: Text scroll and time graph

I know about INIT, but I made on this way.

Note: using gtwvg with no display

#include "fivewin.ch"

PROCEDURE ze_fwTextMsg

LOCAL oVar, nCont

hb_ThreadStart( { || oVar := DlgTextMsgClass():New(), oVar:Execute() } )
Inkey(2)
FOR nCont = 1 TO 50
oVar:ShowText( "Test " + Ltrim( Str( nCont ...
by JoséQuintas
Sun Feb 23, 2025 4:31 pm
Forum: FiveWin for Harbour/xHarbour
Topic: New FWH 25.01
Replies: 13
Views: 13237

Re: New FWH 25.01

My mix works with FWH 25.01

Many thanks.
by JoséQuintas
Fri Feb 21, 2025 6:59 pm
Forum: FiveWin para Harbour/xHarbour
Topic: Suggestion of small change on xbrowse
Replies: 0
Views: 578

Suggestion of small change on xbrowse

Near to line 2190


METHOD Skip( n ) CLASS TXBrowse

local nStart
local nSkipped := 0

if !::lClosed
TRY
hb_Default( @n, 1 )
if Empty( ::aFilter )
nSkipped := Eval( ::bSkip, n, Self )
else
nStart := ::nFltRow
::GoFltRow( ::nFltRow + n )
nSkipped := ::nFltRow - nStart
endif
CATCH ...
by JoséQuintas
Mon Feb 17, 2025 2:38 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Text scroll and time graph
Replies: 7
Views: 6188

Re: Text scroll and time graph


Do you allow the user to move up and down on the scrolled text ?


On most cases no.
- my server send eletronic factura mail, check new post codes, and others
- application update structures (dbf or mySQL)
- applicatin makes backup/zip of DBF and MySQL
- On application using dbf, I show each ...