Jump to content
Fivewin Brasil

Tatoo

Membros
  • Posts

    81
  • Joined

  • Last visited

Everything posted by Tatoo

  1. Obrigado Amigo Kapiaba... Eu preciso saber como declarar um array dentro da DLL32... Nao é STRING..._INT...DWORD...LONG...
  2. Oi...Por anos eu não escrever...mas eu sinto falta daqueles tempos com mais tempo... Hoje eu preciso de um pouco de ajuda Eu copiar o problema do fórum FiveTech... Alguém trabalha com o scanner de cheques Epson TM-S1000? Muito obrigado, como sempre Estoy haciendo unas pruebas con unas librerías de EPSON para escanear cheques TM-S1000 y abriendo la DLL he logrado ejecutar algunos comandos básicos...copiándome del ejemplo que trae de VB6.0 VB Public Declare Function BiOpenMonPrinter Lib "EpsStmApiWrapper.dll" (ByVal nType As Integer, ByVal pName As String) As Long FWH DLL32 FUNCTION BiOpenMonPrinter(TYPE_PRINTER AS _INT, PRINTER_NAME AS STRING) AS _INT PASCAL FROM "BiOpenMonPrinter" LIB "EpsStmApiWrapper.dll" Pero con la siguiente instrucción no tengo la respuesta para el tipo Object... VB Public Declare Function BiSCNMICRFunctionPostPrint Lib "EpsStmApiWrapper.dll" (ByVal Handle As Long, ByVal Struct As Object, ByVal bFunction As Integer) As Long Lo mismo me pasa con una estructura definida así: Public Type MF_MICR Rem:// MIC_OCR Section iSize(1 To 4) As Byte iVersion(1 To 4) As Byte iRet(1 To 4) As Byte bFont As Byte bMicOcrSelect As Byte blParsing(1 To 4) As Byte bStatus As Byte bDetail As Byte szMicrStr(1 To MF_MICR_CHAR_MAX) As Byte stOcrReliableInfo(1 To MF_MICR_CHAR_MAX) As MF_OCR_RELIABLE_INFO szAccountNumber(1 To MF_MICR_CHAR_MAX) As Byte szAmount(1 To MF_MICR_CHAR_MAX) As Byte szBankNumber(1 To MF_MICR_CHAR_MAX) As Byte szSerialNumber(1 To MF_MICR_CHAR_MAX) As Byte szEPC(1 To MF_MICR_CHAR_MAX) As Byte szTransitNumber(1 To MF_MICR_CHAR_MAX) As Byte lCheckType(1 To 4) As Byte lCountryCode(1 To 4) As Byte End Type Y utilizada en: Public Declare Function BiGetMicrText Lib "EpsStmApiWrapper.dll" (ByVal Handle As Long, ByVal transactionNumber As Long, ByRef mfMicr As MF_MICR) As Long Lo intenté por lo que estuve leyendo aquí con una rutina en C dentro de mi programa con infructuosos resultados ya que no logro pasarlo como parámetro a la DLL32...o no lo sé... #pragma BEGINDUMP #include <hbapi.h> #define MF_MICR_CHAR_MAX 81 // Reliability structure typedef struct { char cRecogChar; LONG lPercentage; } MF_OCR_RELIABILITY; // Reliability information structure typedef struct { LONG lPosition; MF_OCR_RELIABILITY stFirstSelect; MF_OCR_RELIABILITY stSecondSelect; } MF_OCR_RELIABLE_INFO; // MICR/OCR structure typedef struct { int iSize; int iVersion; int iRet; BYTE bFont; BYTE bMicOcrSelect; BOOL blParsing; BYTE bStatus; BYTE bDetail; char szMicrStr[MF_MICR_CHAR_MAX]; MF_OCR_RELIABLE_INFO stOcrReliableInfo[MF_MICR_CHAR_MAX]; char szAccountNumber[MF_MICR_CHAR_MAX]; char szAmount[MF_MICR_CHAR_MAX]; char szBankNumber[MF_MICR_CHAR_MAX]; char szSerialNumber[MF_MICR_CHAR_MAX]; char szEPC[MF_MICR_CHAR_MAX]; char szTransitNumber[MF_MICR_CHAR_MAX]; long lCheckType; long lCountryCode; } MF_MICR; #pragma ENDDUMP Bueno...espero que alguien pueda ayudarme... Muchas Gracias...
  3. Tatoo

    xls para dbf

    Olá... Eu gravo o arquivo como .CSV com o Excel...que te deixa um arquivo separado por vírgulas em texto plano... Cada vírgula de separação é uma coluna do Excel e é cada campo do arquivo que gero... Uso-o em vários clientes para atualizar preços ou artigos e anda muito bem... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  4. Olá amigos... Gostaria de participar...alguém me pode recomendar um Hotel próximo para chegar o 18 e ficar-me até o 20 de novembro? Muito Obrigado... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  5. Tatoo

    Say

    Olá...Kleyton... Recebi o mail...e to acabo de contestar... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  6. Paradoxalmente.... Cerveja Quilmes...o sabor do Encontro... jajajajajjajajja http://www.mercadolibre.com.ar/org-img/original/MLA/102004/14538429_693.jpg Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  7. Olá... Não teria que opinar...e menos desde tão longe...mas... Não fica feio que um homem lhe peça a sua mulher que saia a defendê-lo publicamente?... Ou pior ainda...utiliza o nick de sua mulher para contestar ele mesmo?... Seguramente entendo mal porque não compreendo o idioma... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  8. Tatoo

    Say

    Olá...Kleyton.. Não entendo bem tua pergunta... Que cor lhe estás pondo ao SAY...e daí cor tem a WINDOW ou DIALOG? Buscá exemplos onde se usa o GETSYSCOLOR(COLOR_WINDOW) e quiçá te ajude para pôr o mesmo no SAY.. Se estás usando os predeterminados de Windows...intentá pôr-lhe cor a tuas DIALOG... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  9. Olá...Click21... Encontro?...é uma nova clase de FW?... @ 4,5 ENCONTRO 2do VAR Antarctica OF FIVEWIN; ACTION tomar(tudo) ó para Karinh que usa WS (The Best) REDEFINE ENCONTRO 2do VAR Brahma OF FIVEWIN; ACTION tomar(tudo) Uma dica....se usam VAR QUILMES a classe tem muito melhor sabor...ja Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  10. Tatoo

    PARA TATOO

    Olá...Vagner... Tudo bom com Opera... mais de que encontro fala...? Encontro?..Encontro?...não encontro nada... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  11. Ahhh...fizeram um Encontro?... Não sabia...a passaram bem?... Seguramente faltou muita gente...sobretudo de Argentina... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  12. Tatoo

    PARA TATOO

    Olá... Opera é para mim como WS para Karinh...The Best... Não ia entrar para não me entristecer por não ter estado no II Encontro...mas pelo Opera o faço... Podem baixá-lo de..check Include Java... http://www.opera.com/download/ E têm para selecionar linguagem em... http://www.opera.com/download/languagefiles/ Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  13. Olá...Kleyton... http://www.fivewin.com.br/ExibeDicas.asp?Id=362 É uma pesquisa incremental que tem o que voce procura... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  14. Olá...Rubensma... Esta classe de TWord existe... Talvez serve-lhe para algo... ou oferece-lhe alguma idéia... ____________________________________________________________ // Clase TWord // Esta clase fue iniciada por Pedro Arribas Lopez // Se ha de linkar junto con la clase Ole2 de Jose Gimenez, ya que la // clase OLE original de Fivewin produce un error // // Modificaciones y añadidos: // // 7-5-2002 Sebastian Almiron - Se ha incorporado el metodo CheckSpelling() que // llama al corrector ortografico. Debe tenerse el documento en pantalla. Por // ejemplo despues de llamar a ::Visualizar(). // // 7-5-2002 Sebastian Almiron - Se han incorporados los metodos ::Gotop y // ::GoBottom() // // 6-5-2002 Sebastian Almiron - Los metodos say, line, etc. ahora pueden // referirse a la cabecera o al cuerpo principal del documento // Ello nos permitirá crear el "impreso" sobre la cabecera cuando este // se repita en muchas hojas, consiguiendo con ello un ahorro // considerable de tiempo y espacio. El metodo SetHeader() hace que todos // los metodos de pintado/escritura se redirijan a la cabecera y el metodo // SetMainDoc() hace que se escriban en el cuerpo principal del documento. // // 6-5-2002 Sebastian Almiron - El metodo tabpredeterminado(ncmpos) es para // indicar la distancia de los tabuladoores predeterminados // // 6-5-2002 Sebastian Almiron - Existe una nueva propiedad ::oLastsay // que es el ultimo say mandado al documento, ello nos permitirá darle // formato, como por ejemplo añadirle tabuladores. // // 6-5-2002 Sebastian Almiron - El metodo TabClearAll(ocuadrotext) elimina // todos los tabuladores existentes, se le puede pasar de parametro el // ultimo say (::olastsay), por defecto se refiere al documento. // // 6-5-2002 Sebastian Almiron - El metodo AddTabulador(ocuadrotexto) sirve // para añadir un tabulador, bien al documento (valor por defecto) o bien // al ultimo say (::olastsay) // // 6-5-2002 Sebastian Almiron - Se ha añadido el metodo ::Box(), su uso es // similar al mismo metodo de TPrinter // // 6-5-2002 Sebastian Almiron - Se han añadido los metodos ::SetPortrair() y // setlandscape() al igual que en TPrinter // // 6-5-2002 Sebastian Almiron - Se ha añadido el metodo ::Protect(password) que // permite proteger el documento contra cualquier modificacion. // // 6-5-2002 Sebastian Almiron - Se ha modificado el metodo ::startpage() y endpage() // que producia bajo ciertas circunstancias paginas en blanco, // ahora se aproxima mas a su uso con TPrinter. En realidad Endpage() no // hace nada pero lo he dejado por mantener la compatibilidad con TPrinter // // 6-5-2002 Sebastian Almiron - Se ha motificado el metodo ::Say(), ahora se le // puede indicar la anchura del cuadro de texto, por defecto calcula la anchura // para ajustarlo al texto. Se le puede pasar la altura del cuadro con ello // nos permitirá crear cuadros grandes en el que el texto esté separado por // tabuladores y retornos de carro, evitando tener que crear tantos cuadros // de texto. // // //----------------------------------------------------------------// #include "FiveWin.Ch" #define TAB chr(9) #define ENTER chr(13) #define ALI_LEFT 0 #define ALI_CENTER 1 #define ALI_RIGHT 2 #define ALI_JUSTIFY 3 #define LOGPIXELSX 88 #define LOGPIXELSY 90 //----------------------------------------------------------------------------// // LA CLASE TWORD //----------------------------------------------------------------------------// CLASS TWord DATA OleWord DATA hdc INIT 0 DATA OleDocs DATA OleActiveDoc DATA OleTexto DATA oselection DATA cNombreDoc DATA nLinea,nCol, nPage DATA nYoffset, nXoffset DATA lstartpag DATA oLastSay METHOD New() METHOD NewDoc( cNombreDoc ) METHOD OpenDoc( cNombreDoc ) METHOD Write( cTexto, cFuente, cSize, lBold, lShadow, nColor ) METHOD Say( nLin,nCol,cTexto,oFuente,nSizeHorz,nClrText,nBkMode,nPad ) METHOD CmSay( nLin,nCol,cTexto,oFuente,nSizeHorz ) METHOD Say2( nLin,nCol,cTexto,oFuente,nSizeHorz ) METHOD TextBox( nTop, nLeft, nButtom, nRight, lLine, nColor, cTexto, oFuente, nJustify ) METHOD Line( nTop, nLeft, nButtom, nRight, oPen ) METHOD FillRect( aRect, oBrush ) METHOD AddImagen( nTop,nLeft,nButtom,nRight, cImagen ) METHOD Visualizar INLINE OleSetProperty( ::OleWord, "Visible", .t. ) METHOD JustificaDoc( nJustify ) METHOD Replace( cOld,cNew ) METHOD Save() METHOD StartPage() METHOD EndPage() METHOD nHorzRes() METHOD nHorzSize() METHOD nVertRes() METHOD nVertSize() METHOD nLogPixelX() METHOD nLogPixelY() METHOD GetTextHeight( cFont, oFont ) METHOD PrintDoc() METHOD Preview() METHOD VistaCompleta() METHOD End() METHOD Protect(cpassword) // bySebastianAlmiron METHOD SetLandScape() // bySebastianAlmiron METHOD SetPortrait() // bySebastianAlmiron METHOD Box(ntop, nleft, nbottom, nright) //bySebastianAlmiron METHOD GetTextWidth(cText, oFont)//bySebastianAlmiron METHOD addTabulador(ncmpos,ocuadrotext)//bySebastianAlmiron METHOD TabClearAll(ocuadrotext)//bySebastianAlmiron METHOD TabPredeterminado(ncmpos)//bySebastianAlmiron METHOD SetHeader()//bySebastianAlmiron METHOD SetMainDoc()//bySebastianAlmiron METHOD Gotop() //bySebastianAlmiron METHOD GoBottom() //bySebastianAlmiron METHOD CheckSpelling() //bySebastianAlmiron ENDCLASS //------------------------------------------------------------------------------ METHOD NEW( cDoc ) ::OleWord := CreateOleObject( "Word.Application" ) return Self //------------------------------------------------------------------------------ METHOD NewDoc( cNombreDoc ) ::OleDocs := OleGetProperty( ::OleWord, "Documents") OleInvoke( ::OleDocs,"Add") ::OleActiveDoc := OleGetProperty( ::OleWord, "ActiveDocument") ::OleTexto := OleGetProperty( ::OleWord, "Selection") ::cNombreDoc := cNombreDoc ::nLinea := 0 ::nCol := 0 ::nPage := 0 ::nYoffset := 0 ::nXoffset := 0 ::lstartpag := .t. ::oselection := ::OleActiveDoc return nil //------------------------------------------------------------------------------ METHOD OpenDoc( cNombreDoc ) ::OleDocs := OleGetProperty( ::OleWord, "Documents") IF FILE( cNombreDoc ) ::OleActiveDoc := OleInvoke( ::OleDocs,"Open",cNombreDoc ) ELSE OleInvoke( ::OleDocs,"Add") ::OleActiveDoc := OleGetProperty( ::OleWord, "ActiveDocument") ENDIF ::OleTexto := OleGetProperty( ::OleWord, "Selection") ::cNombreDoc := cNombreDoc ::nLinea := 0 ::nCol := 0 ::nPage := 0 ::nYoffset := 0 ::nXoffset := 0 ::oselection := ::OleactiveDoc ::lstartpag := .t. return nil //------------------------------------------------------------------------------ METHOD Say2( nLin,nCol,cTexto,oFuente,nSizeHorz ) Local oFont := OleGetProperty( ::OleTexto, "Font") OleSetProperty( oFont, "Name", oFuente:cFaceName ) OleSetProperty( oFont, "Size", int(oFuente:nHeight) ) OleSetProperty( oFont, "Bold", oFuente:lBold ) if ::nLinea < nLin OleInvoke( ::OleTexto,"TypeText", chr(13) ) ::nLinea:= nLin ::nCol := 0 endif if ::nCol < nCol OleInvoke( ::OleTexto,"TypeText", chr(9) ) ::nCol:=nCol endif OleInvoke( ::OleTexto,"TypeText", cTexto ) OleInvoke( oFont,"Reset" ) release oFont return nil //------------------------------------------------------------------------------ METHOD TextBox( nTop, nLeft, nButtom, nRight, lLinea, nColor, cTexto, oFuente, nJustify ) LOCAL oShapes,oCuadro,oFill,oLinea, oFontC, oText, oCuadroText oShapes := OleGetProperty( ::oselection,"Shapes" ) oCuadro := OleInvoke( oShapes, "AddTextbox", 1,INT(nLeft),INT(nTop),INT(nRight-nLeft),INT(nButtom-nTop) ) oFill := OleGetProperty( oCuadro, "Fill" ) oFillColor := OleGetProperty( oFill,"ForeColor") OleSetProperty( oFillColor,"RGB",nColor ) oLinea := OleGetProperty( oCuadro, "Line" ) if lLinea OleSetProperty( oLinea, "Weight", 1 ) else OleSetProperty( oLinea, "Transparency",0) OleSetProperty( oLinea, "Visible",0) endif oCuadroText := OleGetProperty( oCuadro, "TextFrame" ) oText := OleGetProperty( oCuadroText, "TextRange" ) oFontC := OleGetProperty( oText, "Font") OleSetProperty( oFontC, "Name", oFuente:cFaceName ) OleSetProperty( oFontC, "Size", INT(oFuente:nHeight) ) OleSetProperty( oFontC, "Bold", oFuente:lBold ) OleSetProperty( oText, "Text", cTexto ) oParagraph := OleGetProperty( oText, "ParagraphFormat") OleSetProperty( oParagraph, "Alignment", nJustify ) release oParagraph, OLinea, oFillColor, oFill, oFontC, oText,oCuadroText, oCuadro return nil //------------------------------------------------------------------------------ METHOD AddImagen( nTop, nLeft, nButtom, nRight, cImagen ) LOCAL oShapes,oCuadro oShapes := OleGetProperty( ::oselection,"Shapes" ) oCuadro := OleInvoke( oShapes, "AddPicture", cImagen,.F.,.T.,INT(nLeft),INT(nTop),INT(nRight-nLeft),INT(nButtom-nTop) ) release oCuadro return nil //------------------------------------------------------------------------------ METHOD Say( nLin,nCol,cTexto,oFuente,nSizeHorz,nClrText,nBkMode,nPad, naltura ) LOCAL oShapes,oFill,oLine,oCuadroText,oText,oFontC,oParagraph local nTamFuente := if(oFuente:nHeight > 0, int(oFuente:nHeight + 2), int((oFuente:nHeight*-1)+2) ) DEFAULT nClrText := nRGB(0,0,0), nBkMode := 2, nPad := 0 DEFAULT nSizeHorz := ::GetTextWidth(ctexto,oFuente) DEFAULT naltura := if(oFuente:nHeight > 0, oFuente:nHeight + 10, (oFuente:nHeight*-1)+10) nSizeHorz := nSizeHorz + (nSizeHorz*25/100) do case case npad = 1 npad := 2 case npad = 2 ncol = ncol - (nSizeHorz/2) npad := 1 endcase oShapes := OleGetProperty( ::oselection,"Shapes" ) //::OleactiveDoc oCuadro := OleInvoke( oShapes, "AddTextbox", 1,INT(nCol),INT(nLin),nSizeHorz,naltura ) oFill := OleGetProperty( oCuadro, "Fill" ) oLine := OleGetProperty( oCuadro, "Line" ) oCuadroText := OleGetProperty( oCuadro, "TextFrame" ) oText := OleGetProperty( oCuadroText, "TextRange" ) oFontC := OleGetProperty( oText, "Font") oParagraph := OleGetProperty( oText, "ParagraphFormat") OleSetProperty( oParagraph, "Alignment", nPad ) OleSetProperty( oFill, "Transparency",0) OleSetProperty( oFill, "Visible",0) OleSetProperty( oLine, "Transparency",0) OleSetProperty( oLine, "Visible",0) OleSetProperty( oFontC, "Name", oFuente:cFaceName ) OleSetProperty( oFontC, "Size", nTamfuente ) //INT(oFuente:nHeight*-1) ) OleSetProperty( oFontC, "Bold", oFuente:lBold ) OleSetProperty( oFontC, "Italic", oFuente:lItalic ) OleSetProperty( oText, "Text", cTexto ) OleSetProperty( oCuadroText, "MarginLeft",0) OleSetProperty( oCuadroText, "MarginRight",0) ::oLastSay := otext release oFontC,oText,oCuadro,oLine,oFill,oShapes,oParagraph,ocuadrotext return nil //------------------------------------------------------------------------------ METHOD CmSay( nLin,nCol,cTexto,oFuente,nSizeHorz ) LOCAL oShapes,oCuadro,oFill,oLine,oCuadroText,oText,oFontC nCol := Max( 0, ( nCol * 10 * ::nHorzRes() / ::nHorzSize() ) - ::nYoffset ) nLin := Max( 0, ( nLin * 10 * ::nVertRes() / ::nVertSize() ) - ::nXoffset ) oShapes := OleGetProperty( ::oselection,"Shapes" ) oCuadro := OleInvoke( oShapes, "AddTextbox", 1,INT(nCol),INT(nLin),201,21 ) oFill := OleGetProperty( oCuadro, "Fill" ) oLine := OleGetProperty( oCuadro, "Line" ) oCuadroText := OleGetProperty( oCuadro, "TextFrame" ) oText := OleGetProperty( oCuadroText, "TextRange" ) oFontC := OleGetProperty( oText, "Font") OleSetProperty( oFill, "Transparency",0) OleSetProperty( oFill, "Visible",0) OleSetProperty( oLine, "Transparency",0) OleSetProperty( oLine, "Visible",0) OleSetProperty( oFontC, "Name", oFuente:cFaceName ) OleSetProperty( oFontC, "Size", INT(oFuente:nHeight) ) OleSetProperty( oFontC, "Bold", oFuente:lBold ) OleSetProperty( oText, "Text", cTexto ) release oFontC,oText,oCuadroText,oLine,oFill,oCuadro,oShapes return nil //------------------------------------------------------------------------------ METHOD Line( nTop, nLeft, nButtom, nRight, oPen ) LOCAL oShapes,oShapLinea, oLinea if oPen = NIL DEFINE PEN oPen endif oShapes := OleGetProperty( ::oselection ,"Shapes" ) oShapLinea := OleInvoke( oShapes, "AddLine", nLeft,nTop,nRight,nButtom ) oLinea := OleGetProperty( oShapLinea, "Line" ) OleSetProperty( oLinea, "Weight", oPen:nWidth-2 ) oPen:End() release oLinea,oShapLinea,oShapes return nil //------------------------------------------------------------------------------ METHOD FillRect( aRect, oBrush ) LOCAL oShapes,oShapBox, oFill, oFillColor LOCAL nTop := INT(arect[1]) LOCAL nLeft := INT(arect[2]) LOCAL nWidth := INT(aRect[4]-aRect[2]) LOCAL nHeight := INT(aRect[3]-aRect[1]) oShapes := OleGetProperty( ::oselection,"Shapes" ) oShapBox := OleInvoke( oShapes, "AddShape",1,nLeft,nTop,nWidth,nHeight ) oFill := OleGetproperty( oShapBox,"Fill") oFillColor := OleGetProperty( oFill,"ForeColor") OleSetProperty( oFillColor,"RGB",oBrush:nRGBColor ) oBrush:End() release oFillColor,oFill,oShapBox,oShapes return nil //------------------------------------------------------------------------------ METHOD GetTextHeight( cFont, oFont ) return oFont:nHeight //------------------------------------------------------------------------------ METHOD Write( cTexto, cFuente, nSize, lBold, lShadow, nColor ) Local oFont := OleGetProperty( ::OleTexto, "Font") OleSetProperty( oFont, "Name", cFuente ) OleSetProperty( oFont, "Size", nSize ) OleSetProperty( oFont, "Bold", lBold ) OleSetProperty( oFont, "ColorIndex",nColor ) OleSetProperty( oFont, "Emboss",lShadow ) OleInvoke( ::OleTexto,"TypeText", cTexto ) OleInvoke( oFont,"Reset" ) release oFont return nil //------------------------------------------------------------------------------ METHOD Replace( cOld, cNew ) LOCAL oTexto, oFind, oReplace oTexto := OleInvoke( ::oselection, "Range" ) oFind := OleGetProperty( oTexto, "Find" ) OleSetProprerty( oFind, "Text", cOld ) OleSetProprerty( oFind, "Forward", .T. ) OleSetProprerty( oFind, "Wrap", INT(1) ) OleSetProprerty( oFind, "Format", .f. ) OleSetProprerty( oFind, "MatchCase", .f. ) OleSetProprerty( oFind, "MatchWholeWord", .f. ) OleSetProprerty( oFind, "MatchWildcards", .f. ) OleSetProprerty( oFind, "MatchSoundsLike", .f. ) OleSetProprerty( oFind, "MatchAllWordForms", .f. ) OleInvoke( oFind, "Execute") DO WHILE OleGetProprerty( oFind, "Found" ) OleSetProprerty( oTexto, "Text", cNew ) OleInvoke( oFind, "Execute") Enddo release oReplace,oFind,oTexto return nil //------------------------------------------------------------------------------ METHOD JustificaDoc( nJustify ) LOCAL oParagraph := OleGetProperty( ::OleTexto, "ParagraphFormat") OleSetProperty( oParagraph, "Alignment", nJustify ) release oParagraph return nil //------------------------------------------------------------------------------ METHOD Save() OleInvoke( ::OleActiveDoc,"SaveAs", ::cNombreDoc ) return nil //------------------------------------------------------------------------------ METHOD StartPage() if ::lstartpag = .t. ::lstartpag := .f. else OleInvoke(::OleTexto,"EndKey",6,0) OleInvoke(::OleTexto,"InsertBreak") OleInvoke(::Oletexto,"GotoNext",1) ::nPage++ ::nLinea:=0 ::nCol :=0 endif return nil //------------------------------------------------------------------------------ METHOD EndPage() return nil //------------------------------------------------------------------------------ METHOD PrintDoc() OleInvoke( ::OleWord, "PrintOut" ) return nil //------------------------------------------------------------------------------ METHOD Preview() OleSetProperty( ::OleWord, "PrintPreview",.f.) OleInvoke( ::OleActiveDoc, "PrintPreview") ::Visualizar() return nil //------------------------------------------------------------------------------ METHOD VistaCompleta() LOCAL oWindow, oView oWindow := OleGetProperty( ::OleActiveDoc , "ActiveWindow" ) oView := OleGetProperty( oWindow , "View" ) OleSetProperty( oView,"FullScreen", .T. ) ::Visualizar() release oView return nil //------------------------------------------------------------------------------ METHOD nHorzRes() nRes := 2 return nres //------------------------------------------------------------------------------ METHOD nHorzSize() nRes := 1 return nres //------------------------------------------------------------------------------ METHOD nVertRes() nRes := 2 return nres //------------------------------------------------------------------------------ METHOD nVertSize() nRes := 1 return nres //------------------------------------------------------------------------------ METHOD nLogPixelY() LOCAL nPixels := 55.38 return nPixels //------------------------------------------------------------------------------ METHOD nLogPixelX() LOCAL nPixels := 55.38 return nPixels //------------------------------------------------------------------------------ METHOD End() OleInvoke(::OleWord,"Quit",0) ::OleTexto := NIL ::OleActiveDoc := NIL ::OleDocs := NIL ::Oleword := NIL OleUninitialize() return nil //------------------------------------------------------------------------------ METHOD Protect(cpassword) OleInvoke( ::OleActiveDoc,"Protect", 2, .F., cpassword ) return //------------------------------------------------------------------------------ METHOD SetLandScape() local oPageSetup := OleGetProperty( ::OleactiveDoc,'PageSetup') OleSetProperty( oPageSetup,'Orientation','1') release oPageSetup return //------------------------------------------------------------------------------ METHOD SetPortrait() local oPageSetup := OleGetProperty( ::OleactiveDoc,'PageSetup') OleSetProperty( oPageSetup,'Orientation','0') release oPageSetup return //------------------------------------------------------------------------------ METHOD Box( nTop, nLeft, nButtom, nRight ) local oShapes,oShapBox oShapes := OleGetProperty( ::oselection,"Shapes" ) nRight := nRight - nLeft nButtom := nButtom - nTop oShapBox := OleInvoke( oShapes, "AddShape",1,nLeft,nTop,nRight,nButtom ) release oShapBox,oShapes return nil //------------------------------------------------------------------------------ METHOD GetTextWidth(cText, oFont) local nancho if oFont:nHeight > 0 nancho := (oFont:nHeight/1.6)*len(ctext) else nancho :=((oFont:nHeight*-1)/1.6)*len(ctext) endif return nancho //------------------------------------------------------------------------------ METHOD addtabulador(npos, ocuadrotext) local otabstop, oParagraphFormat DEFAULT ocuadrotext := ::OleTexto oParagraphFormat := OleGetProperty(ocuadrotext, 'ParagraphFormat') otabstop := OleGetProperty(oParagraphFormat, 'TabStops') OleInvoke(otabstop,'Add',npos) release oParagraphFormat, otabstop return nil //------------------------------------------------------------------------------ METHOD TabClearAll(ocuadrotext) local oparagraphformat, otabstop DEFAULT ocuadrotext := ::Oletexto oparagraphformat := OleGetProperty(ocuadrotext,'ParagraphFormat') otabstop := OleGetProperty(oParagraphformat, 'TabStops') OleInvoke(otabstop,'ClearAll') release oparagraphformat, otabstop return nil //------------------------------------------------------------------------------ METHOD TabPredeterminado(npos) OleSetProperty(::OleactiveDoc,'DefaultTabStop', npos ) return nil //------------------------------------------------------------------------------ METHOD SetHeader() local oWindow := OleGetProperty( ::OleActiveDoc , "ActiveWindow" ) local oView := OleGetProperty( oWindow , "View") OleSetProperty(oView,"SeekView",9) ::oselection := OleGetProperty( ::OleTexto, "HeaderFooter") release oWindow, oView return //------------------------------------------------------------------------------ METHOD SetMainDoc() local oWindow := OleGetProperty( ::OleActiveDoc , "ActiveWindow" ) local oView := OleGetProperty( oWindow , "View") OleSetProperty(oView,"SeekView",0) ::oselection := ::OleActiveDoc release oWindow, oView return //------------------------------------------------------------------------------ METHOD Gotop() OleInvoke(::OleTexto, 'HomeKey', 6) return //------------------------------------------------------------------------------ METHOD GoBottom() OleInvoke(::OleTexto, 'EndKey', 6) return //------------------------------------------------------------------------------ METHOD CheckSpelling() Oleinvoke(::OleActiveDoc, 'CheckSpelling') return ____________________________________________________________ Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  15. Olá... Estou postando agora mesmo... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  16. Olá...Karinh... Este exemplo é para uma webcam...mas quiçá te dê alguma idéia... Não sê se é o mesmo que te posteó Vagner... Mas crio que também é para 32 bits. ____________________________________________________________ #include "Fivewin.ch" Static cWebCamDriver := "Microsoft WDM Image Capture" Static _oWebcam_ := nil ************************************************************************ * ************************************************************************ Function Test() Local oWnd, oMenu, oImg Local oWC oWC:=tWebCamPhoto():New() MENU oMenu MENUITEM "Cámara" MENU MENUITEM "Conectar" ACTION oWC:Connect() MENUITEM "Desconectar" ACTION oWC:Disconnect() SEPARATOR MENUITEM "Fuente" ACTION oWC:Source() MENUITEM "Formato" ACTION oWC:Format() ENDMENU MENUITEM "Capturar" MENU MENUITEM "Clipboard" ACTION oWC:Clipboard(oImg) SEPARATOR MENUITEM "BMP" ACTION oWC:Save(oImg,'webcam32.bmp') MENUITEM "JPG" ACTION oWC:Save(oImg,'webcam32.jpg',80) ENDMENU MENUITEM "Salir" ACTION (oWC:End(), oWnd:End()) ENDMENU DEFINE WINDOW oWnd FROM 0,0 TO 30,80 MENU oMenu TITLE "Captura de fotos con Webcams" @ 60,400 IMAGE oImg OF oWnd SIZE 160,120 PIXEL ADJUST oImg:nProgress:=0 ACTIVATE WINDOW oWnd ON INIT; (oWnd:Center(), oWC:CreateWnd(oWnd,60,10,320,240) ) return nil /********************************************************** * * * Clase tWebCamPhoto (Sólo para FWH) * Objetivo: Capturar fotos con una Webcam * * César E. Lozada, cesarlozada@hotmail.com * Los Teques, Venezuela - 22/06/2003 * * ***********************************************************/ #define WM_CAP_START WM_USER #define WM_CAP_DRIVER_CONNECT WM_CAP_START + 10 #define WM_CAP_DRIVER_DISCONNECT WM_CAP_START + 11 #define WM_CAP_SET_PREVIEW WM_CAP_START + 50 #define WM_CAP_SET_PREVIEWRATE WM_CAP_START + 52 #define WM_CAP_SET_SCALE WM_CAP_START + 53 #define WM_CAP_EDIT_COPY WM_CAP_START + 30 #define WM_CAP_FILE_SAVEDIB WM_CAP_START + 25 #define WM_CAP_DLG_VIDEOFORMAT WM_CAP_START + 41 #define WM_CAP_DLG_VIDEOSOURCE WM_CAP_START + 42 #define WM_CAP_GET_STATUS WM_CAP_START + 54 ********************************************************* * EXIT Procedure WebcamDisconnect() * Asegura la desconexión de la cámara. ********************************************************* EXIT Procedure WebcamDisconnect() if _oWebcam_<>nil _oWebcam_:Disconnect() _owebcam_:=nil endif return **************************************************************************** CREATE CLASS tWebCamPhoto DATA nFrameRate INIT 66 //Velocidad de actualización de la WebCam DATA nJpgQuality INIT 75 //Calidad de los JPG DATA hWnd //Handle de la centana de la imagen DATA aDrivers //Drivers de captura disponibles DATA nDriver //número del driver instalado + 1 DATA lConnected INIT .F. //¿Está conectada> METHOD New(cDriver,lSelect) CONSTRUCTOR // Construye el objeto. cDriver es el nombre // del driver a usar, recomendado guardar en ini. // Si lSelect=.T. muestra la lista para escogerlo METHOD CreateWnd(oWnd,nLeft,nTop,nWidth,nHeight,nStyle,cTitle) // Crea la ventana para la cámara en oWnd. METHOD Connect // Conecta la cámara METHOD Disconnect // Desconecta la cámara METHOD Clipboard(oImg) //Captura la imagen en clipboard. Opcionalmente //actualiza a oImg con la imagen capturada METHOD Save(oImg,cFile,nQuality) //Captura la imagen y guarda en archivo (BMP/JPG). //Opcionalmente actualiza a oImg con la imagen capturada METHOD Source() //Configura la fuente de la webcam METHOD Format() //Configura el formato de la imagen METHOD GetStatus() //Status de la imagen METHOD Resize() //Redimensiona la ventana de la imagen METHOD End() INLINE ::Disconnect() // Finaliza el objeto ENDCLASS *=========================================================================== METHOD New(cDriver,lSelect) DEFAULT cDriver:=cWebCamDriver DEFAULT lSelect:=.F. ::aDrivers:=WebCamList() ::nDriver:=aScan(::aDrivers,{|u| Upper(StrTran(cDriver,' '))==Upper(StrTran(u,' '))}) IF ::nDriver=0 .or. lSelect ::nDriver:=WebCamSelect(::nDriver,::aDrivers) ENDIF _oWebCam_:=Self return Self *=========================================================================== METHOD CreateWnd(oWnd,nTop,nLeft,nWidth,nHeight,nStyle,cTitle) DEFAULT nTop:=0, nLeft:=0, nWidth:=160, nHeight:=120 DEFAULT nStyle:=nOr(WS_VISIBLE,WS_CHILD,WS_BORDER) IF ::nDriver>0 ::hWnd:=wCamCreaWnd(::aDrivers[::nDriver], nStyle,; nLeft, nTop, nWidth, nHeight, oWnd:hWnd, 0) ENDIF return ::hWnd *=========================================================================== METHOD Connect() if ::hWnd<>nil if SendMessage(::hWnd, WM_CAP_DRIVER_CONNECT, ::nDriver-1, 0)=1 cWebCamDriver:=::aDrivers[::nDriver] SendMessage(::hWnd, WM_CAP_SET_SCALE, 1, 0) SendMessage(::hWnd, WM_CAP_SET_PREVIEWRATE, ::nFrameRate, 0) SendMessage(::hWnd, WM_CAP_SET_PREVIEW, 1, 0) ::lConnected:=.T. ::Resize() else ::lConnected:=.F. ::hWnd:=nil endif endif return ::lConnected *=========================================================================== METHOD Disconnect IF ::hWnd<>Nil .and. ::lConnected if SendMessage(::hWnd, WM_CAP_DRIVER_DISCONNECT, 0, 0)=1 ::lConnected:=.F. _oWebCam_:=nil endif ENDIF return nil *=========================================================================== METHOD Clipboard(oImg) Local lSucc:=.F. if ::hWnd<>nil lSucc:=(SendMessage(::hWnd, WM_CAP_EDIT_COPY, 0, 0)=1) IF lSucc .and. oImg<>nil oImg:LoadFromClipboard() oImg:Refresh() ENDIF endif return lSucc *=========================================================================== METHOD Save(oImg,cFile,nQuality) Local lSucc:=.F. Local cFileExt:=Upper(cFileExt(cFile)) Local cFileName:=cFileNoExt(cFile) Local cExec:='BMPtoJPG.EXE' if ::hWnd<>nil CursorWait() IF (cFileExt=="JPG" .or. cFileExt=="JPEG") IF ::Clipboard() DEFAULT nQuality:=::nJpgQuality ::nJpgQuality:=Max(Min(Int(nQuality),100),10) WaitRun(cExec+' -q'+LTrim(Str(::nJpgQuality,3,0))+' -c'+cFileName+' -o -s',0) ENDIF ELSEIF cFileExt=='BMP' SendMessage(::hWnd, WM_CAP_FILE_SAVEDIB, 0, cFile) ENDIF CursorArrow() SysRefresh() IF !(lSucc:=File(cFile)) MsgAlert(' No pudo crearse '+cFile) ELSEIF oImg<>nil oImg:LoadImage(nil,cFile) oImg:Refresh() ENDIF endif return lSucc *=========================================================================== METHOD Source() if ::hWnd<>nil .and. ::lConnected SendMessage(::hWnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0) endif return nil *=========================================================================== METHOD Format() if ::hWnd<>nil .and. ::lConnected SendMessage(::hWnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0) ::Resize() endif return nil *=========================================================================== #include "Struct.ch" METHOD GetStatus() Local oPoint, oStatus, cBuffer STRUCT oPoint MEMBER X AS LONG MEMBER Y AS LONG ENDSTRUCT STRUCT oStatus MEMBER nWidth AS LONG // Width of the image MEMBER nHeight AS LONG // Height of the image MEMBER lLive AS LONG // Now Previewing video? MEMBER lOverlay AS LONG // Now Overlaying video? MEMBER lScale AS LONG // Scale image to client? MEMBER oXYScroll AS STRING LEN 8 //AS POINTAPI // Scroll position MEMBER lDefPalette AS LONG // Using default driver palette? MEMBER lAudHardware AS LONG // Audio hardware present? MEMBER lCapFile AS LONG // Does capture file exist? MEMBER nCurVidFrm AS LONG // # of video frames cap'td MEMBER nCurVidDropped AS LONG // # of video frames dropped MEMBER nCurWavSamples AS LONG // # of wave samples cap'td MEMBER nCurTimeEl AS LONG // Elapsed capture duration MEMBER hPalCur AS LONG // Current palette in use MEMBER lCapturing AS LONG // Capture in progress? MEMBER nReturn AS LONG // Error value after any operation MEMBER nVidAlloc AS LONG // Actual number of video buffers MEMBER wAudAlloc AS LONG // Actual number of audio buffers ENDSTRUCT oPoint:x:=0; oPoint:y:=0 oStatus:oXYScroll:=oPoint:cBuffer cBuffer:= oStatus:cBuffer SendMessage(::hWnd, WM_CAP_GET_STATUS, Len(cBuffer), @cBuffer) oStatus:cBuffer:= cBuffer return oStatus *=========================================================================== #define HWND_BOTTOM 1 #define SWP_NOMOVE 2 #define SWP_NOSIZE 1 #define SWP_NOZORDER 4 METHOD Resize() Local oStatus if ::hWnd<>nil .and. ::lConnected SysRefresh() oStatus := ::GetStatus() SetWindowPos(::hWnd,HWND_BOTTOM,0,0,oStatus:nWidth,oStatus:nHeight,; nOr(SWP_NOMOVE,SWP_NOZORDER ) ) SysRefresh() endif return nil **************************************************************************** Function WebcamList() Local aDrivers:={}, nDriver:=0 Local cName, cVersion, nLen:=255 DO WHILE .T. cName:=space(nLen); cVersion:=space(nLen) IF !wCamGetDrvDesc(nDriver, @cName, nLen, @cVersion, nLen) EXIT ENDIF if chr(0)$cName cName:=Left(cName,At(chr(0),cName)-1) endif if chr(0)$cVersion cVersion:=Left(cVersion,At(chr(0),cVersion)-1) endif aAdd(aDrivers,cName) nDriver++ ENDDO return aDrivers **************************************************************************** Function WebcamSelect(nDriver,aDrivers) Local oDlg, oCbx Local cDriver Local lSelect:=.F. DEFAULT nDriver:=0, aDrivers:=WebcamList() IF Empty(aDrivers) MsgAlert('No Webcams') return 0 ELSE cDriver:=aDrivers[Max(1,nDriver)] DEFINE DIALOG oDlg FROM 0,0 to 6,40 TITLE "Select webcam" @ 0,0 COMBOBOX oCbx VAR cDriver OF oDlg ITEMS aDrivers; SIZE 160,50 PIXEL @ 1.5, 4 BUTTON "Select" OF oDlg SIZE 40,12; ACTION (nDriver:=oCbx:nAt ,oDlg:End()) @ 1.5,16 BUTTON "Cancel" OF oDlg SIZE 40,12; ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED ENDIF return nDriver **************************************************************************** Function WebCamVersion(nDriver) Local cName, cVersion, nLen:=255 DEFAULT nDriver:=0 IF nDriver>0 cName:=space(nLen); cVersion:=space(nLen) IF wCamGetDrvDesc(nDriver-1, @cName, nLen, @cVersion, nLen) if chr(0)$cVersion cVersion:=Left(cVersion,At(chr(0),cVersion)-1) endif ELSE cVersion:=nil ENDIF ENDIF return cVersion **************************************************************************** DLL32 STATIC FUNCTION wCamGetDrvDesc; (nDriver AS _INT,; cName AS STRING,; nName AS LONG,; cVersion AS STRING,; nVersion AS LONG) AS BOOL PASCAL; FROM "capGetDriverDescriptionA" LIB "avicap32.dll" ************************************************************************ DLL32 STATIC FUNCTION wCamCreaWnd; (cTitle AS STRING,; nStyle AS LONG,; x AS LONG, y AS LONG, nWidth AS LONG, nHeight AS LONG,; hWndParent AS LONG, nID AS LONG) AS LONG PASCAL; FROM "capCreateCaptureWindowA" LIB "avicap32.dll" ************************************************************************ ____________________________________________________________ Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  17. Olá...TiaoFW... Crio que O erro está ocorrendo na variável... ODBF:CONFIRMADO == "S" Quiçá o valor da variável está mudado...ou não está podendo entrar no CODEBLOCK...e a assume como variável lógica Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  18. Olá...lenasi.. Pode ter algo mal escrito? No exemplo que escreves cFrota não tem nada que ver com oFrota E crio que seria... oFrota:=space(7);oFrota:refresh(),oFrota:setfocus() Posta o exemplo completo... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  19. Olá...Yasmin... Não se se há alguma função...mas eu tentaria guardar na variável do COMBOBOX a última linha do MEMO... *zz:=mlcount(MEMO,(char por linha)) zz:=mlcount(paciente->memo,100) for nn:= 1 to zz varcombo:=memoline(paciente->memo,100,nn) next Uma idéia mais para tentar... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  20. Olá...Rubensma... Eu compreendi mal então... O erro escreve para saber perto aonde o problema vem... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  21. Olá..Rubensma... Um exemplo que quiçá te sirva...É de algum de Uds. ____________________________________________________________ //--------------------------------------------------------------------------// // Teste de TxtPreview // Ednaldo 10/04/2002 //--------------------------------------------------------------------------// #include "Fivewin.ch" static oWnd //--------------------------------------------------------------------------// function Test() local oBrush // SetResDebug( .t. ) SetMTxtPreview( .t., 5, 2, .f., .t. ) SET _3DLOOK ON DEFINE BRUSH oBrush COLOR nRGB( 0, 128, 128 ) DEFINE WINDOW oWnd FROM 0, 0 TO 24, 80 MDI ; TITLE "Teste de TTxtPreview" ; MENU BuildMenu() MENUINFO 2 ; BRUSH oBrush DEFINE BUTTONBAR oBar _3D SIZE 26, 30 OF oWnd DEFINE BUTTON FILE "mdi.bmp" OF oBar ; ACTION TestRep( .f. ) ; NOBORDER TOOLTIP "Teste Mdi" DEFINE BUTTON FILE "modal.bmp" OF oBar ; ACTION TestRep( .t. ) ; NOBORDER TOOLTIP "Teste Modal" DEFINE BUTTON FILE "Exit.bmp" OF oBar GROUP ; ACTION oWnd:End() ; NOBORDER TOOLTIP "Sair" SET MESSAGE OF oWnd TO "Teste de TTxtPreview" CENTERED NOINSET ACTIVATE WINDOW oWnd MAXIMIZED // checkres() return Nil //---------------------------------------------------------------------------// function BuildMenu() local oMenu MENU oMenu MENUITEM "&Testes" MENU MENUITEM "&Teste MDI" ACTION TestRep( .f. ) MENUITEM "Teste &Modal" ACTION TestRep( .t. ) SEPARATOR MENUITEM "&Sair" ACTION oWnd:End() ENDMENU MENUITEM "&Janelas" MENU MENUITEM "&Lado a Lado" ACTION oWnd:Tile() MENUITEM "Em &Cascata" ACTION oWnd:Cascade() ENDMENU ENDMENU return oMenu //-------------------------------------------------------------------------- static function TestRep( lModal ) local oPrn, cPorta, cFile, cTitulo local nLin, nLinMax, nPag, cTmp, nItens cTitulo:= "**** TESTE DE TTXTPREVIEW ****" USE TEST GO TOP cPorta := "LPT1" cFile := "TEST.PRN" nLin := 1 nPag := 0 nLinMax := 65 nItens := nTotal := 0 oPrn:= TDosPrn():New( cFile ) begin sequence oPrn:StartPage() do while !Eof() //--- Cabecalho // if nLin = 1 nPag++ oPrn:Command( oPrn:cNormal ) oPrn:Say( nLin, 00, PadC( cTitulo, 79 ) ) oPrn:Command( oPrn:cCompress ) ++nLin oPrn:Say( ++nLin, 01, "LISTAGEM DE FUNCIONARIOS" ) oPrn:Say( nLin, 124, "Pag.: " + StrZero( nPag,3 ) ) // Pagina oPrn:Say( ++nLin, 001, Repl("-", 132) ) oPrn:Say( ++nLin, 001, "NOME ENDERECO CIDADE ESTADO CEP SALARIO" ) oPrn:Say( ++nLin, 001, Repl("-", 132) ) endif //--- Corpo do relatorio // oPrn:Say( ++nLin, 001, Alltrim( first ) + " " + Alltrim( last ) ) oPrn:Say( nLin, 043, street ) oPrn:Say( nLin, 075, left( city, 20) ) oPrn:Say( nLin, 098, state ) oPrn:Say( nLin, 107, zip ) oPrn:Say( nLin, 119, Transform( salary, "@R 999,999,999.99" ) ) skip nItens++ nTotal+= salary if nLin+1 > nLinMax // se passou a linha max oPrn:Say( ++nLin, 001, Repl("-", 132) ) nLin:= 1 // volta contador para 1 endif // nova pagina enddo oPrn:Say( ++nLin, 001, Repl("-", 132) ) oPrn:Say( ++nLin, 001, "Total de Funcionarios : " + Alltrim( Tran( nItens,"999,999" ) ) ) oPrn:Say( nLin, 119, Transform( nTotal, "@R 999,999,999.99" ) ) oPrn:EndPage() // salta pagina oPrn:End() end sequence close TEST TxtPreview( cFile, cTitulo, lModal,,, oPrn ) return nil //-------------------------------------------------------------------------- /* ------------------------------------------------------------------------------------------------------------------------------------ NOME ENDERECO CIDADE ESTADO CEP SALARIO ------------------------------------------------------------------------------------------------------------------------------------ 1234567890123456789012345678901234567890 123456789012345678901234567890 12345678901234567890 12345 123456789 999,999,999.99 1234567890123456789012345678901234567890 123456789012345678901234567890 12345678901234567890 12345 123456789 999,999,999.99 1234567890123456789012345678901234567890 123456789012345678901234567890 12345678901234567890 12345 123456789 999,999,999.99 ------------------------------------------------------------------------------------------------------------------------------------ */ ____________________________________________________________ Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  22. Oi a todos... Concordo também com todos Uds...e lamentavelmente cheguei tarde ao Foro...pelo que não pude organizar meus tempos para estar nesse encontro...mais não há dois sem três... No próximo...ali estarei... Saudações...e que seja um sucesso... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  23. Olá...Elitenet... Aí vamos... Por um mundo livre de Microsoft... Obrigado...ficamos em contato... Diga-lhe não ao I.Explorer...é um caminho de ida...prove Opera e experimentará a diferença... www.opera.com Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  24. Olá...Hinfo... Crio que as impresoras novas não têm por defeito algum dos parâmetros que têm as velhas... Se a impresora diz ter caractéres ESC/P ou ESC/P2 tem que funcionar... No manual o tem que dizer... C-134 Individual Command Explanations SI Select condensed printing ESC/P 2 ESC/P Format ASCII SI Hex 0F Decimal 15 Function Enters condensed mode, in which character width is reduced as follows: Selected pitch Condensed pitch 10 cpi 17.14 cpi 12 cpi 20 cpi Proportional 1/2 width Default Noncondensed printing Notes ____________________________________________________________ Ler cá ____________________________________________________________ · This command is ignored under the following two conditions: - The printer is in multipoint mode. - 15-cpi printing has been selected with the ESC g command. · This command cancels the HMI (horizontal motion index) set with the ESC c command. · This command reduces character width by about 50% when proportional spacing is selected with the ESC p command. · Cancel condensed printing with the DC2 command. Printers not featuring this command None Model-dependent variations None Related topics DC2, Selecting the pitch ____________________________________________________________ C-118 Individual Command Explanations ESC ! Master select ESC/P 2 ESC/P Format ASCII ESC ! n Hex 1B 21 n Decimal 27 33 n Parameter range 0 £ n £ 255 Function Selects any combination of several font attributes and enhancements by setting or clearing the appropriate bit in the n parameter, as shown below: Bit On/Off Hex Dec Function Equivalent 0 Off 00 0 Selects 10 cpi ESC P On 01 1 Selects 12 cpi ESC M 1 Off 00 0 Cancels proportional ESC p 0 On 02 2 Selects proportional ESC p 1 2 Off 00 0 Cancels condensed DC2 On 04 4 Selects condensed SI 3 Off 00 0 Cancels bold ESC F On 08 8 Selects bold ESC E 4 Off 00 0 Cancels double-strike ESC H On 10 16 Selects double-strike ESC G 5 Off 00 0 Cancels double-width ESC W 0 On 20 32 Selects double-width ESC W 1 6 Off 00 0 Cancels italics ESC 5 On 40 64 Selects italics ESC 4 7 Off 00 0 Cancels underline ESC - 0 On 80 128 Selects underline ESC - 1 Add the numbers of the features to be selected and send the total as the parameter n. Notes · This command cancels multipoint mode. · This command cancels the HMI selected with the ESC c command. · This command cancels any attributes or enhancements that are not selected. · All attributes or enhancements may not be available on some models. For details, see the explanation for the equivalent command listed in the table above. ____________________________________________________________ C-106 Individual Command Explanations ESC p Turn proportional mode on/off ESC/P 2 ESC/P Format ASCII ESC p n Hex 1B 70 n Decimal 27 112 n Parameter range n = 0, 1, 48, 49 Function Selects either proportional or fixed character spacing according to the following values: n = 0 or 48 Returns to current fixed character pitch 1 or 49 Selects proportional spacing Default Fixed character spacing Notes · This command cancels the HMI set with the ESC c command. · This command cancels multipoint mode. · Changes made to the fixed-pitch setting with the ESC P, ESC M, or ESC g commands during proportional mode take effect when the printer exits proportional mode. · The printer automatically switches to LQ printing when proportional spacing is selected. Printers not featuring this command None Model-dependent variations None Related topics ESC M, ESC P, ESC g, ESC !, ESC X, ESC c, Selecting the pitch ____________________________________________________________ Não sê se serve...mas me diverti averigüando... Crio que pode ter algum parâmetro como o ESC p que se está desativado não utiliza as escalas proporcionais... Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
  25. Olá...Hinfo... Qual impressora usas? Eu não tive problemas com nenhuma até agora... É USB? Sorte... Buenos Aires...Argentina... tatoo_el_angel_rubio@yahoo.com.ar Versão Portuguese by Altavista...saiba para desculpar os erros...
×
×
  • Create New...