Naruto uZumaki Posted August 22, 2008 Report Share Posted August 22, 2008 Sintaxe oPrinter:say(ln*ResLinha,1.0*ResColuna,(transform(H->Qtde,"@E 99,999.99")),oFontText)id=code>id=code> Sai tudo desalinhado ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 Sintaxe oPrinter:say(ln*ResLinha,1.0*ResColuna,(transform(H->Qtde,"@E 99,999.99")),oFontText)id=code>id=code> Sai tudo desalinhado ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
cendon Posted August 22, 2008 Report Share Posted August 22, 2008 Qual fonte de letra vc tá usando? Abençoados sejam os pessimistas, eles fizeram backups!! Angelo Cendon cendon.angelo@gmail.com Belo Horizonte-MG Fivewin 2.4 - Harbour 2.4 - @ l,c Workshop Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 22, 2008 Report Share Posted August 22, 2008 //-> Para Centraliza‡Æo dos Textos - Controle dos Centrimetros #Define PAD_LEFT 0 #Define PAD_RIGHT 1 #Define PAD_CENTER 2 oPrn:cmSay( 10.50, 19.80, ""+XDATALISTA, ; oFont,, ; CLR_BLACK,, PAD_RIGHT ) id=code>id=code>João Santos - São Paulo. kmt_karinha@pop.com.br kapiaba@brfree.com.br Fone: (11) 3106-2832 FWH 2.7 - xHARBOUR 0.99.61 - WorkShop.Exe Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 id=code>id=code>____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
cendon Posted August 22, 2008 Report Share Posted August 22, 2008 Use "Lucida Console", as distancias entre caracteres são iguais Abençoados sejam os pessimistas, eles fizeram backups!! Angelo Cendon cendon.angelo@gmail.com Belo Horizonte-MG Fivewin 2.4 - Harbour 2.4 - @ l,c Workshop Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação:Use "Lucida Console", as distancias entre caracteres são iguais Abençoados sejam os pessimistas, eles fizeram backups!! Angelo Cendon cendon.angelo@gmail.com Belo Horizonte-MG Fivewin 2.4 - Harbour 2.4 - @ l,c Workshop id=quote>id=quote>Sim com essa fonte resolve , até meu listbox estava com este relacionado problema de alinhamento numérico , mas com essa fonte resolve!Mas convenhamos , essa tal de lucida console em dialog é de matar ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
cendon Posted August 22, 2008 Report Share Posted August 22, 2008 Tambem acho. Existem outras fontes que o espacejamento de caracteres é sempre o mesmo e são um pouco mais bonitas. porem não sao nativas do windows. tem que ser instaladas junto com o seu sistema. Abençoados sejam os pessimistas, eles fizeram backups!! Angelo Cendon cendon.angelo@gmail.com Belo Horizonte-MG Fivewin 2.4 - Harbour 2.4 - @ l,c Workshop Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação:Tambem acho. Existem outras fontes que o espacejamento de caracteres é sempre o mesmo e são um pouco mais bonitas. porem não sao nativas do windows. tem que ser instaladas junto com o seu sistema. Abençoados sejam os pessimistas, eles fizeram backups!! Angelo Cendon cendon.angelo@gmail.com Belo Horizonte-MG Fivewin 2.4 - Harbour 2.4 - @ l,c Workshop id=quote>id=quote>Fazer o que , mas sem drama o importante é o PRG funcionar ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
sig_gilberto Posted August 22, 2008 Report Share Posted August 22, 2008 Courier New Esta fica muito bem esteticamente em relatorios... ________________________ Gilberto Herminio Programador Pleno III Mogi das Cruzes-SP FWh8.05 + xHB 1.1.0-CVS + BBC 5.5.1 + xDev v0.65 "Não Desenvolvo Software, crio arte Binaria...." Editado por - sig_gilberto on 22/08/2008 15:23:32 Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação:Courier New Esta fica muito bem esteticamente em relatorios... id=quote>id=quote>Acabei de testar aqui , e quando se trata de imprimir numeros um em baixo do outro seguindo as regras matematicas (virgula em baixo de virgula) sai tudo fora igual a imagem de meu primeiro post ! ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
ZECA Posted August 22, 2008 Report Share Posted August 22, 2008 citação:Sintaxe oPrinter:say(ln*ResLinha,1.0*ResColuna,(transform(H->Qtde,"@E 99,999.99")),oFontText)id=code>id=code> Sai tudo desalinhado ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX id=quote>id=quote>Boa tarde EDER !! Todo Mundo tá dando pitako, também darei(no bom sentido) Quando vc usa TRANSFORM vc literalmente transforma um valor númerico em string. Tente mudar a sintaxe. use: oPrinter:say(ln*ResLinha,1.0*ResColuna,(ALLTRIM(transform(H->Qtde,"@E 99,999.99"))),oFontText) ou vc jogue o H->Qtde numa variável Quant:=ALLTRIM(TRANSFORM(H->Qtde,"@E 99,999.99")) ai imprima a variavel Quant ou ainda exclua "@E" do TRANSFORM usando ALLTRIM tente e nos dê retorno Sds José Carlos - ZECA fw23c-clipper52e-blinker 7.0 - six 3.02 - Windows XP Quote Link to comment Share on other sites More sharing options...
aferra Posted August 22, 2008 Report Share Posted August 22, 2008 Olá Naruto, eu uso Arial e sem problemas usando da forma que o Kapiaba passou citação://-> Para Centraliza‡Æo dos Textos - Controle dos Centrimetros #Define PAD_LEFT 0 #Define PAD_RIGHT 1 #Define PAD_CENTER 2 oPrn:cmSay( 10.50, 19.80, ""+XDATALISTA, ; oFont,, ; CLR_BLACK,, PAD_RIGHT ) id=quote>id=quote>Talvez mostrando como vc está fazendo...... Alessandroid=blue> FW20d+CL53b+Blk7+@Say+CDX "Nós nos transformamos naquilo que praticamos com freqüência. A perfeição, portanto, não é um ato isolado e sim um hábito". id=red> Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação:Olá Naruto, eu uso Arial e sem problemas usando da forma que o Kapiaba passou citação://-> Para Centraliza‡Æo dos Textos - Controle dos Centrimetros #Define PAD_LEFT 0 #Define PAD_RIGHT 1 #Define PAD_CENTER 2 oPrn:cmSay( 10.50, 19.80, ""+XDATALISTA, ; oFont,, ; CLR_BLACK,, PAD_RIGHT ) id=quote>id=quote>Talvez mostrando como vc está fazendo...... Alessandroid=blue> FW20d+CL53b+Blk7+@Say+CDX "Nós nos transformamos naquilo que praticamos com freqüência. A perfeição, portanto, não é um ato isolado e sim um hábito". id=red> id=quote>id=quote>Ja estou mostrando no primeiro post , mas mostro aqui tbm Sintaxe oPrinter:say(ln*ResLinha,1.0*ResColuna,(transform(H->Qtde,"@E 99,999.99")),oFontText) Zeca , gostei de sua analogia , vamos ver no que da ! ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação: citação:Sintaxe oPrinter:say(ln*ResLinha,1.0*ResColuna,(transform(H->Qtde,"@E 99,999.99")),oFontText)id=code>id=code> Sai tudo desalinhado ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX id=quote>id=quote>Boa tarde EDER !! Todo Mundo tá dando pitako, também darei(no bom sentido) Quando vc usa TRANSFORM vc literalmente transforma um valor númerico em string. Tente mudar a sintaxe. use: oPrinter:say(ln*ResLinha,1.0*ResColuna,(ALLTRIM(transform(H->Qtde,"@E 99,999.99"))),oFontText) ou vc jogue o H->Qtde numa variável Quant:=ALLTRIM(TRANSFORM(H->Qtde,"@E 99,999.99")) ai imprima a variavel Quant ou ainda exclua "@E" do TRANSFORM usando ALLTRIM tente e nos dê retorno Sds José Carlos - ZECA fw23c-clipper52e-blinker 7.0 - six 3.02 - Windows XP id=quote>id=quote>O que vale é a intenção , mas não deu sintaxeid=blue> oPrinter:say(ln*ResLinha,1.0*ResColuna,(alltrim(transform(H->Qtde,"@E 99,999.99"))),oFontText) ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
aferra Posted August 22, 2008 Report Share Posted August 22, 2008 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK TALVEZ EU LENDO MELHOR O POST KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Veja se resolve..... oPrinter:Say( ln*ResLinha, 1.0*ResColuna, transform(H->Qtde,"@E 99,999.99"), oFontText, , , , 1 ) Alessandroid=blue> FW20d+CL53b+Blk7+@Say+CDX "Nós nos transformamos naquilo que praticamos com freqüência. A perfeição, portanto, não é um ato isolado e sim um hábito". id=red> Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação:KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK TALVEZ EU LENDO MELHOR O POST KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Veja se resolve..... oPrinter:Say( ln*ResLinha, 1.0*ResColuna, transform(H->Qtde,"@E 99,999.99"), oFontText, , , , 1 ) Alessandroid=blue> FW20d+CL53b+Blk7+@Say+CDX "Nós nos transformamos naquilo que praticamos com freqüência. A perfeição, portanto, não é um ato isolado e sim um hábito". id=red> id=quote>id=quote>É moçada , acho que nessa partida não vai ter gol! O problema é a fonte mesmo , ja que com lucida console funiona Editado por - naruto UZumaki on 22/08/2008 17:52:45 Quote Link to comment Share on other sites More sharing options...
personal Posted August 22, 2008 Report Share Posted August 22, 2008 Se voce esta alinhando a direita, não importa qual fonte. Oliveira, Sérgio A. PERSONAL Comp. e Sitemas.id=green> Quote Link to comment Share on other sites More sharing options...
helio1361303486 Posted August 22, 2008 Report Share Posted August 22, 2008 Naruto, Como fazer para arredondar os cantos do box ? Grato, Hélio xHarbour/WS/PellesC Quote Link to comment Share on other sites More sharing options...
mkyx Posted August 22, 2008 Report Share Posted August 22, 2008 Eu uso da seguinte forma e funciona muito bem, alinha qualquer número à direita: (funciona para qualquer tipo ou tamanho de fonte) valor:=10000.00 ULTIMAPOSICAO:=79 // última posição da coluna dos valores textonumerico:=ALLTRIM(TRANSFORM(valor,"@E 999,999,999.99")) Larg:=oPRINTER:GETTEXTWIDTH(textonumerico,oFont1) oPrinter:Say(linha,ULTIMAPOSICAO-Larg,textonumerico,oFont1) Pompeo Guaratinguetá - SP (12) 9777-9386 E-Mail: mkyx@ig.com.br MSN: mkyx@ig.com.br Skype: pardes.mky www.adentech.com.br www.rmahost.com xH 0.99.50 Hb 8.02 com BCC 55 Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 22, 2008 Author Report Share Posted August 22, 2008 citação:Naruto, Como fazer para arredondar os cantos do box ? Grato, Hélio xHarbour/WS/PellesC id=quote>id=quote>Brother , eu crio um arquivo no corel draw e exporto ele para *.EMF e chamo esse arquivo no preview , depois só imprimir o que interesa nada de desenhar nem mosmo coloco o logo , tudo feito no corel ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Editado por - naruto UZumaki on 22/08/2008 21:07:49 Quote Link to comment Share on other sites More sharing options...
helio1361303486 Posted August 22, 2008 Report Share Posted August 22, 2008 Realmente fica mais fácil desenhar no Corel para quem sabe mexer nele, pois fazer o desenho direto pelo Printer é roça. Não entendo nada de Corel Draw, será que tem um jeito fácil de fazer esses desenhos? com algo já pronto para iniciante? Ou outro Software mais fácil de usar. Aà é como vc disse, transportar para o Preview. Abraço, Hélio. xHarbour/WS/PellesC Quote Link to comment Share on other sites More sharing options...
helio1361303486 Posted August 22, 2008 Report Share Posted August 22, 2008 Agora me lembrei de uma coisa. Todo mundo sabe que o preview/printer tem distorções na impressão com impressoras diferentes. Neste caso de importar EMF do Corel ou de outro software, fica arriscado, quando jogarmos as informações dentro dos campos dessa armação pronta, pois podem ficar fora do quadro, Isso é um problema. Ah não ser que se faça para somente alguns clientes já sabendo a impressora que eles usam e tal, mas para distribuir o software por aà não dá não. Poxa, a printer nunca tem atualização nesse sentido né não? Hélio xHarbour/WS/PellesC Quote Link to comment Share on other sites More sharing options...
mkyx Posted August 23, 2008 Report Share Posted August 23, 2008 Box com cantos arredondados: (já foi colocado em dicas) Use a função abaixo e vc não terá mais problema. A função trabalha com o princÃpio da circunferência: A impressão é normal, mas a visualização das bordas só no zoom 2 em diante //sintaxe: moldura(L1,C1,L2,C2,oPRN,curvatura) #include "fivewin.ch" function main() // sintaxe: moldura(linhainicial,colunainicial,linhafinal,colunafinal,oBjetoPrinter,curvaturadasbordas) printer oPrinter preview page moldura(10,10,200,200,oPrinter,1) moldura(10,300,300,500,oPrinter,2) moldura(5,5,400,60,oPrinter,3) moldura(320,200,600,700,oPrinter,4) moldura(400,200,700,700,oPrinter,5) moldura(350,300,800,800,oPrinter,6) moldura(600,250,1000,800,oPrinter,7) moldura(500,400,1100,900,oPrinter,20) endpage endprinter return .t. FUNCTION MOLDURA(X1,X2,X3,X4,OPRN,_CURVA) // Elaborado por Pompeo - Guaratinguetá - SP local oPen Define Pen oPen width 2 of oprn _curva:=10+_CURVA*5 if x3 return .t. endif if ((X4-_CURVA)-(X2+_CURVA))>=((_curva+5)*2.2) oPrn:Line(X1,X2+_CURVA,X1,X4-_CURVA,oPEN) endif oPrn:Line(X1+_CURVA,X2,X3-_CURVA,X2,oPEN) if ((X4-_CURVA)-(X2+_CURVA))>=((_curva+5)*2.2) oPrn:Line(X3,X2+_CURVA,X3,X4-_CURVA,oPEN) endif oPrn:Line(X1+_CURVA,X4,X3-_CURVA,X4,oPEN) for x=-(_CURVA+5) to (_CURVA+5) for y=-(_CURVA+5) to (_CURVA+5) a=(x*x)+(y*y) b=sqrt(a) if int(=(_CURVA+5) if x<0 .and. y<0 oPrn:Line(x+(_CURVA+5)+x1,y+(_CURVA+5)+x2,x+(_CURVA+5)+x1,y+(_CURVA+5)+x2,oPEN) endif if x<0 .and. y>0 oPrn:Line(x+(_CURVA+5)+x1,y-(_CURVA+5)+x4,x+(_CURVA+5)+x1,y-(_CURVA+5)+x4,oPEN) endif if x>0 .and. y>0 oPrn:Line(x-(_CURVA+5)+x3,y-(_CURVA+5)+x4,x-(_CURVA+5)+x3,y-(_CURVA+5)+x4,oPEN) endif if x>0 .and. y<0 oPrn:Line(x-(_CURVA+5)+x3,y+(_CURVA+5)+x2,x-(_CURVA+5)+x3,y+(_CURVA+5)+x2,oPEN) endif endif next y next x RETURN .T. Pompeo Guaratinguetá - SP (12) 9777-9386 E-Mail: mkyx@ig.com.br MSN: mkyx@ig.com.br Skype: pardes.mky www.adentech.com.br www.rmahost.com xH 0.99.50 Hb 8.02 com BCC 55 Editado por - mkyx on 23/08/2008 12:18:04 Quote Link to comment Share on other sites More sharing options...
Naruto uZumaki Posted August 23, 2008 Author Report Share Posted August 23, 2008 citação:Box com cantos arredondados: (já foi colocado em dicas) Use a função abaixo e vc não terá mais problema. A função trabalha com o princÃpio da circunferência: A impressão é normal, mas a visualização das bordas só no zoom 2 em diante //sintaxe: moldura(L1,C1,L2,C2,oPRN,curvatura) #include "fivewin.ch" function main() // sintaxe: moldura(linhainicial,colunainicial,linhafinal,colunafinal,oBjetoPrinter,curvaturadasbordas) printer oPrinter preview page moldura(10,10,200,200,oPrinter,1) moldura(10,300,300,500,oPrinter,2) moldura(5,5,400,60,oPrinter,3) moldura(320,200,600,700,oPrinter,4) moldura(400,200,700,700,oPrinter,5) moldura(350,300,800,800,oPrinter,6) moldura(600,250,1000,800,oPrinter,7) moldura(500,400,1100,900,oPrinter,20) endpage endprinter return .t. FUNCTION MOLDURA(X1,X2,X3,X4,OPRN,_CURVA) // Elaborado por Pompeo - Guaratinguetá - SP local oPen Define Pen oPen width 2 of oprn _curva:=10+_CURVA*5 if x3 return .t. endif if ((X4-_CURVA)-(X2+_CURVA))>=((_curva+5)*2.2) oPrn:Line(X1,X2+_CURVA,X1,X4-_CURVA,oPEN) endif oPrn:Line(X1+_CURVA,X2,X3-_CURVA,X2,oPEN) if ((X4-_CURVA)-(X2+_CURVA))>=((_curva+5)*2.2) oPrn:Line(X3,X2+_CURVA,X3,X4-_CURVA,oPEN) endif oPrn:Line(X1+_CURVA,X4,X3-_CURVA,X4,oPEN) for x=-(_CURVA+5) to (_CURVA+5) for y=-(_CURVA+5) to (_CURVA+5) a=(x*x)+(y*y) b=sqrt(a) if int(=(_CURVA+5) if x<0 .and. y<0 oPrn:Line(x+(_CURVA+5)+x1,y+(_CURVA+5)+x2,x+(_CURVA+5)+x1,y+(_CURVA+5)+x2,oPEN) endif if x<0 .and. y>0 oPrn:Line(x+(_CURVA+5)+x1,y-(_CURVA+5)+x4,x+(_CURVA+5)+x1,y-(_CURVA+5)+x4,oPEN) endif if x>0 .and. y>0 oPrn:Line(x-(_CURVA+5)+x3,y-(_CURVA+5)+x4,x-(_CURVA+5)+x3,y-(_CURVA+5)+x4,oPEN) endif if x>0 .and. y<0 oPrn:Line(x-(_CURVA+5)+x3,y+(_CURVA+5)+x2,x-(_CURVA+5)+x3,y+(_CURVA+5)+x2,oPEN) endif endif next y next x RETURN .T. Pompeo Guaratinguetá - SP (12) 9777-9386 E-Mail: mkyx@ig.com.br MSN: mkyx@ig.com.br Skype: pardes.mky www.adentech.com.br www.rmahost.com xH 0.99.50 Hb 8.02 com BCC 55 Editado por - mkyx on 23/08/2008 12:18:04 id=quote>id=quote>Puotz vendo essa func com corel fica xuxuba de fazer ____________________________ Eder Xavier Msn:eder_xavier_2@hotmail.com C:\Xharbour Free\fivewin 8.05\workshop\VSX Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.