... opção, que uso em console/gtwvg é uma imitação do dbase que criei.
Dá pra usar em fivewin, de repente multithread mesmo que é mais simples.
hb_ThreadStart( { || RotinaXbase() } )
Na rotina é só carregar janela GTWVG ou GTWVT.
PROCEDURE ImitaXbase
hb_gtReload"WVG" )
SetMode(33,100)
CLS ...
Pesquisa resultou em 227 ocorrências: +hb_threadStart
Termo pesquisado: +hb threadstart
- 24 Jul 2025 14:03
- Fórum: FiveWin
- Tópico: FOXPRO ou Outro Editor de .DBF Modo Console
- Respostas: 15
- Exibições: 2801
- 21 Jul 2025 22:05
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Eu e meus testes... GTWVG, HWGUI, HMG Extended
- Respostas: 5
- Exibições: 2336
Eu e meus testes... GTWVG, HWGUI, HMG Extended
... 2, 0 PROMPT "(3)HMG3"
@ 3, 0 PROMPT "(E)HMGE"
@ 4, 0 PROMPT "(O)OOHG"
MENU TO nOpc
DO CASE
CASE LastKey() == 27; EXIT
CASE nOpc == 1; hb_ThreadStart( { || Test2( "DLGAUTOHWGUI" ) } )
CASE nOpc == 2; hb_ThreadStart( { || Test2( "DLGAUTOHMG3" ) } )
CASE nOpc == 3; hb_ThreadStart( { || Test2 ...
@ 3, 0 PROMPT "(E)HMGE"
@ 4, 0 PROMPT "(O)OOHG"
MENU TO nOpc
DO CASE
CASE LastKey() == 27; EXIT
CASE nOpc == 1; hb_ThreadStart( { || Test2( "DLGAUTOHWGUI" ) } )
CASE nOpc == 2; hb_ThreadStart( { || Test2( "DLGAUTOHMG3" ) } )
CASE nOpc == 3; hb_ThreadStart( { || Test2 ...
- 27 Abr 2025 13:10
- Fórum: HwGui
- Tópico: Poucos conseguem treebox em page
- Respostas: 12
- Exibições: 3857
ao
... BUTTON "run " + aOption2[ 3 ] ;
SIZE 200, 24 ;
ON CLICK aOption2[ 4 ]
ELSE
@ 30, 50 BUTTON aOption2[ 3 ] ;
SIZE 200, 24 ;
ON CLICK { || hb_ThreadStart( { || hwg_InitProc(), Eval( aOption2[ 4 ] ) } ) }
ENDIF
ELSE
Eval( aOption2[ 3 ], oTabLevel2 )
ENDIF
END PAGE OF oTabLevel2
Então ...
SIZE 200, 24 ;
ON CLICK aOption2[ 4 ]
ELSE
@ 30, 50 BUTTON aOption2[ 3 ] ;
SIZE 200, 24 ;
ON CLICK { || hb_ThreadStart( { || hwg_InitProc(), Eval( aOption2[ 4 ] ) } ) }
ENDIF
ELSE
Eval( aOption2[ 3 ], oTabLevel2 )
ENDIF
END PAGE OF oTabLevel2
Então ...
- 20 Abr 2025 21:50
- Fórum: HwGui
- Tópico: Modificando samples
- Respostas: 23
- Exibições: 6561
Modificando samples e bug(*) encontrado(*)
... demomenumt.prg - Menu using Multithread" ;
AT 200,0 ;
SIZE 400,150
MENU OF oDlg
MENU TITLE "Options"
MENUITEM "&Browse DBF" ACTION hb_ThreadStart( { || DoMt( bCodeBrowseDbf ) } )
MENUITEM "&Tab" ACTION hb_ThreadStart( { || DoMt( bCodeDemoTab ) } )
MENUITEM "&Exit" ACTION hwg_EndDialog ...
AT 200,0 ;
SIZE 400,150
MENU OF oDlg
MENU TITLE "Options"
MENUITEM "&Browse DBF" ACTION hb_ThreadStart( { || DoMt( bCodeBrowseDbf ) } )
MENUITEM "&Tab" ACTION hb_ThreadStart( { || DoMt( bCodeDemoTab ) } )
MENUITEM "&Exit" ACTION hwg_EndDialog ...
- 04 Abr 2025 18:51
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Convertendo pra nultithread e gtwvg/qualquer lib
- Respostas: 5
- Exibições: 2396
Convertendo pra nultithread e gtwvg/qualquer lib
... chamo a rotina InitProc() de HWGUI, porque a thread precisa dela, que só rodou na Main.
Não tenho isso em todos os fontes.
Usei algo assim:
hb_ThreadStart( { || DoPrg( "teste" ) }
DoPrg faz a configuração antes de chamar qualquer módulo.
O módulo passa a ter um fonte comum, contém o que precisa ...
Não tenho isso em todos os fontes.
Usei algo assim:
hb_ThreadStart( { || DoPrg( "teste" ) }
DoPrg faz a configuração antes de chamar qualquer módulo.
O módulo passa a ter um fonte comum, contém o que precisa ...
- 04 Abr 2025 10:35
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Convertendo pra nultithread e gtwvg/qualquer lib
- Respostas: 5
- Exibições: 2396
Convertendo pra nultithread e gtwvg/qualquer lib
... 2"
@ 3, 0 PROMPT "Cadastro 3"
@ 4, 0 PROMPT "Este menu de novo"
MENU TO nOPC
DO CASE
CASE LastKey() == K_EC
EXIT
CASE nOpc == 1
//hb_ThreadStart( { || Opcao1() } )
CASE nOpc == 2
//hb_ThreadStart( {{ || Opcao2() } )
CASE nOpc == 3
//hb_TheeadStart( { || Opcao3() } )
CASE nOpc == 4 ...
@ 3, 0 PROMPT "Cadastro 3"
@ 4, 0 PROMPT "Este menu de novo"
MENU TO nOPC
DO CASE
CASE LastKey() == K_EC
EXIT
CASE nOpc == 1
//hb_ThreadStart( { || Opcao1() } )
CASE nOpc == 2
//hb_ThreadStart( {{ || Opcao2() } )
CASE nOpc == 3
//hb_TheeadStart( { || Opcao3() } )
CASE nOpc == 4 ...
- 04 Abr 2025 10:24
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Convertendo pra nultithread e gtwvg/qualquer lib
- Respostas: 5
- Exibições: 2396
Convertendo pra nultithread e gtwvg/qualquer lib
... um que teste com a LIB que usar, mas acho que em Windows só sobra a GTWVT.
Renomeie sua MAIN pra MAIN2, e cria uma nova.
PROCEDURE Main
hb_ThreadStart( { || Main2() } )
hb_ThreadWaitForAll()
RETURN
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
A princípio, com essa mudança tudo ...
Renomeie sua MAIN pra MAIN2, e cria uma nova.
PROCEDURE Main
hb_ThreadStart( { || Main2() } )
hb_ThreadWaitForAll()
RETURN
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
A princípio, com essa mudança tudo ...
- 29 Mar 2025 21:49
- Fórum: HwGui
- Tópico: hwgui e multithread
- Respostas: 1
- Exibições: 2485
hwgui e multithread
... oDlg TITLE "ADO Example" ;
AT 200,0 SIZE 400,150
MENU OF oDlg
MENUITEM "&Exit" ACTION hwg_EndDialog()
MENUITEM "&Browse DBF" ACTION hb_ThreadStart( { || DoMt( nCont++ ) } )
ENDMENU
ACTIVATE DIALOG oDlg
hb_ThreadWaitForAll()
RETURN Nil
FUNCTION DoMt( nCont )
hb_gtReload( hb_gtInfo ...
AT 200,0 SIZE 400,150
MENU OF oDlg
MENUITEM "&Exit" ACTION hwg_EndDialog()
MENUITEM "&Browse DBF" ACTION hb_ThreadStart( { || DoMt( nCont++ ) } )
ENDMENU
ACTIVATE DIALOG oDlg
hb_ThreadWaitForAll()
RETURN Nil
FUNCTION DoMt( nCont )
hb_gtReload( hb_gtInfo ...
- 25 Mar 2025 15:06
- Fórum: [x]Harbour
- Tópico: PROBLEMAS AO CONVERTER HB_BASE64 UTF8 UTF-8
- Respostas: 14
- Exibições: 3301
PROBLEMAS AO CONVERTER HB_BASE64 UTF8 UTF-8
... hb_MultiThread()
#xtranslate hb_threadSelf() => GetCurrentThread()
#xtranslate hb_threadID( [<x,...>] ) => GetThreadId( <x> )
#xtranslate hb_threadStart( <x,...> ) => StartThread( [<x>] )
#xtranslate hb_threadJoin( <x> ) => JoinThread( <x> )
#xtranslate hb_threadQuitRequest( <x ...
#xtranslate hb_threadSelf() => GetCurrentThread()
#xtranslate hb_threadID( [<x,...>] ) => GetThreadId( <x> )
#xtranslate hb_threadStart( <x,...> ) => StartThread( [<x>] )
#xtranslate hb_threadJoin( <x> ) => JoinThread( <x> )
#xtranslate hb_threadQuitRequest( <x ...
- 08 Mar 2025 19:37
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Multithread GUI
- Respostas: 4
- Exibições: 3208
Multithread GUI
... situation. It's much safer when user uses his
own mechanism to terminate treads in some safe for his code places.
Harbour PRG level API:
hb_threadStart( [<nThreadAttrs> ,] <@sStart()> | <bStart> | <cStart> [, <params,...> ] ) -> <pThID>
hb_threadSelf() -> <pThID> | NIL
hb_threadId( [ <pThID ...
own mechanism to terminate treads in some safe for his code places.
Harbour PRG level API:
hb_threadStart( [<nThreadAttrs> ,] <@sStart()> | <bStart> | <cStart> [, <params,...> ] ) -> <pThID>
hb_threadSelf() -> <pThID> | NIL
hb_threadId( [ <pThID ...
- 05 Mar 2025 14:07
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: errorsys: multithread e mix
- Respostas: 0
- Exibições: 5753
errorsys: multithread e mix
... Parece doido, mas é interessante isso.
Vamos endoidar mais:
#include "fivewin.ch"
PROCEDURE ze_fwTextMsg
LOCAL oDlgMsg, nCont
hb_ThreadStart( { || ;
ErrorBlock( { | e | JoseQuintasError( e ) } ), ;
oDlgMsg := DlgTextMsgClass():New(), ;
oDlgMsg:bCodeBlock := { || MsgExclamation ...
Vamos endoidar mais:
#include "fivewin.ch"
PROCEDURE ze_fwTextMsg
LOCAL oDlgMsg, nCont
hb_ThreadStart( { || ;
ErrorBlock( { | e | JoseQuintasError( e ) } ), ;
oDlgMsg := DlgTextMsgClass():New(), ;
oDlgMsg:bCodeBlock := { || MsgExclamation ...
- 02 Mar 2025 19:23
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Multithread GUI
- Respostas: 4
- Exibições: 3208
Multithread GUI
... Neste caso é fivewin, mas poderia ser com qualquer uso.
#include "fivewin.ch"
PROCEDURE ze_fwTextMsg
LOCAL oDlgMsg, nCont, bOldError
hb_ThreadStart( { || oDlgMsg := DlgTextMsgClass():New(), oDlgMsg:Execute() } )
bOldError := ErrorBlock()
ErrorBlock( { | e | oDlgMsg:lCanClose := .T ...
#include "fivewin.ch"
PROCEDURE ze_fwTextMsg
LOCAL oDlgMsg, nCont, bOldError
hb_ThreadStart( { || oDlgMsg := DlgTextMsgClass():New(), oDlgMsg:Execute() } )
bOldError := ErrorBlock()
ErrorBlock( { | e | oDlgMsg:lCanClose := .T ...
- 26 Fev 2025 19:02
- Fórum: FiveWin
- Tópico: fivewin xbrowse array
- Respostas: 11
- Exibições: 3104
fivewin xbrowse array
... hbthread.ch'
REQUEST HB_CODEPAGE_PTISO
///////////////////////////////////////
PROCEDURE Main
SETMODE( 30, 100 )
AltD(1)
AltD()
hb_ThreadStart( { || Main2() } )
// hb_ThreadWaitForAll()
@ 1,1 say 'Hello World!'
Inkey(0)
RETURN
///////////////////////////////////////
PROCEDURE ...
REQUEST HB_CODEPAGE_PTISO
///////////////////////////////////////
PROCEDURE Main
SETMODE( 30, 100 )
AltD(1)
AltD()
hb_ThreadStart( { || Main2() } )
// hb_ThreadWaitForAll()
@ 1,1 say 'Hello World!'
Inkey(0)
RETURN
///////////////////////////////////////
PROCEDURE ...
- 26 Fev 2025 13:19
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Usando multithread
- Respostas: 8
- Exibições: 3611
Usando multithread
... Supondo que seu aplicativo tem a procedure Main, que é o início do aplicativo.
Altere o nome pra Main2, e crie outra Main.
PROCEDURE Main
hb_ThreadStart( { || Main2() } )
hb_ThreadWaitForAll()
RETURN
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
Esta vai ser uma Main() invisível ...
Altere o nome pra Main2, e crie outra Main.
PROCEDURE Main
hb_ThreadStart( { || Main2() } )
hb_ThreadWaitForAll()
RETURN
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
Esta vai ser uma Main() invisível ...
- 26 Fev 2025 11:38
- Fórum: FiveWin
- Tópico: fivewin xbrowse array
- Respostas: 11
- Exibições: 3104
fivewin xbrowse array
... de chamar a thread, senão todas começam sem configuração (RDD,SET DATE, etc)
Descobri esta parte só neste último ano.
PROCEDURE Main
hb_ThreadStart( { || principal() } )
hb_ThreadWaitForAll()
RETURN
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
O módulo principal vai ficar sem ...
Descobri esta parte só neste último ano.
PROCEDURE Main
hb_ThreadStart( { || principal() } )
hb_ThreadWaitForAll()
RETURN
PROCEDURE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT
RETURN
O módulo principal vai ficar sem ...