Jump to content
Fivewin Brasil

kapiaba

Membros
  • Posts

    24,540
  • Joined

  • Last visited

  • Days Won

    282

Everything posted by kapiaba

  1. O Enrico está esperando uma resposta, se funcionou, ok? abs.
  2. Hi, Enrico já está verificando. https://forums.fivetechsupport.com/viewtopic.php?f=16&t=33542&p=263685&sid=f6c0154ebff8cf15cd2d38afa2a79a5c#p263685 Abs. Regards, saludos.
  3. Bom dia. Vou passar o Link para o o Enrico Giodarno. Abs.
  4. https://forums.fivetechsupport.com/viewtopic.php?f=16&t=33542&sid=307872d6ad8084f494aeffa15acc7277&start=30#p263638 Regards, saludos.
  5. very good: http://xharbour.org/index.asp?page=download/windows/required_win Regards, saludos.
  6. Comigo dá o montão de erros: c:\TTaskPan>C:\BCC74\bin\bcc32 -c -Ic:\HBBCC74\include;c:\fwh1905\include -D__HARBOUR__ -D__FLAT__ c_themeapi.c Embarcadero C++ 7.40 for Win32 Copyright (c) 1993-2018 Embarcadero Technologies, Inc. c_ThemeAPI.c: Warning W8065 c_ThemeAPI.c 300: Call to function 'ISCHAR' with no prototype in function HB_FUN_TM_OPENTHEMEDATA *** 1 errors in Compile *** c:\TTaskPan>C:\BCC74\bin\bcc32 -c -Ic:\HBBCC74\include;c:\fwh1905\include -D__HARBOUR__ -D__FLAT__ c_themeaux.C Embarcadero C++ 7.40 for Win32 Copyright (c) 1993-2018 Embarcadero Technologies, Inc. c_ThemeAUX.c: Warning W8065 c_ThemeAUX.c 492: Call to function 'ISCHAR' with no prototype in function HB_FUN_LOADBITMAPEX Warning W8065 c_ThemeAUX.c 498: Call to function 'ISCHAR' with no prototype in function HB_FUN_LOADBITMAPEX Warning W8065 c_ThemeAUX.c 498: Call to function 'ISNUM' with no prototype in function HB_FUN_LOADBITMAPEX Warning W8065 c_ThemeAUX.c 501: Call to function 'ISCHAR' with no prototype in function HB_FUN_LOADBITMAPEX *** 1 errors in Compile *** c:\TTaskPan>C:\BCC74\bin\bcc32 -c -Ic:\HBBCC74\include;c:\fwh1905\include -D__HARBOUR__ -D__FLAT__ c_themeGDI.c Embarcadero C++ 7.40 for Win32 Copyright (c) 1993-2018 Embarcadero Technologies, Inc. c_ThemeGDI.c: Warning W8065 c_ThemeGDI.c 413: Call to function 'ISCHAR' with no prototype in function HB_FUN_TH_TPGROUPHEADERHEIGHT Warning W8065 c_ThemeGDI.c 1037: Call to function 'ISCHAR' with no prototype in function HB_FUN_TH_DRAWTASKPANELGROUPHEADER Warning W8065 c_ThemeGDI.c 1113: Call to function 'ISNIL' with no prototype in function HB_FUN_TH_DRAWTASKITEMB Warning W8065 c_ThemeGDI.c 1113: Call to function 'ISNIL' with no prototype in function HB_FUN_TH_DRAWTASKITEMB Warning W8065 c_ThemeGDI.c 1173: Call to function 'ISNUM' with no prototype in function HB_FUN_TH_DRAWTASKITEMB Warning W8065 c_ThemeGDI.c 1179: Call to function 'ISARRAY' with no prototype in function HB_FUN_TH_DRAWTASKITEMB Warning W8065 c_ThemeGDI.c 1184: Call to function 'ISNUM' with no prototype in function HB_FUN_TH_DRAWTASKITEMB Warning W8065 c_ThemeGDI.c 1190: Call to function 'ISARRAY' with no prototype in function HB_FUN_TH_DRAWTASKITEMB *** 1 errors in Compile *** c:\TTaskPan>C:\BCC74\bin\bcc32 -c -Ic:\HBBCC74\include;c:\fwh1905\include -D__HARBOUR__ -D__FLAT__ c_tthememanager.C Embarcadero C++ 7.40 for Win32 Copyright (c) 1993-2018 Embarcadero Technologies, Inc. c_TThemeManager.c: Warning W8065 c_TThemeManager.c 138: Call to function 'ISCHAR' with no prototype in function _i_GetSetBackGround Warning W8065 c_TThemeManager.c 153: Call to function 'ISARRAY' with no prototype in function _i_GetSetBackGround Warning W8065 c_TThemeManager.c 176: Call to function 'ISNUM' with no prototype in function _i_GetSetBackGround Warning W8065 c_TThemeManager.c 222: Call to function 'ISARRAY' with no prototype in function _i_GetSetRECT Warning W8065 c_TThemeManager.c 229: Call to function 'ISNUM' with no prototype in function _i_GetSetRECT Warning W8065 c_TThemeManager.c 248: Call to function 'ISNUM' with no prototype in function _i_GetSetLong Warning W8065 c_TThemeManager.c 259: Call to function 'ISARRAY' with no prototype in function _i_GetSetFont Warning W8065 c_TThemeManager.c 292: Call to function 'ISCHAR' with no prototype in function _i_GetSetFontStyle Warning W8065 c_TThemeManager.c 305: Call to function 'ISARRAY' with no prototype in function _i_GetSetFontStyle Warning W8065 c_TThemeManager.c 333: Call to function 'ISARRAY' with no prototype in function _i_GetSetForeground Warning W8065 c_TThemeManager.c 340: Call to function 'ISNUM' with no prototype in function _i_GetSetForeground Warning W8065 c_TThemeManager.c 367: Call to function 'ISCHAR' with no prototype in function _i_GetSetButton *** 1 errors in Compile *** c:\TTaskPan>C:\BCC74\bin\ilink32 -aa -Gn -Tpe -s -v @HB.LNK Turbo Incremental Link 6.90 Copyright (c) 1997-2017 Embarcadero Technologies, Inc. Fatal: Unable to open file 'C_THEMEAPI.OBJ' Abs.
  7. E melhorando cada vez mais, vamos lá usuários de HARBOUR... kkkkkkkkk Saudações Corinthianas,
  8. Alguém para tentar com HARBOUR? Não consegui nem a PAU Juvenal! https://forums.fivetechsupport.com/viewtopic.php?f=6&t=43685&sid=4f87c5cb38c9e5420f4bc7b09270ea37 Regards, saludos.
  9. Olá, talvez, assim: STATIC FUNCTION BitMaps( oPrn ) oPrn:SayBitmap( 0.6,5, "ArquivoBMP.bmp", 1.9, 1.9, 2 ) RETURN NIL ou: oPrn:SayImage( 0, 0, oImage ) Se não, NÃO! abs. Regards, saludos.
  10. Look this: https://flexdocs.net/suporte/knowledgebase.php?article=372 Regards, saludos.
  11. Algum motivo especial pra estar usando o modo assíncrono? Você não deve ter o erro se usar o modo síncrono. Regards, saludos.
  12. Galera, alguém conseguiu fazer funcionar a verificação em duas etapas do Gmail.com https://support.google.com/accounts/answer/185839?hl=pt-BR&co=GENIE.Platform%3DDesktop Abs. Regards, saludos.
  13. [1 - Linha:0001 Coluna:1333 Campo:[NIHIL] Conteúdo:[NIHIL] Erro:O elemento 'infNFe' no espaço para nome 'http://www.portalfiscal.inf.br/nfe' apresenta elemento filho 'retirada' no espaço para nome Linha 1 coluna 1333 tem erro. Verifique. abs.
  14. kapiaba

    SQLRDD

    https://forums.fivetechsupport.com/viewtopic.php?f=6&t=43610&sid=33e2f5d03ba5bfce8f5400b0a5aa3cb8
  15. que tal perguntar aqui? https://www.facebook.com/groups/xailer abs.
  16. kapiaba

    SQLRDD

    Conforme Carlos Vargas, tens que instalar BISON. https://forums.fivetechsupport.com/viewtopic.php?f=6&t=43610&sid=30d56a1e067efc639a1a1248cd3ce2b1 Regards, saludos.
  17. FUNCTION DefaultPrinter() LOCAL nPrn, nRet // Abre a tela para a seleção da impressora /* GetPrintDC( GetActiveWindow() ) // Coloca a impressora selecionada como Default do Windows SetDefaultPrinter( PRNGETNAME() ) */ nRet := PrinterSetUp() nPrn := PrnGetName() IF( nRet # 0 ) // NADA A FAZER MUDA O DEFULT DA IMPRESSORA EM TEMPO REAL. SetDefaultPrinter( PRNGETNAME() ) // MUDA O DEFAULT DA IMPRESSORA MsgInfo( OemToAnsi( "Aten‡Æo Usu rio: " )+CRLF+ ; OemToAnsi( "Sua Impressora DEFAULT(PadrÆo) ‚: " )+CRLF+ ; ( "-> " + nPrn ), ; OemToAnsi( "Sua Impressora DEFAULT(PadrÆo) ‚... " ) ) sGetDefaultPrinter := GetDefaultPrinter() // ? PrnStatus( sGetDefaultPrinter ) IF PrnStatus( sGetDefaultPrinter ) = 4096 // Verifica se SPOOLER esta desligado e tenta liga-lo MsgRun( sGetDefaultPrinter +": "+isprint( GetDefaultPrinter() ) + ; " ou Spooler Desligado.", "Status da Impressora", ; {|| WinExec( "NET START SPOOLER", 7 ) } ) ENDIF //? GetPrinter() ELSE MsgInfo( OemToAnsi( "ATEN€ÇO USUµRIO: " )+CRLF+ ; OemToAnsi( "VERIFIQUE SUA IMPRESSORA SE ESTµ LIGADA. " )+CRLF+ ; OemToAnsi( "OU SE ESTµ INSTALADA CORRETAMENTE... " )+CRLF+ ; OemToAnsi( "TEM ALGUMA COISA ERRADA COM A IMPRESSORA?" )+CRLF+ ; OemToAnsi( "SE NÇO ESCOLHEU NENHUMA IMPRESSORA, OK..." )+CRLF+ ; OemToAnsi( "TECLE <ENTER> PARA CONTINUAR... " ), ; OemToAnsi( "VERIFIQUE SUA IMPRESSORA SE ESTµ LIGADA. " ) ) RETURN( .F. ) ENDIF RETURN NIL Regards, saludos.
  18. Mira esto: https://forums.fivetechsupport.com/viewtopic.php?f=6&t=29649&sid=d25e627851753bdc84d057297bfc1bcd Regards, saludos.
  19. /* ÚÄ Programa ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Aplication: Class TDosPrint ³ ³ File: TDOSPRN.PRG ³ ³ Author: Ignacio Ortiz de Z£¤iga Echeverr¡a ³ ³ CIS: Ignacio Ortiz (Ignacio_Ortiz) ³ ³ Internet: http://www.ozs.com ³ ³ Date: 09/13/96 ³ ³ Time: 20:20:07 ³ ³ Copyright: 1997 by Ortiz de Zu¤iga, S.L. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ NOTES: This peace of software is freeware and is not part of FiveWin. The following code will let you print directly to the printer from inside any Fivewin program, like OLD DOS days. Those users that need DOS printing speed can use this class instead of the TPrinter class. The use of the class is very easy and is very similar to the TPrinter class of Fivewin, but we have not create any command to avoid the use of any static vars. This is a little sample of how to use the new class: LOCAL oPrn oPrn := TDosPrn():New("lpt1") oPrn:StartPage() // optional oPrn:Say(10,20, "This goes in line 10, column 20") oPrn:EndPage() // optional oPrn:End() A little description of all the members of this class: DATA: cPort: Printing port, by default "LPT1" cCompress: String for compressed mode, by default "15" cNormal: String for normal mode, by default "18" cFormFeed: String for EJECT, by default "12" hDC: Printing file Handle (Internal use) nRow: Current printing row nCol: Current pringing column nLeftMargin: Left margin, by default 0 nTopMargin: Top margin, by default 0 METHODS: New(cPort) Constructor, no comment End() Destructor, no comment StartPage() Begining of a page, this method is optional EndPage() End of page, this method is optional if there is only on page, or you try to print in a row that is before the current one, like it did happen with the SAY command Command(c) Let you send any command to the printer without changing the current row and col. The string to pass as a parameter should content the ascii values of the command separated with commas, for example, the command to reset Epson printers should be: "27,69" SetCoors(r,c) Let you change the current row and col is the equivalent of SetPrc() of Ca-Clipper NewLine() Increments the current row Write(cText) Prints the string cText in the current row and column Say(nRow ,; Prints the string cText in nRow, nCol nCol ,; cText ) SayCmp() The same as the method Say but prints in compressed mode and the row is updated accordly. NOTE: At the end of this class is a little function call WorkSheet that will make the job of DOS printing a lot easier. Enjoy it! */ /* // Baixei de www.fivewin.com.br em 01/11/2002 // Modifiquei em 03/11/2002 - karinhannah@bol.com.br By JoÆo. // InclusÆo: Parte Modificada Por Ednaldo Rolim - edrol@pop.com.br // Acrescentada a Parte Modificada Pelo Gilmer: www.fivewin.com.br */ #Include "FiveWin.Ch" #Include "Fileio.Ch" #Translate nTrim(<n>) => AllTrim(Str(<n>,10,0)) #define PF_BUFLEN 2048 //----------------------------------------------------------------------------// CLASS TDosPrn DATA LastError DATA cPort, cCompress, cNormal, cFormFeed, cBuffer DATA hDC, nRow, nCol, nLeftMargin, nTopMargin DATA lAnsiToOem, lCompress DATA lZeraBuffer // By Gilmer www.fivewin.com.br DATA ImpUSB // AS LOGICAL By Diego@sysfar.com.br // Imprimir na USB DATA oWnd, oPagina // Ednaldo DATA nPage AS NUMERIC // Ednaldo //METHOD New(cPort) CONSTRUCTOR METHOD New(cPort, cVerUSB) CONSTRUCTOR // By Diego da Sysfar METHOD End() // Antigo(Old) // METHOD StartPage() VIRTUAL // NÆo Conta as P ginas // METHOD EndPage() // Novo (New) // Conta as P ginas By Ednaldo Rolim METHOD StartPage() INLINE ::ShowProc() // Ednaldo METHOD EndPage() // METHOD Command(xPar1, xPar2, xPar3, xPar4, xPar5) //velho METHOD Command(cStr1, cStr2, cStr3, cStr4, cStr5) // novo METHOD SetCoors(nRow, nCol) METHOD NewLine() INLINE (::cBuffer += CRLF ,; ::nRow++ ,; ::nCol := 0 ) METHOD Write(cText, lAToO) ; INLINE (IIF(lAtoO == NIL, lAtoO := .T.,),; ::cBuffer += iif(lAtoO, AnsitoOem(cText), cText) ,; ::nCol += len(cText) ) METHOD Say(nRow, nCol, cText, lAToO) METHOD SayCmp(nRow, nCol, cText) METHOD CharSay(nRow,nCol,cText) INLINE (IIf(::lCompress,; ::SayCmp(nRow,nCol,cText),; ::Say(nRow,nCol,cText))) METHOD ZeraBuffer() // By. Gilmer METHOD PrintFile(cFile) METHOD ShowProc() // Ednaldo ENDCLASS //----------------------------------------------------------------------------// METHOD New( cPort, lFile, lCompress, cVerUSB ) CLASS TDosPrn DEFAULT cPort := "LPT1", ; cVerUSB := .F., ; lFile := .T. , ; lCompress := .F. cPort := Upper(cPort) /* // Copiei de DOSPRINT.PRG [EPSON] Normal=18 Bold=27,18,27,69 Medium=27,70,27,58 Compress=15 Large=27,69,27,18,27,14 Tiny=27,70,27,83,0,27,49,18,15 NoTiny=27,70,27,84,27,50 FormFeed=12 Length=27,67,0 [OKIDATA] Normal=27,70,27,84,27,50,27,15,18 Bold=27,18,27,69 Medium=27,70,27,58 Compress=27,70,27,84,27,15 Large=27,69,27,18,27,14 Tiny=27,70,27,83,0,27,49,18,15 NoTiny=27,70,27,84,27,50 Image=27,76 Header= Footer= Jump=216 FormFeed=12 Length=27,67,0 */ ::ImpUSB := .F. ::cCompress := "15" ::cNormal := "18" ::cFormFeed := " " // 12 //Pulo de P gina ::cBuffer := "" ::nLeftMargin := 0 ::nTopMargin := 0 ::nRow := 0 ::nCol := 0 ::lAnsiToOem := .T. ::cPort := cPort + iif(!"." $ cPort, ".PRN", "") If cVerUSB .and. upper( PrnGetPort( ) )="USB" //::cPort := DirTempdoWindows()+"\usb.imp" ::cPort := cPort + iif(!"." $ cPort, ".IMP", "") Endif ::hDC := fCreate(::cPort) ::LastError := 0 // By. Gilmer // .F. Pula P gina, .T. NÆo Pula a P gina (Cupom Fiscal) ::lZeraBuffer := .F. IF ::hDC < 0 ::LastError := fError() ENDIF ::nPage := 1 // Ednaldo ::ShowProc() // Ednaldo RETURN Self //----------------------------------------------------------------------------// METHOD End() CLASS TDosPrn IF !empty(::nRow+::nCol) ::EndPage() ENDIF ::LastError := 0 IF !fClose(::hDC) ::LastError := fError() ENDIF CursorArrow() if ::oWnd != Nil // Ednaldo ::oWnd:End() // Ednaldo endif // Ednaldo RETURN NIL //----------------------------------------------------------------------------// METHOD EndPage() CLASS TDosPrn LOCAL nFor, nLen, nSec LOCAL lError If !::lZeraBuffer // By Gilmer ::Command(::cFormFeed) End ::LastError := 0 IF fWrite(::hDC, ::cBuffer) < len(::cBuffer) ::LastError := fError() ENDIF ::cBuffer := "" ::nRow := 0 ::nCol := 0 RETURN NIL //----------------------------------------------------------------------------// //METHOD Command(xPar1, xPar2, xPar3, xPar4, xPar5) CLASS TDosPrn // Velho METHOD Command(cStr1, cStr2, cStr3, cStr4, cStr5) CLASS TDosPrn // Novo LOCAL cCommand, cToken, cString LOCAL nToken //cString := cValToChar(xPar1) // Velho cString := cStr1 // Novo /* // Velho IF xPar2 != NIL cString += ","+cValToChar(xPar2) ENDIF */ IF cStr2 != NIL cString += ","+cStr2 ENDIF /* // Velho IF xPar3 != NIL cString += ","+cValToChar(xPar3) ENDIF */ IF cStr3 != NIL cString += ","+cStr3 ENDIF /* // Velho IF xPar4 != NIL cString += ","+cValToChar(xPar4) ENDIF */ IF cStr4 != NIL cString += ","+cStr4 ENDIF /* // Velho IF xPar5 != NIL cString += ","+cValToChar(xPar5) ENDIF */ IF cStr5 != NIL cString += ","+cStr5 ENDIF cCommand := "" nToken := 1 DO WHILE !Empty(cToken := StrToken(cString, nToken++, ",")) cCommand += Chr(Val(cToken)) ENDDO ::cBuffer += cCommand RETURN NIL //----------------------------------------------------------------------------// METHOD SetCoors(nRow, nCol) CLASS TDosPrn nRow += ::nTopMargin nCol += ::nLeftMargin IF ::nRow > nRow ::EndPage() ::nPage++ // Ednaldo ::StartPage() ENDIF /* // do Site IF ::nRow > nRow ::EndPage() ::StartPage() ENDIF */ // Tava Aqui /* // do Site IF nRow == ::nRow .AND. nCol < ::nCol ::EndPage() ::StartPage() ENDIF */ DO WHILE ::nRow < nRow ::NewLine() ENDDO IF nCol > ::nCol ::Write(Space(nCol-::nCol)) ENDIF // Para Imprimir Primeiro na coluna desejada exemplo 1§ na Coluna 50 // Depois na coluna 05... By NetSpeed Inverte-se a Ordem da Cabe‡a de // ImpressÆo, Come‡ando do Fim Para o Inicio... If nRow == ::nRow .and. nCol < ::nCol ::Write(Chr(13)) // NetSpeed Endif // Aqui Inicia da Coluna 1 em diante, nÆo faz como a anterior. // Ou Seja do Inicio Para o Fim da Cabe‡a de ImpressÆo, o Que ‚ Normal. IF nRow == ::nRow .AND. nCol < ::nCol ::EndPage() ::nPage++ // Ednaldo ::StartPage() ENDIF // By. Gilmer If Len(::cBuffer)>=7928 ::ZeraBuffer() Endif RETURN NIL //----------------------------------------------------------------------------// METHOD Say(nRow, nCol, cText, lAToO) CLASS TDosPrn DEFAULT lAToO := ::lAnsiToOem IF VALTYPE( cText ) = "D" cText := DTOC( cText ) ENDIF IF VALTYPE( cText ) = "N" cText := STR( cText ) ENDIF ::SetCoors(nRow, nCol) ::Write(cText, lAToO) RETURN NIL //----------------------------------------------------------------------------// METHOD SayCmp(nRow, nCol, cText, lAToO) CLASS TDosPrn DEFAULT lAToO := ::lAnsiToOem ::Command(::cCompress) ::SetCoors(nRow, nCol) ::cBuffer += iif(lAToO, AnsitoOem(cText), cText) ::nCol += Int(len(cText)) * by Digao ::nCol += Int(len(cText)/1.7+.5) ::Command(::cNormal) RETURN NIL //----------------------------------------------------------------------------// METHOD ZeraBuffer() CLASS TDosPrn /* // Em Ingles ::LastError := 0 If ::lZeraBuffer IF fWrite(::hDC, ::cBuffer) < len(::cBuffer) ::LastError := fError() ENDIF ::cBuffer := "" Endif */ // Em Clipper Puro Como ‚! Self:LastError := 0 If Self:lZeraBuffer IF fWrite(Self:hDC, Self:cBuffer) < len(Self:cBuffer) Self:LastError := fError() ENDIF Self:cBuffer := "" Endif RETURN NIL //----------------------------------------------------------------------------// FUNCTION WorkSheet(cPort) LOCAL oPrn LOCAL cLine LOCAL nFor cLine := "" FOR nFor := 0 TO 7 cLine += Str(nFor,1)+Replicate(".",9) NEXT cLine := Substr(cLine,3) oPrn := TDosPrn():New(cPort) oPrn:StartPage() //alterei em 29/03/2004, Pois Com o Five 2.4, Pulo de P gina estava errado FOR nFor := 0 TO 56 //65 oPrn:Say(nFor,0,StrZero(nFor,2)+cLine) NEXT oPrn:EndPage() oPrn:End() RETURN NIL //----------------------------------------------------------------------------// METHOD PrintFile(cFile) CLASS TDosPrn LOCAL hFile LOCAL nRead LOCAL cBuffer hFile := FOpen(cFile, FO_READ) IF hFile < 0 RETURN .F. ENDIF cBuffer := Space(PF_BUFLEN) DO nRead := fRead(hFile, @cBuffer, PF_BUFLEN) IF fWrite(::hDC, Left(cBuffer, nRead)) < nRead ::LastError := fError() fClose(hFile) RETURN .F. ENDIF UNTIL nRead == PF_BUFLEN fClose(hFile) RETURN .T. //----------------------------------------------------------------------------// // Visualiza Processo de impressao // Ednaldo //----------------------------------------------------------------------------// METHOD ShowProc() CLASS TDosPrn IF ::oWnd = Nil * DEFINE DIALOG ::oWnd TITLE "Imprimindo ..." ; * FROM 230, 217 TO 360, 575 PIXEL ; * COLORS CLR_BLACK, nRGB(193,205,205) * * @ 10, 08 TO 40, 172 OF ::oWnd PIXEL * * @ 1.4, 2 ICON NAME "PRINT.ICO" OF ::oWnd * * @ 25, 35 SAY "Imprimindo Página :" ; * PIXEL OF ::oWnd SIZE 70, 12 RIGHT * * @ 25, 107 SAY ::oPagina VAR ::nPage ; * PIXEL OF ::oWnd UPDATE SIZE 15, 12 RIGHT * * @ 47, 60 BUTTON "Aguarde..." SIZE 60, 12 ; * PIXEL OF ::oWnd ACTION .t. * * ::oWnd:bPainted := {|| iif(::nPage>0, ::oPagina:Refresh(), )} * * ACTIVATE DIALOG ::oWnd CENTER NOWAIT * * EndDialog() ResAllFree() CursorWait() SysRefresh() ELSE ::oWnd:BeginPaint() ::oWnd:Paint() ::oWnd:EndPaint() ENDIF RETURN NIL // Fim do Programa. Regards, saludos.
  20. Como assim? Tais usando alguma TDOSPRN.PRG modificada por algum maluco do forum Inter? Regards, saludos.
  21. Use: PrintFileRaw() // ---------------------------------------------------------------------------- //----- Definicao de comando SAY para TdosPrn --------------------------------- // #xcommand @ <nRow>, <nCol> SAY <cText> OF <oPrinter> => <oPrinter>:Say(<nRow>, <nCol>, <cText> ) //-------------------------------------------------------------------------// // Imprime os Cupons Nao Fiscal da Pizzaria/Restaurante //-------------------------------------------------------------------------// STATIC FUNCTION IMPRIMIR_CUPOM( nKey, aGetVenda, oLbx, oDlgVendas, DbClientes,; DbEstoque, DbPedidos ) FIELD QTD_VENDEU, DESCRICAO, VLUNITARIO, TOTITEM, TOTPEDIDO FIELD MENSAG1, MENSAG2, MENSAG3, MENSAG4, MENSAG5 LOCAL nLinha, nPag, oPrn, Conta, Pula, DbMensag MEMVAR XNUMPEDIDO, nNumeroTel, cCodClien, cNomeClien, cEndClien, ; cNomeProduto, nQuantidade, nValorProd, nValorCompra, oSayCxLivre,; XCGCCLI, nQtdeEstoque, nCodigoProd MEMVAR nDinheiro, nCheque, nChequePre, nTickets, nCartaoCred,; nCartaoDebi, nContraVale, nTaxaEntreg, nValorTroco, nSomaSubTot,; XTROCOCLI, Valor_Pago, nValor_Pago, oSayEmpresa //-> Nome Fantasia da Empresa - Est em EMPRESA.DBF PUBLIC XDA, XCAIXA, XCODVEND, XNOMEEMP, XFANTASIA, XIMPQTDECOP, ; XPULARLINHA nLinha := 0 nPag := 1 //-> Mensagens do Rodape IF NETUSE( "MENSAGEM", .T. ) DATABASE DbMensag DbMensag:Load() //-> Temporario = a FP_PROV.DBF DbMensag:SetBuffer( .T. ) ENDIF SELECT ( DbPedidos:cAlias ) DbPedidos:SetOrder( 1 ) GO TOP // Para Rede de Computadores // oPrn:New("\\seuterminal\suaimpressora\LPT1") oPrn:= TDosPrn():New( "CUPOM.TXT" ) // para ir para um arquivo .txt // oPrn:= TDosPrn():New() // para ir para impressora em definitivo // oPrn := TDosPrn():New("lpt1") // para ir para impressora em definitivo // Este Comando, Liga a Impressora. NÆo Tirar Nunca oPrn:StartPage() // da Start(inicializa) na p gina. oPrn:lZeraBuffer := .T. // Inibe o Pulo da P gina //-> Inicia a Impressao - Cabe‡alho do Cupom //-> Modo Draft @ nLinha, 00 SAY +CHR(18)+CHR(27)+"2"+CHR(27)+"H" OF oPrn @ nLinha, 00 SAY SUBST( XNOMEEMP, 1, 23 ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY CHR(15)+REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 //-> Modo Condensado @ nLinha, 00 SAY CHR(15)+"HORA: " + TIME() + " - " + ; + DTOC(XDA) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY OemToAnsi("PEDIDO N§: " ) + ; ALLTRIM(STRZERO( XNUMPEDIDO ) ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY "FONE..: " + nNumeroTel OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY SUBSTR( cNomeClien, 1, 40 ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY SUBSTR( cEndClien, 1, 40 ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY "Cod Qtde Descricao Unit Valor" OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 //-> Imprime o Pedido WHILE !EOF() SYSREFRESH() IF EOF() EXIT ENDIF @ nLinha, 00 SAY ( DbPedidos:cAlias )->CODIGO OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY ( ALLTRIM( STR( QTD_VENDEU ) ) ) +[ - ]+ ; ( SUBSTR( DESCRICAO, 01, 17 ) ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY ( SUBSTR( DESCRICAO, 18, 35 ) ) + ; TRANSFORM( VLUNITARIO, "@E 99,999.99" ) + ; TRANSFORM( TOTITEM, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 DBSKIP() ENDDO //-> Total do Pedido IF EOF() .OR. TOTPEDIDO <= 0 SKIP(-1) ENDIF @ nLinha, 00 SAY CHR(15)+REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 IF nDinheiro > 0 @ nLinha, 00 SAY "EM DINHEIRO: " + ; TRANSFORM( nDinheiro, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF IF nCheque > 0 @ nLinha, 00 SAY "EM CHEQUE: " + ; TRANSFORM( nCheque, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF IF nChequePre > 0 @ nLinha, 00 SAY "EM CHEQUE PRE: " + ; TRANSFORM( nChequePre, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF IF nTickets > 0 @ nLinha, 00 SAY "EM TICKETS: " + ; TRANSFORM( nTickets, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF IF nCartaoCred > 0 @ nLinha, 00 SAY "EM C. CREDITO: " + ; TRANSFORM( nCartaoCred, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF IF nCartaoDebi > 0 @ nLinha, 00 SAY "EM C. DEBITO: " + ; TRANSFORM( nCartaoDebi, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF IF nContraVale > 0 @ nLinha, 00 SAY "EM C. VALE: " + ; TRANSFORM( nContraVale, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 ENDIF @ nLinha, 00 SAY CHR(15)+REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 //-> Fechou o Cupom @ nLinha, 00 SAY +CHR(18)+CHR(27)+"2"+CHR(27)+"H" + ; "TOTAL: " + ; TRANSFORM( TOTPEDIDO, "@E 9,999,999.99" ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY CHR(15)+REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY CHR(15)+"TROCO: " + ; TRANSFORM( XTROCOCLI, "@E 999,999.99" ) OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY "CAIXA: " + STRZERO( XCAIXA, 3 ) + [ - ] + ; "OPERADOR: " + XCODVEND OF oPrn nLinha := nLinha + 1 @ nLinha, 00 SAY CHR(15)+REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 SELECT ( DbMensag:cAlias ) GO TOP WHILE !EOF() SYSREFRESH() IF EOF() EXIT ENDIF IF (MENSAG1 ) != SPACE(40) @ nLinha, 00 SAY MENSAG1 OF oPrn nLinha := nLinha + 1 ENDIF IF (MENSAG2 ) != SPACE(40) @ nLinha, 00 SAY MENSAG2 OF oPrn nLinha := nLinha + 1 ENDIF IF (MENSAG3 ) != SPACE(40) @ nLinha, 00 SAY MENSAG3 OF oPrn nLinha := nLinha + 1 ENDIF IF (MENSAG4 ) != SPACE(40) @ nLinha, 00 SAY MENSAG4 OF oPrn nLinha := nLinha + 1 ENDIF IF (MENSAG5 ) != SPACE(40) @ nLinha, 00 SAY MENSAG5 OF oPrn nLinha := nLinha + 1 ENDIF @ nLinha, 00 SAY CHR(15)+REPLICATE("-",40) OF oPrn nLinha := nLinha + 1 DBSKIP() ENDDO //-> Pulos do Cupom FOR PULA = 1 TO XPULARLINHA @ nLinha, 00 SAY " " OF oPrn nLinha := nLinha + 1 NEXT PULA //-> Modo Draft @ nLinha, 00 SAY +CHR(18)+CHR(27)+"2"+CHR(27)+"H" OF oPrn oPrn:EndPage() oPrn:End() //--- imprime no spool do windows, liberando o micro para trabalhar. ImpSpool( "CUPOM.TXT",, .T. ) //--- opcionamente pode-se apagar o arquivo passando .t. no 3o. parametro. DbMensag:Close() SELECT ( DbPedidos:cAlias ) DbPedidos:SetOrder( 1 ) DbPedidos:Gotop() RETURN NIL // Maravilhoso Ednaldo Cabra Bom!!! //----------------------------------------------------------------------------// // Funcao : ImpSpool( cFileTxt, cPorta, lErase ) // Autor : Ednaldo Rolim (edrol@pop.com.br) // Descricao : Envia um arquivo TXT criado pela TDosPrn para uma // porta de Impressora. //----------------------------------------------------------------------------// FUNCTION ImpSpool( cFileTxt, cPorta, lErase ) LOCAL CPRINTER //para capturar antes da impressão //cPorta := PrnGetPorta() //WinExec( cPorta ) //depois da impressão //WinExex( "Net Use Lpt1: \Delete" ) //Ficou mais facil e simples do que criar as portas na Classe TDosPrn //cPorta := If( cPorta == nil, Alltrim( PrnGetPort() ), cPorta ) ; lErase := If( lErase == nil, .T., lErase ); //cPorta := PrnGetPort() Default cPorta := Alltrim( PrnGetPort() ), lErase:= .t. cPrinter := PrinterPortToName( cPorta ) IF EMPTY( cPrinter ) cPrinter := PrinterPortToName( "USB002" ) IF EMPTY(cPrinter) cPrinter := PrinterPortToName( "USB001" ) ENDIF ENDIF IF .NOT. FILE( cFileTxt ) MsgInfo( OemToAnsi( "NÇO ACHEI O ARQUIVO MODO TEXTO PARA IMPRIMIR NA MATRICIAL" ), ; OemToAnsi( "NÇO ACHEI O ARQUIVO MODO TEXTO PARA IMPRIMIR NA MATRICIAL" ) ) RETURN( .F. ) ENDIF IF .NOT. EMPTY( cPrinter ) // TEM USB PrintFileRaw( cPrinter, TrueName( "CUPOM.TXT" ), "Impressão de Vendas" ) ELSEIF LEN( cPorta ) <= 5 .and. Left( Upper(cPorta), 4 ) = "LPT1" //--- Spool Local - Matricial em LPT1 cPorta:= "PRN" WAITRUN("COMMAND.COM /C COPY /B " + cFileTxt + " " + cPorta, 0 ) ELSE //--- Spool Remoto - Matricial em LPT1 WAITRUN("COMMAND.COM /C COPY /B " + cFileTxt + " " + cPorta, 0 ) ENDIF IF lErase // Vem .T. da tela de vendas FERASE( cFileTxt ) ENDIF RETURN( .T. ) Regards, saludos.
  22. https://forums.fivetechsupport.com/viewtopic.php?f=6&t=43100&p=259693&hilit=QRCODE&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p259693 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=43100&p=259558&hilit=QRCODE&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p259558 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41943&p=251543&hilit=QRCODE&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p251543 https://forums.fivetechsupport.com/viewtopic.php?f=3&t=41633&p=249529&hilit=QRCODE&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p249529 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=40744&p=243637&hilit=QRCODE&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p243637 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=40392&p=241386&hilit=QRCODE&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p241386 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=40409&p=241282&hilit=qrcode&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p241282 https://forums.fivetechsupport.com/viewtopic.php?f=6&t=40111&p=239345&hilit=qrcode&sid=25f71d3b7b1e648ad4ea6f3e65c0417c#p239345 Y mucho más... Regards, saludos.
  23. https://www.impressorajato.com.br/o-led-da-impressora-esta-piscando-entenda-o-motivo
×
×
  • Create New...