Preciso de ajuda.
Vou precisar de window e vou precisar da main hwgui.
Preciso de uma main invisivel, e talvez que fique recebendo e executando codeblocks
Isso é possÃvel?

Moderador: Moderadores
#xcommand @ <x>,<y> BITMAP [ <oBmp> SHOW ] <bitmap> ;
[<res: FROM RESOURCE>] ;
[ OF <oWnd> ] ;
[ ID <nId> ] ;
[ SIZE <width>, <height> ] ;
[ BACKCOLOR <bcolor> ] ;
[ STRETCH <nStretch>] ;
[<lTransp: TRANSPARENT> [COLOR <trcolor> ]] ;
[ ON INIT <bInit> ] ;
[ ON SIZE <bSize> ] ;
[ ON CLICK <bClick> ] ;
[ ON DBLCLICK <bDblClick> ];
[ TOOLTIP <ctoolt> ] ;
Achei o browse com cores, o browse zebrado, e até um browse ADO com meu nome kkkkk
hbmk2 -doc hwindow
SYNTAX
------
INIT WINDOW <oWnd>
APPNAME <appname> TITLE <cTitle> AT <x>, <y> SIZE <nWidth>, <nHeight> ICON <ico>
SYSCOLOR <clr> COLOR <bColor> BACKGROUND BITMAP <oBmp> STYLE <nStyle> EXCLUDE <nExclude>
FONT <oFont> MENU <cMenu> MENUPOS <nPos>
ON INIT <bInit> ON SIZE <bSize> ON PAINT <bPaint> ON GETFOCUS <bGfocus>
ON LOSTFOCUS <bLfocus> ON OTHER MESSAGES <bOther> ON EXIT <bExit>
HELP <cHelp> HELPID <nHelpId>
SEEALSO
-------
hdialog
#include "hbclass.ch"
#include "inkey.ch"
MEMVAR m_Prog
PROCEDURE pBancoCCusto
LOCAL oFrm := JPBACCUSTOClass():New()
IF ! AbreArquivos( "jpempresa", "jptabel", "jpconfi" )
RETURN
ENDIF
oFrm:Execute()
RETURN
CREATE CLASS JPBACCUSTOClass INHERIT FrmCadastroClass
VAR axKeyValue INIT { 0 }
VAR cDataTable INIT "JPBACCUSTO"
VAR cDataField INIT "IDBACCUSTO"
VAR cnSQL INIT ADOClass():New( AppConexao() )
METHOD Especifico( lExiste )
METHOD TelaDados( lEdit )
METHOD GridSelection()
ENDCLASS
METHOD GridSelection() CLASS JPBACCUSTOClass
LOCAL oTBrowse, bCode
LOCAL cnSQL := ADOClass():New( AppConexao() )
WITH OBJECT cnSQL
:cSQL := "SELECT IDBACCUSTO, CUCCUSTO, CUGRUPO FROM JPBACCUSTO ORDER BY CUCCUSTO"
:Execute()
oTBrowse := { ;
{ "CCUSTO", { || :String( "CUCCUSTO", 10 ) } }, ;
{ "GRUPO", { || :String( "CUGRUPO", 10 ) } }, ;
{ "#ID", { || Str( :Number( "IDBACCUSTO" ), 6 ) } } }
IF "ID" $ Upper( ReadVar() )
bCode := { || Ltrim( Str( :Number( "IDBACCUSTO" ) ) ) }
ELSE
bCode := { || :String( "CUCCUSTO" ) }
ENDIF
BrowseADO( cnSQL, oTBrowse, "CUCCUSTO,CUGRUPO", bCode )
:CloseRecordset()
ENDWITH
RETURN NIL
METHOD Especifico( lExiste ) CLASS JPBACCUSTOClass
LOCAL GetList := {}, nIdbaCCusto := 0
IF ::cOpc != "I"
nIdBaCCusto := ::axKeyValue[ 1 ]
@ Row() + 1, 20 GET nIdbaCCusto PICTURE "@K 999999" VALID nIdbaCCusto > 0
Mensagem( "Digite código para cadastro, F9 Pesquisa, ESC sai" )
READ
Mensagem()
IF LastKey() == K_ESC .OR. nidbaCCusto < 0
RETURN .F.
ENDIF
IF ! ::EspecificoExiste( lExiste, ADORecCount( "JPBACCUSTO", "IDBACCUSTO = " + NumberSQL( nidBaCCusto ) ) == 0 )
RETURN .F.
ENDIF
ENDIF
::axKeyValue := { nIdBaCCusto }
RETURN .T.
METHOD TelaDados( lEdit ) CLASS JPBACCUSTOClass
LOCAL GetList := {}, nidbaCCusto, mcuGrupo, mcuCCusto
LOCAL cnSQL := ADOClass():New( AppConexao() )
nIdBaCCusto := ::axKeyValue[ 1 ]
WITH OBJECT cnSQL
:cSQL := "SELECT * FROM JPBACCUSTO WHERE IDBACCUSTO = " + NumberSQL( nIdbaCCusto )
:Execute()
mcuGrupo := :String( "CUGRUPO", 10 )
mcuCCusto := :String( "CUCCUSTO", 10 )
:CloseRecordset()
ENDWITH
hb_Default( @lEdit, .F. )
DO WHILE .T.
::ShowTabs()
DO CASE
CASE ::nNumTab == 1
@ Row() + 1, 1 SAY "#ID..............:" GET nidbaCCusto PICTURE "999999" WHEN .F.
@ Row() + 2, 1 SAY "Centro de Custo..:" GET mcuCCusto PICTURE "@K!"
@ Row() + 2, 1 SAY "Grupo de CCusto..:" GET mcuGrupo PICTURE "@K!"
ENDCASE
//SetPaintGetList( GetList )
IF lEdit
Mensagem( "Digite campos, F9 Pesquisa, ESC Sai" )
READ
Mensagem()
ELSE
CLEAR GETS
EXIT
ENDIF
::nNumTab += 1
IF LastKey() == K_ESC .OR. ::nNumTab > 1
EXIT
ENDIF
ENDDO
IF ! lEdit .OR. LastKey() == K_ESC
RETURN NIL
ENDIF
WITH OBJECT cnSQL
:QueryCreate()
:QueryAdd( "CUCCUSTO", mcuCCusto )
:QueryAdd( "CUGRUPO", mcuGrupo )
IF ::cOpc == "I"
:QueryAdd( "CUINFINC", LogInfo() )
nidbaCCusto := :QueryExecuteInsert( "JPBACCUSTO" )
::axKeyValue := { nidbaCCusto }
ELSE
:QueryAdd( "CUINFALT", LogInfo() )
:QueryExecuteUpdate( "JPBACCUSTO", "IDBACCUSTO= " + NumberSQL( nidbaCCusto ) )
ENDIF
ENDWITH
RETURN NIL
FUNCTION ValidBancarioCCusto( cResumo )
LOCAL lOk := .T.
DO CASE
CASE cResumo == Pad( "APLIC", 10 )
CASE cResumo == Pad( "NENHUM", 10 )
CASE Empty( cResumo ) .AND. m_Prog != "PBANCOGRAFICOMES"
CASE ADORecCount( "JPBACCUSTO", "CUCCUSTO= " + StringSQL( cResumo ) ) == 0
MsgWarning( "Despesa/Receita não cadastrada!" )
lOk := .F.
ENDCASE
RETURN lOk
FUNCTION PTESHWGUI( cModule, cTitulo )
LOCAL oFrm := UmaTelaClass():New( cTitulo, cModule, "CIAEPU+-", "d:\jpa\cordeiro\jpcidade" )
oFrm:Execute()
RETURN Nil
Usuários vendo este fórum: Nenhum usuário registrado online e 6 visitantes