topic
stringlengths
1
63
text
stringlengths
1
577k
Codigo vs Recursos
Ambas formas son necesarias, y dependiendo de lo que quiera hacerse, se utiliza una o la otra... La mayoria de dialogos pueden ser diseñados desde recursos sin problemas tomando solamente una regla de oro: No diseñarlos mayores de 800 x 600, o mejor dicho, verificar que se observen correctamente en esa resolucion (algunos usuarios podrian usar esta resolucion)... En casos especiales y cuando se haga desde código, yo obtengo la resolución de la pantalla, el tamaño de la TaskBar y calculo el tamaño de todos los controles, incluyendo los Fonts... [code=fw:g7ltaid2]<div class="fw" id="{CB}" style="font-family: monospace;">@ <span style="color: #000000;">&#40;</span> Cuadro4<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Btn4Height - <span style="color: #000000;">&#40;</span> Btn4Size * <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>  + <span style="color: #000000;">&#40;</span> Btn4Size * <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> , ;<br />   <span style="color: #000000;">&#40;</span> Cuadro4<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> Btn4Width - <span style="color: #000000;">&#40;</span>Btn4Size * <span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">&#40;</span> Btn4Size * <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> ;<br />   <span style="color: #0000ff;">BTNBMP</span> ocal <span style="color: #000000;">&#91;</span> <span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDialog <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'7'</span> ;<br />   FILENAME PathToFile + <span style="color: #ff0000;">'graficos<span style="color: #000000;">\b</span>otones<span style="color: #000000;">\B</span>OTON1.bmp'</span> <span style="color: #0000ff;">FONT</span> oFont2 ;<br />   <span style="color: #0000ff;">SIZE</span>  <span style="color: #000000;">&#40;</span> Btn4Size - <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> Btn4Size - <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> NOBORDER <span style="color: #0000ff;">ACTION</span> Calc<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'7'</span><span style="color: #000000;">&#41;</span></div>[/code:g7ltaid2] Quedando la aplicacion de la misma manera sin importar la resolucion.... [img:g7ltaid2]http&#58;//a1&#46;sphotos&#46;ak&#46;fbcdn&#46;net/hphotos-ak-snc7/313082_2079322301953_1211881135_32242205_441648291_n&#46;jpg[/img:g7ltaid2]
Codigo vs Recursos
Antolín, Sí, es un problema grave que debería corregirse haciendo que Fivewin ajustara automáticamente los diálogos a la resolución. Existe una contribución que lo hace pero tienes que llamarla desde cada diálogo: [code=fw:2bltqrqd]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"common.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br />*********************************************************************<br />* NOME......: <span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span>oWnd,nResolution<span style="color: #000000;">&#41;</span><br />*<br />* VERSAO....: <span style="color: #000000;">3.0</span> - Julho de <span style="color: #000000;">2010</span><br />*<br />* AUTOR.....: <span style="color: #000000;">William</span> de Brito Adami e FiveWidi, que iniciou este projeto<br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; no Forum Espanhol de Fivewin .<br />*<br />* DESCRICAO.: <span style="color: #000000;">Funcao</span> para exibir a tela sempre igual em qualquer <br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resolucao, independente da fonte ou controle utilizado.<br />*<br />* PARAMETROS: <span style="color: #000000;">oWnd</span>: <span style="color: #0000ff;">Window</span> ou <span style="color: #0000ff;">Dialog</span> a ser redimensionado<br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nResolution: <span style="color: #000000;">Numero</span> correspondente a resolucao <br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; que se desenhou inicialmente a tela.<br />*<br />*********************************************************************<br /><span style="color: #00C800;">function</span> <span style="color: #00C800;">display</span><span style="color: #000000;">&#40;</span> &nbsp;oWnd, nResolution, lFullres <span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">local</span> lAutoresize:=.t. , nWhatSize:=<span style="color: #000000;">0</span>, lRepaint:=.t. <br />&nbsp; <br />&nbsp;* atencao: <span style="color: #000000;">nResolution</span> identifica em que resolucao foram inicialmente <br />&nbsp;* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;desenhadas as telas, e DEVE ter um dos seguintes valores:<br />&nbsp;<span style="color: #000000;">*</span> <br />&nbsp;* &nbsp;<span style="color: #000000;">1</span> = &nbsp;<span style="color: #000000;">640</span> X <span style="color: #000000;">480</span><br />&nbsp;* &nbsp;<span style="color: #000000;">2</span> = &nbsp;<span style="color: #000000;">800</span> X <span style="color: #000000;">600</span><br />&nbsp;* &nbsp;<span style="color: #000000;">3</span> = <span style="color: #000000;">1024</span> X <span style="color: #000000;">768</span><br />&nbsp;* &nbsp;<span style="color: #000000;">4</span> = <span style="color: #000000;">1152</span> X <span style="color: #000000;">864</span><br />&nbsp;* &nbsp;<span style="color: #000000;">5</span> = <span style="color: #000000;">1280</span> X <span style="color: #000000;">800</span><br />&nbsp;* &nbsp;<span style="color: #000000;">6</span> = <span style="color: #000000;">1280</span> X <span style="color: #000000;">1024</span><br />&nbsp;* &nbsp;<span style="color: #000000;">7</span> = <span style="color: #000000;">1600</span> X <span style="color: #000000;">1200</span><br />&nbsp;* &nbsp;<span style="color: #000000;">8</span> = &nbsp;<span style="color: #000000;">768</span> X <span style="color: #000000;">1024</span><br />&nbsp;* &nbsp;<span style="color: #000000;">9</span> = <span style="color: #000000;">1440</span> X <span style="color: #000000;">900</span><br />&nbsp;* <span style="color: #000000;">10</span> = <span style="color: #000000;">1280</span> X <span style="color: #000000;">768</span><br />&nbsp;* <span style="color: #000000;">11</span> = <span style="color: #000000;">1280</span> X <span style="color: #000000;">720</span><br /><br />&nbsp;AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd, nResolution, lRepaint, lFullres <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><span style="color: #B900B9;">/*<br />(20/08/2009) Inicio do REdesenvolvimento da funcao.<br />Parametros recebidos :<br /><br />lAutoresize: ativa / desativa redimensionamento automatico<br /><br />nWhatSize: &nbsp; permite for?ar o redimensionamento a valores concretos;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;permitindo desta maneira que a aplica?ao possa ter um valor<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ao qual redimensionar as telas.<br /><br />oWnd: &nbsp; &nbsp; &nbsp; &nbsp;Objeto/janela/dialogo/controle a ser redimensionado.<br /><br />nResolution: Numero que identifica que resolucao tinha a tela na qual<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;se desenhou o objeto.<br /><br />lRepaint: &nbsp; &nbsp;Indicador se deve repintar o objeto uma vez redimensionado.<br /><br />lFullres: &nbsp; Indica se os textos devem ser redimensionados no tamanho maximo<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do resource desenhado.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /><br />Esta funcao deve ser utilizada no evento ON INIT do ACTIVATE das WINDOWs <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e DIALOGs .<br /><br />Exemplo:<br /><br />ACTIVATE DIALOG oDlg ON INIT display(oDlg,2,.t.) //desenhada em 800 X 600<br /><br /><br />-* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -*<br />*/</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd, nResolution, lRepaint,lFullres <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Resolucao da tela no momento de definir os controles.</span><br /><span style="color: #00C800;">Local</span> nOriWidth, nOriHeight<br /><br /><span style="color: #B900B9;">// o normal seria que fosse a resolucao atual da tela (nWhatSize=0).</span><br /><span style="color: #B900B9;">// Se permite forcar esta resolucao mediante o valor de nWhatSize=1,2,3,4,5,6,7,....</span><br /><span style="color: #00C800;">Local</span> nWidth, nHeight<br /><br /><span style="color: #B900B9;">// Sao as relacoes entre a resolucao de tela e a resolucao de desenho.</span><br /><span style="color: #00C800;">Local</span> nFactorWitdh, nFactorHeight<br /><br /><span style="color: #00C800;">Local</span> nContador,ofonttmp<br /><br /><span style="color: #00C800;">DEFAULT</span> lRepaint := .T.<br /><br />nOriWidth := <span style="color: #000000;">0</span><br />nOriHeight := <span style="color: #000000;">0</span><br />nWidth := <span style="color: #000000;">0</span><br />nHeight := <span style="color: #000000;">0</span><br />nContador := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">If</span> <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">1</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">640</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">480</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">2</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">800</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">600</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">3</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1024</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">768</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">4</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1152</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">864</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">5</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1280</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">800</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">6</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1280</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">1024</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">7</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1600</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">1200</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">8</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">768</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">1024</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">9</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1440</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">900</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">10</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1280</span> <br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">768</span><br />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">11</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1280</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">720</span><br /><br /><span style="color: #00C800;">Else</span><br />&nbsp; &nbsp;ScrResolution<span style="color: #000000;">&#40;</span> @nOriWidth, @nOriHeight <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Endif</span><br /><br /><br /><span style="color: #00C800;">If</span> nWhatSize = <span style="color: #000000;">1</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">640</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">480</span><br />ElseIf nWhatSize = <span style="color: #000000;">2</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">800</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">600</span><br />ElseIf nWhatSize = <span style="color: #000000;">3</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1024</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">768</span><br />ElseIf nWhatSize = <span style="color: #000000;">4</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1152</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">864</span><br />ElseIf nWhatSize = <span style="color: #000000;">5</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1280</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">800</span><br />ElseIf nWhatSize = <span style="color: #000000;">6</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1280</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">1024</span><br />ElseIf nWhatSize = <span style="color: #000000;">7</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1600</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">1200</span><br />ElseIf nWhatSize = <span style="color: #000000;">8</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">768</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">1024</span><br />ElseIf nWhatSize = <span style="color: #000000;">9</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1440</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">900</span><br />ElseIf nWhatSize = <span style="color: #000000;">10</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1280</span> <br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">768</span><br />ElseIf nWhatSize = <span style="color: #000000;">11</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1280</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">720</span><br /><br /><span style="color: #00C800;">Else</span><br /><br />&nbsp; &nbsp;ScrResolution<span style="color: #000000;">&#40;</span> @nWidth, @nHeight <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Endif</span><br /><br /><br /><span style="color: #00C800;">If</span> lAutoresize .and. nOriHeight != nHeight<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/* Este sera o caso habitual, ao qual se pretende redimensionar<br />&nbsp; &nbsp;os controles na resolucao da tela na qual estao viendo. */</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> nResolution > <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp;nFactorWitdh := nWidth / nOriWidth<br />&nbsp; &nbsp; &nbsp;nFactorHeight := nHeight / nOriHeight<br /><br />&nbsp; &nbsp;ElseIf nResolution < <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp;nFactorWitdh := nOriWidth / nWidth<br />&nbsp; &nbsp; &nbsp;nFactorHeight := nOriHeight / nHeight<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> lRepaint<br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br /><br />&nbsp; &nbsp;* se aumentou a altura <br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> nFactorHeight > <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp;***************************** <br />&nbsp; &nbsp; &nbsp;* se tiver barbutton * NOVO *<br />&nbsp; &nbsp; &nbsp;*****************************<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ownd:<span style="color: #000000;">obar</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nwidth</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nwidth*</span> nfactorwitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nHeight</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nHeight*nfactorheight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnwidth</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnwidth*nfactorwitdh</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnHeight</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnHeight*nfactorheight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> i= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeight</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* redimensiona o BMP da BARBUTTON<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;o:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hbitmap1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> o<><span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hbmp:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hbitmap1</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpwidth := nbmpwidth<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpheight:= nbmpheight<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; larg:=nbmpwidth*nfactorwitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt:=nbmpheight*nfactorheight<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o:=resizebmp<span style="color: #000000;">&#40;</span>o,larg ,alt <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hbitmap1</span>:=o<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TIMAGE/"</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; ad:=getcoors<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>-ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>-ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Else</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nWidth</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nHeight</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TFOLDER/TPAGES/"</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nContador := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>, nResolution, .F.,lFullres <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; EndFor<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br /><br />&nbsp; &nbsp; &nbsp; Elseif oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TBTNBMP/"</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*********************************<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* redimensiona o BMP <span style="color: #00C800;">do</span> <span style="color: #0000ff;">BTNBMP</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;o:=oWnd:<span style="color: #000000;">hbitmap1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> o<><span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hbmp:=ownd:<span style="color: #000000;">hbitmap1</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpwidth := nbmpwidth<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpheight:= nbmpheight<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; larg:=nbmpwidth*nfactorwitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt:=nbmpheight*nfactorheight<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o:=resizebmp<span style="color: #000000;">&#40;</span>o,larg ,alt <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">hbitmap1</span>:=o<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*********************************<br /><br /><br /><br />&nbsp; &nbsp;elseif oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TCOMBOBOX/TDBCOMBO/"</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nContador := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>, nResolution, .F.,lFullres <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * ajuste de fontess<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * controle TSAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TSAY/TSAYREF/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustaalt<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nfactorheight,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustalarg<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,ownd,nfactorwitdh,lFullres<span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TGET/TSSAY/TDSAY/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustaalt<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nfactorheight,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nFactorWitdh<span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TFOLDER/TPAGES/TCOMBOBOX/TGROUP/TTREE/TCHECKBOX/TBTNBMP/TTOOLBAR/TRADIO/TDBCOMBO/TTABS/TXBROWSE/TSBROWSE/TWBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_FLD<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nFactorHeight<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nFactorWitdh<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; EndFor<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;* se diminuiu a altura<br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> nFactorHeight < <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp;***************************** <br />&nbsp; &nbsp; &nbsp;* se tiver barbutton * NOVO *<br />&nbsp; &nbsp; &nbsp;*****************************<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ownd:<span style="color: #000000;">obar</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nwidth</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nwidth*</span> nfactorwitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nHeight</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nHeight*nfactorheight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnwidth</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnwidth*nfactorwitdh</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnHeight</span>:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">nbtnHeight*nfactorheight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> i= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHeight</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* redimensiona o BMP da BARBUTTON<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;o:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hbitmap1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> o<><span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hbmp:=ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hbitmap1</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpwidth := nbmpwidth<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpheight:= nbmpheight<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; larg:=nbmpwidth*nfactorwitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt:=nbmpheight*nfactorheight<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o:=resizebmp<span style="color: #000000;">&#40;</span>o,larg ,alt <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ownd:<span style="color: #000000;">obar</span>:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hbitmap1</span>:=o<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">obar</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;***************************************<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TIMAGE/"</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; ad:=getcoors<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>-ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>-ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; Elseif oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TBTNBMP/"</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nWidth</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nHeight</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*********************************<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* redimensiona o BMP <span style="color: #00C800;">do</span> <span style="color: #0000ff;">BTNBMP</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;o:=oWnd:<span style="color: #000000;">hbitmap1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> o<><span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hbmp:=ownd:<span style="color: #000000;">hbitmap1</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpwidth := nbmpwidth<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nbmpheight:= nbmpheight<span style="color: #000000;">&#40;</span>hbmp<span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; larg:=nbmpwidth*nfactorwitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt:=nbmpheight*nfactorheight<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o:=resizebmp<span style="color: #000000;">&#40;</span>o,larg ,alt <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">hbitmap1</span>:=o<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*********************************<br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nWidth</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nHeight</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> <> <span style="color: #ff0000;">"A"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * ajuste de fontess<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * controle TSAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ownd:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TSAY/TSAYREF/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustaalt<span style="color: #000000;">&#40;</span>ownd,nfactorheight,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustalarg<span style="color: #000000;">&#40;</span>ownd,ownd,nfactorwitdh,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TGET/TSSAY/TDSAY/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustaalt<span style="color: #000000;">&#40;</span>ownd,nfactorheight,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD<span style="color: #000000;">&#40;</span>ownd,nFactorWitdh<span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TFOLDER/TPAGES/TCOMBOBOX/TGROUP/TTREE/TCHECKBOX/TBTNBMP/TTOOLBAR/TRADIO/TDBCOMBO/TTABS/TXBROWSE/TSBROWSE/TWBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_FLD<span style="color: #000000;">&#40;</span>ownd,nFactorHeight<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD<span style="color: #000000;">&#40;</span>ownd,nFactorWitdh<span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> <br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> lRepaint<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oWnd:<span style="color: #000000;">lCentered</span> &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br /><br />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; ***************************************<br />&nbsp; &nbsp; * se <span style="color: #00C800;">for</span> resolucao igual a que desenhou <br />&nbsp; &nbsp; ***************************************<br />elseif lAutoresize .and. nOriHeight = nHeight<br /><br /><br /><span style="color: #00C800;">if</span> lfullres<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> nResolution > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; nFactorWitdh := nWidth / nOriWidth<br />&nbsp; &nbsp; &nbsp; nFactorHeight := nHeight / nOriHeight<br />&nbsp; &nbsp;ElseIf nResolution < <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; nFactorWitdh := nOriWidth / nWidth<br />&nbsp; &nbsp; &nbsp; nFactorHeight := nOriHeight / nHeight<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TFOLDER/TPAGES/"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nContador := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>, nResolution, .F.,lfullres <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; EndFor<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;elseif oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TIMAGE/"</span> &nbsp; &nbsp;<span style="color: #B900B9;">//TBITMAP/TLISTBOX/TWBROWSE/TSSAY/TDSAY/TSAYREF/" &nbsp; &nbsp;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;ad:=getcoors<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">nTop</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">nLeft</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>-ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * nFactorWitdh, ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>-ad<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> * nFactorHeight , ;<br />&nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;elseif oWnd:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TCOMBOBOX/TDBCOMBO/"</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nContador := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>, nResolution, .F.,lfullres <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* ajuste de fontes<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * controle TSAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TSAY/TSAYREF/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustaalt<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nfactorheight,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustalarg<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,ownd,nfactorwitdh,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TGET/TSSAY/TDSAY/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajustaalt<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nfactorheight,lFullres<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nFactorWitdh<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TFOLDER/TPAGES/TCOMBOBOX/TGROUP/TTREE/TCHECKBOX/TBTNBMP/TTOOLBAR/TRADIO/TDBCOMBO/TTABS/TXBROWSE/TSBROWSE/TWBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_FLD<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nFactorHeight<span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">acontrols</span><span style="color: #000000;">&#91;</span>nContador<span style="color: #000000;">&#93;</span>,nFactorWitdh<span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; EndFor<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br /><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> AjustaLarg<span style="color: #000000;">&#40;</span>oq,ownd,nfact,lfullres<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;* se nao tiver fonte atribuida, nao faz !<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cFontName &nbsp;:= iif <span style="color: #000000;">&#40;</span> oq:<span style="color: #000000;">oFont</span>=<span style="color: #00C800;">NIL</span> , <span style="color: #ff0000;">"NAOFAZ"</span> ,oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">cFaceName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> &nbsp; lFlagReleaseFont &nbsp; := .F.,;<br />&nbsp; &nbsp; &nbsp; nAlturaDaFonte,;<br />&nbsp; &nbsp; &nbsp; nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">ofont</span>:<span style="color: #000000;">nwidth</span>,;<br />&nbsp; &nbsp; &nbsp; nLarguraDoControle ,;<br />&nbsp; &nbsp; &nbsp; nTime &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+3</span>,;<br />&nbsp; &nbsp; &nbsp; oFontTmp,ofont<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cFontName=<span style="color: #ff0000;">"NAOFAZ"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> = <span style="color: #00C800;">NIL</span> &nbsp; &nbsp;<span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">0</span> &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br /><br />&nbsp; &nbsp;nAlturaDaFonte &nbsp; &nbsp; := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp;nlarguradafonte:=nlarguradafonte*nfact<br />&nbsp; &nbsp;nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><br /><br /><span style="color: #00C800;">if</span> lFullres<br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span> SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < nTime &nbsp;<span style="color: #B900B9;">// Evita congelamento da aplicação caso não seja possível recalcular a fonte</span><br /><br />&nbsp; &nbsp; &nbsp; nLarguraDaFonte += <span style="color: #000000;">1</span> &nbsp;<span style="color: #B900B9;">// Nao funciona com numeros facionados</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> cFontName;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> nLarguraDaFonte,<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nAlturaDaFonte<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; lFlagReleaseFont := .T.<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> oWnd:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span>oq:<span style="color: #000000;">varget</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oFontTmp<span style="color: #000000;">&#41;</span> >= nLarguraDoControle<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oFont := oq:<span style="color: #000000;">ofont</span> &nbsp; <span style="color: #B900B9;">//osay:GetFont()</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br />&nbsp; &nbsp; &nbsp; lFlagReleaseFont := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lFlagReleaseFont<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFont<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> cFontName;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #0000ff;">abs</span><span style="color: #000000;">&#40;</span>nLarguraDaFonte<span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nAlturaDaFonte<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oFont := oq:<span style="color: #000000;">ofont</span> &nbsp; <span style="color: #B900B9;">//osay:GetFont()</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br /><br /><br /><span style="color: #00C800;">endif</span><br /><br /><br /><br />* &nbsp; oq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> AjustaAlt<span style="color: #000000;">&#40;</span>oq,fact,lFullres<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;* se nao tiver fonte , nao faz !<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cFontName &nbsp;:= iif <span style="color: #000000;">&#40;</span> oq:<span style="color: #000000;">oFont</span>=<span style="color: #00C800;">NIL</span> , <span style="color: #ff0000;">"NAOFAZ"</span> ,oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">cFaceName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lFlagReleaseFont &nbsp; := .F., nAlturaDaFonte, nAlturaDoControle &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLarguraDaFonte, &nbsp;nTime:= SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+3</span>, oFontTmp,ofont<br /><br />&nbsp; &nbsp;* se nao tiver fonte, volta sem ajustar <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> cfontname=<span style="color: #ff0000;">"NAOFAZ"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> = <span style="color: #00C800;">NIL</span> &nbsp; &nbsp;<span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">0</span> &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br /><br />&nbsp; &nbsp;nAlturaDaFonte:=oq:<span style="color: #000000;">ofont</span>:<span style="color: #000000;">nheight</span><br /><br /><br /><br /><span style="color: #00C800;">if</span> lFullres<br />&nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;* se tiver fonte , ajusta <br />&nbsp; &nbsp;nAlturaDoControle &nbsp;:= <span style="color: #000000;">&#40;</span>oq:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-6</span><br /><br />&nbsp; &nbsp;nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> <br /><br />&nbsp; &nbsp;nAlturadaFonte:=nalturadafonte*fact<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span> SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < nTime &nbsp;<span style="color: #B900B9;">// Evita congelamento da aplicação caso não seja possível recalcular a fonte</span><br /><br />&nbsp; &nbsp; &nbsp; nAlturaDaFonte += <span style="color: #000000;">0.1</span> <span style="color: #B900B9;">// Na altura o fracionamento funcionou</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> cFontName;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> nLarguraDaFonte,nAlturaDaFonte<br /><br />&nbsp; &nbsp; &nbsp; lFlagReleaseFont := .T.<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> oFontTmp:<span style="color: #000000;">nHeight</span> >= nAlturaDoControle<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oFont := oq:<span style="color: #000000;">ofont</span> &nbsp; &nbsp;<span style="color: #B900B9;">//oSay:GetFont()</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br />&nbsp; &nbsp; &nbsp; lFlagReleaseFont := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lFlagReleaseFont<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFont<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br /><br />&nbsp; &nbsp; &nbsp; nLarguraDaFonte := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp; nAlturadaFonte:=nalturadafonte*fact <br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> cFontName;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #0000ff;">abs</span><span style="color: #000000;">&#40;</span>nLarguraDaFonte<span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nAlturaDaFonte<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oFont := oq:<span style="color: #000000;">ofont</span> &nbsp; <span style="color: #B900B9;">//osay:GetFont()</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br /><br /><br /><span style="color: #00C800;">endif</span><br /><br />* &nbsp; &nbsp;oq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> ajl_FLD<span style="color: #000000;">&#40;</span>oq,nf<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;* se nao tiver fonte , nao faz<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cFontName := iif <span style="color: #000000;">&#40;</span> oq:<span style="color: #000000;">oFont</span>=<span style="color: #00C800;">NIL</span> , <span style="color: #ff0000;">"NAOFAZ"</span> ,oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">cFaceName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lFlagReleaseFont &nbsp; := .F., nAlturaDaFonte, nLarguraDaFonte := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDoControle ,nTime:= SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+3</span>, oFontTmp,ofont<br />&nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> cfontname=<span style="color: #ff0000;">"NAOFAZ"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> = <span style="color: #00C800;">NIL</span> &nbsp; &nbsp;<span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">0</span> &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp; &nbsp; nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp; nAlturaDaFonte &nbsp; &nbsp; := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp; &nbsp; nLarguraDaFonte = nLarguraDaFonte*nf<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> cFontName;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #0000ff;">abs</span><span style="color: #000000;">&#40;</span>nLarguraDaFonte<span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nAlturaDaFonte<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oFont := oq:<span style="color: #000000;">ofont</span> &nbsp; <span style="color: #B900B9;">//osay:GetFont()</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oq:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TXBROWSE/"</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> i=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>oq:<span style="color: #000000;">acols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * pega tamanho anterior X factor<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ov:=oq:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> * nf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * atualiza o novo tamanho da coluna<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span> := ov<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;elseif oq:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TDSAY/"</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;elseif &nbsp;oq:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TWBROWSE/"</span><br /><br />&nbsp; &nbsp; &nbsp; * atualiza a largura das colunas<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> i=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>oq:<span style="color: #000000;">acolsizes</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">acolsizes</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:=oq:<span style="color: #000000;">acolsizes</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>*nf<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />* &nbsp; oq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> aja_FLD<span style="color: #000000;">&#40;</span>oq,nf<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cFontName := iif <span style="color: #000000;">&#40;</span> oq:<span style="color: #000000;">oFont</span>=<span style="color: #00C800;">NIL</span> , <span style="color: #ff0000;">"NAOFAZ"</span> ,oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">cFaceName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lFlagReleaseFont := .F., nAlturaDaFonte := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDaFonte, oFontTmp,ofont<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> cfontname=<span style="color: #ff0000;">"NAOFAZ"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> = <span style="color: #00C800;">NIL</span> &nbsp; &nbsp;<span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">0</span> &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// *** AAA ***//</span><br /><br />&nbsp; &nbsp; &nbsp; nLarguraDaFonte := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp; nAlturadaFonte:=nalturadafonte*nf <br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> cFontName;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #0000ff;">abs</span><span style="color: #000000;">&#40;</span>nLarguraDaFonte<span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nAlturaDaFonte<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oFont := oq:<span style="color: #000000;">ofont</span> &nbsp; <span style="color: #B900B9;">//osay:GetFont()</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oq:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TXBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">nRowHeight</span> &nbsp; := &nbsp; oq:<span style="color: #000000;">nRowHeight*</span> nf<br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">nStretchcol</span>:=STRETCHCOL_LAST<br /><br />&nbsp; &nbsp;elseif oq:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>$<span style="color: #ff0000;">"/TSBROWSE/"</span><br /><br />&nbsp; &nbsp; &nbsp; oq:<span style="color: #000000;">nHeightCell</span>:=oq:<span style="color: #000000;">nHeightCell</span> * nf<br />&nbsp; &nbsp; &nbsp; * &nbsp; oq:<span style="color: #000000;">nheightHead</span>:=oq:<span style="color: #000000;">nheightHead*nf</span><br />&nbsp; &nbsp; &nbsp; * &nbsp; oq:<span style="color: #000000;">nheightFoot</span>:=oq:<span style="color: #000000;">nheightFoot*nf</span><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />* &nbsp; oq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><br /><br /></div>[/code:2bltqrqd]
Codigo vs Recursos
Esa fué la primera opción que usé, pero se demoraba mucho para pintar mi modulo (por alguna razón cerca de 10 segundos), y tuve que optar por hacerlo de la otra manera... Para dialogos normales, creo que es una exelente opción...
Codigo vs Recursos
Quizás Fivetech podría optimizar esa función y añadir un set global para ajustar la resolución de los diálogos a la resolución de pantalla. Sería una novedad muy buena para el producto <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->.
Codigo vs Recursos
mgsoft escribio: [quote:2bk64to3]En todo caso, ¿no habéis pensado en priorizar alguno de tales desarrollos pendientes y comercializarlos como un nuevo producto que debe adquirirse?. De este modo, se abrirían nuevas líneas y también ingresos adicionales.[/quote:2bk64to3] Antonio, Siempre he estado de acuerdo con lo expresado por mgsoft. No hay duda que el camino a tomar es el de añadir, por parte de fivetechsoft, herramientas utiles para que se haga mas facil, eficiente y poderoso el uso del FWH por parte de nosotros. Si te fijas, por el numero de usuarios de este forum, no estamos creciendo como todos deseariamos, a pesar de tener en mi opinion unos de los mejores entorno de desarrollo para Windows existente hoy dia en el mercado. Un entorno que tambien funciona, no al mismo nivel de FWH aun, en Mac, iPhone, Android y Windows Mobile. Talvez el asunto esta en el marketing. Mi consejo seria retrasar al menos 2 meses la proxima pubicacion de FWH a fin de enfocarse en lo siguiente: 1. Estabilizar la ultima actualizacion de FWH a fin de corregir todos los posibles "bugs" detectados. 2. Escribir un manual en formato PDF, basado en esta ultima actualizacion de FWH, y el cual contenga varios ejempos detallados. 3. Iniciar un plan de marketing en los EE.UU. Finalmente quiero darte las gracias por haber puesto a nuestro alcance tan excelente producto FWH y por permitirnos dar nuestra opinion al respecto en este forum. Saludos. George
Codigo vs Recursos
George, Me alegro de no ser el único que piensa en el futuro de FWH + Harbour <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. También quiero reiterar mi agradecimiento a Antonio y al equipo, y este post en ningún caso es una crítica. Pero creo que deben replantearse todas las vías y ventanas abiertas, ya que no resultan viables ni utilizables. A fecha de hoy no es posible convertir al 99% una aplicación de FWH a FiveMac o a FiveLinux. Y el futuro de Fivetech pasa por permitir dicha interoperabilidad de plataformas y también crear un Fiveweb, todo con una misma sintáxis. Sin embargo, deben ser productos 100% funcionales y operativos, no nuevas "ventanas" o prototipos que no acaban de funcionar. Y lógicamente, hay que pagar por ello. No podemos tener todos los productos gratis o con el precio actual del FTDN. Por eso, deseo que el 2012 traiga un impulso al equipo de desarrollo de Fivetech para evitar la caida en picado de usuarios, cuando se trata de una plataforma sólida y robusta que no tiene que envidiar nada a C++ o a Visual Basic. Y reitero que todo esto debe entenderse en positivo y nunca como crítica al enorme esfuerzo de Fivetech que nos ha brindado una herramienta tan útil como Fivewin, reiterando nuevamente mi agradecimiento.
Codigo vs Recursos
Antolin, El tema de las pantallas es mas un tema de funcionalidad que uno quiere aportar a su aplicacion pero no creo que sea la mejor opcion. Si tu quieres ver los dialogos mas grandes o mas pequeños, pues cambias la resolucion de pantalla y listos, y antes de que me digas que esto ya lo sabias (q por supuesto ya lo se <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> ), es la correcta solucion. Si tu cojes el mismo office y cambias la resolucion no cambia el tamaño de los dialogos, y como este, la mayoria de los paquetes. Ahora, si es una necesidad para solventar una problematica particular, de acuerdo, pero no como para ponerlo como una funcionalidad por defecto en la FWH
Codigo vs Recursos
Mgsoft, Yo estoy de acuerdo en parte y me explico. 1.- Compatibilidad entre sistemas FWH nunca sera 100% compatible con las diferentes versiones para mac, linux, ... por la sencilla razon que la madurez de FWH no se encuentra en las otras librerias, y las numerosas clases que tiene no se encuentran porque o no se han portado o bien no se pueden portar, pero dicho esto.... Es bueno entender que la funcionalidad en si del producto, te permite facilmente portar una app de un sistema a otro, y facilmente "adaptarlo". Yo recuerdo que una mañana ya realice al principio app con la pocket, y pasa lo mismo con los otros entornos. Es mas complejo conocer el otro sistema y configurarlo, adaptarlo, emuladores, ... que no crear tu primera ventana de "Hello FWH...", porque es aqui donde uno ve la potencia de este lenguaje. 2.- IDE Personalmente creo que FWH es uno de los productos mas robustos que existe. Es cierto que existen pequeños bugs, pero no dejan de ser esto, bugs q se van ajustando con el tiempo, pero muy lejos de los numerosos bugs que tambien tienen otros productos. A partir de esta posicion, creo que los que llevamos años trabajando sin un IDE nos deja dormir igual y somos igual o mas productivos debido tambien a nuestra evolucion personal de trabajar con estas librerias, pero.... si, seria bonito un IDE para mi como cerecita al producto y la gente ajena a este entorno lo viera quizas con un poco mas de "respeto" <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->. Ahora, crear un IDE se tendria de apostar por varios temas: 1.- Un IDE multiplataforma no me lo creo, por la sencilla razon descrita mas arriba, problema entre entornos 2.- Quizas a nivel de "orgullo" nuestro nos gustaria crear un IDE 100% FWH, pero yo creo que seria mejor enfocarlo de otra manera, por ejemplo: Una parte de las mas importantes de un IDE es el propio editor de codigo: O lo creamos integramente con FWH o integramos un componente de terceros, que hay muchos, open source, y con unas funcionalidades completas y brutales, preparadas para usarlos p.e. -> <!-- m --><a class="postlink" href="http://www.scintilla.org/">http://www.scintilla.org/</a><!-- m --> que es usado ya en numerosos entornos, y como este hay un monton . Para que reinventar la rueda ? Este es uno de los puntos para mi mas importante: Un editor agil, rapido, ayuda en linea, posicionamientos,.... 3.- En un primera version se puede integrar de manera "sencilla": Gestor de proyectos, librerias, recursos, editor, gestor de compilacion, enlazado. Para de una manera mas transparente e independiente añadir facilmente otros componentes como por ejemplo un gestor de db, ayudas, reporting. 4.- Todo y este enfoque que digo "sencillo", evidentemente ya comporta un enorme esfuerzo q implica recursos y valoracion 5.- Este IDE te ayudaria a poner quizas un poco de orden e "higienizar" tu sistema, pero NO ha hacer mejores programas <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> (pero esto es otro tema... <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> )
Codigo vs Recursos
Suscribo lo dicho por Carles. Pretender hacer compatible FWH con FWMac es casi un sueño . FWH al final hace llamadas a las funciones del api de windows , al igual FWMAc hace llamadas a los objetos y metodos de los distintos apis de macosx . Los apis de uno y otro son diferentes totalmente , incluso en construcción , uno es totalmente objeto el otro en muchos casos puro C . Los controles son diferentes en ambos entornos , muchos de los controles que usamos en windows no existen en MAC y otros muchos de mac no existen en windows . La filosofia de uso es diferente tambien , yo no recuerdo en windows de usar en un programa el drag&drop mas que como "adorno" o para usar la papelera <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> , en mac es "el espiritu" de uso del sistema. La impresión en mac funciona totalmente diferente , etc, etc ,etc . Cada aspecto del SO es diferente , y sin entrar en mejor o peor ,hacer que funcione igual o es usando como java o Realbasic una capa de runtime intermedio o no se puede . Por concepto FWH no es eso sino llamadas directas a api asi que o se hace un nuevo FWH o olvidarse de esto. Lo que se pretende es que partiendo de una sintaxis conocida y similar se puedan adaptar programas con rapidez aprovechando todo el código de los procesos y haciendo pocos cambios en el codigo relacionado con los controles , pero nunca que un codigo funcione en otro sistema. En cuanto el tema del IDE , uso Xmate con buenos resultados ,y solo hecho de menos un "generador de codigo visual" para construir los dialogos rapido como el rayo ,propio de fivetech .Veo que otras opciones existen , para Recursos Pellesc funciona perfecto y es free , asi que poco mas necesitaría salvo "cosillas pendientes" que se van arreglando. Saludos.
Codigo vs Recursos
Carlos y Manuel, Muchas gracias por expresar vuestro punto de vista. Lógicamente la compatibilidad Mac/Linux/Windows no es fácil pero tampoco tan imposible. En todo caso, si que sería posible un grado mucho mayor que el actual y, desde luego, que el núcleo de las clases de Fivewin funcionen en ellas. Claro que probablemente TVistaMenu no funcione, pero esto es salvable. Y además, en todo caso, esto hay que [b:2sltpx5m]pagarlo[/b:2sltpx5m]. Tampoco decís nada sobre Fiveweb, que es otra de las líneas de futuro del producto. Y esta línea, además, permite que la aplicación corra sobre cualquier plataforma. Un chico brasileño de 23 años, insolvente y timador, ha mostrado que es posible. Fácil no es, pero es posible desde luego, y también hay que pagar por ello. Pero si no pensamos en el futuro y pensamos que lo que tenemos es lo mejor del mercado corremos el riesgo de quedarnos solos. Un vistazo a la actividad de los foros y nuevas incorporaciones no corrobora un sentimiento tan optimista.
Codigo vs Recursos
Mgsoft, [quote:1djk4t3z] Tampoco decís nada sobre Fiveweb, que es otra de las líneas de futuro del producto. Y esta línea, además, permite que la aplicación corra sobre cualquier plataforma. Un chico brasileño de 23 años, insolvente y timador, ha mostrado que es posible. Fácil no es, pero es posible desde luego, y también hay que pagar por ello.[/quote:1djk4t3z] Recuerdas las primeras pantallas ? Esto hace 4 años que esta hecho --> <!-- m --><a class="postlink" href="http://www.soyos.net/tl_files/demos/Windows-7-UI-and-Windows-Aero-for-Websites/">http://www.soyos.net/tl_files/demos/Win ... -Websites/</a><!-- m --> Sobre Fivewin Web Interface, vamos a ver como se desarrolla..., pero tambien ten en cuenta que si quieres entrar en este mundo de Inet, tendras te guste o no, empezar a mirarte temas relacionados y lenguajes ya se de parte del cliente como javascript a cara servidor como php...Noesperes la formula magica q te resuleva todas las situaciones. El Fiveweb este de brasil, no se como funciona pero intuyo q se debe programar en harbour, el cual genera un exe que sera ejecutado como un cgi por un servidor q te lo permita. Aqui ya te empiezan las limitaciones, el depender de un proveedor o de una maquina que te permita esto con sus principales desventajas y limitaciones, pero vuelvo decir q tampoco lo he visto y perdonad si me equivoco. [quote:1djk4t3z]Pero si no pensamos en el futuro y pensamos que lo que tenemos es lo mejor del mercado corremos el riesgo de quedarnos solos.[/quote:1djk4t3z] Solos, pero resistiremos jajaja <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Codigo vs Recursos
Carles, Por cierto, enhorabuena por tu diseñador de documentos, tiene muy buena pinta la verdad. Y muchas gracias por donarlo opensource. Fiveweb trabaja con IIS y Apache, funcionando tanto bajo Linux y Windows. Pero el que mucho abarca nada aprieta... Por eso, creo que debería escogerse un servidor web con el que sea más fácil la portabilidad (IIS o Apache). Para dar servicio con la aplicación es necesario tener un servidor dedicado a tal fin. Ahora son bastante asequibles. Pero no es posible lo que alguno quería con Fiveweb, y es poder meterlo en un hosting compartido tipo Arsys o Piensasolutions. Antonio ha empezado a crear su propio servidor web. Creo que humildemente no es la opción, porque llevaría mucho tiempo su desarrollo y, además, solo funciona en Crome. Por el contrario, Laiton consiguió en muy poco tiempo hacer algo bastante chulo bajo IIS y Apache. Debería escogerse el servidor web más potente y que permitiera la portabilidad de un modo más fácil.
Codigo vs Recursos
Bueno, pues ahí va también mi opinión, A mi modo de ver prioridad absoluta a FiveWeb. Si el futuro es 'Online' y sistemas que ya incorporan o usan browsers, entonces si tengo FiveWeb, a 'bote pronto' creo que puedo prescindir de FiveMac y FiveLinux en un porcentage importante de situaciones. Y después un diseñador de ventanas y diálogos que genere código Fivewin. Un IDE como tal ya lo estoy supliendo actualmente a 'mano', y me es más costoso crear/modificar cada vez una ventana a mano que no substituir la funcionalidad de un IDE cuando empiezo un proyecto. En fin, un saludo.
Codigo vs Recursos
Totalmente de acuerdo contigo Carlos. Creo que Fiveweb es la prioridad. Y también un editor tipo Workshop. A ver si llegan los reyes a Fivetech <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->.
Codigo vs Recursos
Totalmente de acuerdo con lo de Fiveweb. En cuanto al IDE creo que, a estas alturas, es absolutamente prescindible para la mayoría de nosotros.
Codigo vs Recursos
hola Claro que si, FiveWeb creo que es lo que necesitamos para ser competitivos. y claro los mejores <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Codigo Barra - Cantidad de Caracteres
Estimados Amigos.... Estoy imprimiendo códigos barras con BARLIB2, y el codigo a generar son de 'x xxxxx x' osea 10 caracteres, y veo que la librería le agrega espacios en blanco luego de los caracteres enviado, y esto hace que el código impreso sea mas largo de lo que lo necesito. la pregunta..... es posible que me arme el código barra con solo los caracteres enviado ?, sin los espacios en blanco. gracias david
Codigo Barra - Cantidad de Caracteres
Alguien ha modificado la clase para generar el codigo barra con solo los caracteres que desea crear dicho codigo david
Codigo Barra - Cantidad de Caracteres
Muestra como usted genera el código de barras. Salu2
Codigo Barra - Cantidad de Caracteres
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=17&t=19518">viewtopic.php?f=17&t=19518</a><!-- l -->
Codigo EAN13
Compañeros, buenas tardes: Tengo un artículo cuyo código es "3" y quiero que genere el código EAN13 correspondiente. Lo genera, pero cuando leo el código de barras con la pistola laser me lo traduce en "30000000000008" ¿Cómo tengo que hacer para que lo traduzca como "3" ? Mil gracias LORENZO.
Codigo EAN13
Hola Loren El ultimo es el dígito verificador del codigo de barras que generaste. Una opcion sería leer el los primeros 12 digitos del codigo y descartar el digito 13. La otra es guardar en tu base de datos el codigo con el digito verificador como valor de busqueda.
Codigo FoxPro para llamar funciones DLL Equivalente FW?
Saludos, Actualmente estamos migrando código de aplicación FoxPro hacia FW, en este caso llamadas a funciones DLL de la impresora fiscal Epson. [code=fw:hnqht2ub]<div class="fw" id="{CB}" style="font-family: monospace;"><br />DECLARE STRING PFabrefiscal IN pnpdll.dll STRING,STRING<br />DECLARE STRING PFtotal IN pnpdll.dll<br />DECLARE STRING PFrepz IN pnpdll.dll<br />DECLARE STRING PFrepx IN pnpdll.dll<br />DECLARE STRING PFrenglon IN pnpdll.dll STRING,STRING,STRING,STRING<br />DECLARE STRING PFabrepuerto IN pnpdll.dll STRING<br />DECLARE STRING PFcierrapuerto IN pnpdll.dll<br />DECLARE STRING PFDisplay950 IN pnpdll.dll STRING<br />DECLARE STRING PFAbreNF IN pnpdll.dll STRING<br />DECLARE STRING PFLineaNF IN pnpdll.dll STRING<br />DECLARE STRING PFCierraNF IN pnpdll.dll<br />DECLARE STRING PFCortar IN pnpdll.dll<br />DECLARE STRING PFTfiscal IN pnpdll.dll STRING<br />DECLARE STRING PFparcial IN pnpdll.dll<br />DECLARE STRING PFSerial IN pnpdll.dll<br />DECLARE STRING PFtoteconomico IN pnpdll.dll<br />DECLARE STRING PFCancelaDoc IN pnpdll.dll STRING,STRING<br />DECLARE STRING PFGaveta IN pnpdll.dll<br />DECLARE STRING PFDevolucion IN pnpdll.dll STRING,STRING,STRING,STRING,STRING,STRING<br /><br />&nbsp;</div>[/code:hnqht2ub]
Codigo FoxPro para llamar funciones DLL Equivalente FW?
[url:rwv3otlg]http&#58;//www&#46;pctoledo&#46;com&#46;br/forum/viewtopic&#46;php?f=2&t=15302[/url:rwv3otlg] Saludos.
Codigo FoxPro para llamar funciones DLL Equivalente FW?
Kariña Saludos y muchas gracias, vamos a probar con este código cambiando el nombre de la DLL, también me sirve de ejemplo.
Codigo Morse en FWH ( SOLUCIONADO ) :)
Hola Equipo, alguien puede traducir este codigo en FWH ? algun guru ? saludos. [code=fw:1ot79qpi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />** Text to Morse Code Converter<br />**<br />** Copyright (C) 2005 Ramón E. Torres Salomón<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><span style="color: #00D7D7;">#include</span> <string.h><br /><span style="color: #00D7D7;">#include</span> <ctype.h><br /><br />#ifdef _MSC_VER<br /><span style="color: #00D7D7;">#include</span> <windows.h><br />#else<br /><span style="color: #00D7D7;">#include</span> <dos.h><br />#endif<br /><br /><span style="color: #00D7D7;">#define</span> MORSE_BEEP_FREQ        <span style="color: #000000;">800</span> <span style="color: #B900B9;">// 0.8KHz</span><br /><br /><span style="color: #B900B9;">// Timers</span><br /><span style="color: #00D7D7;">#define</span> MORSE_DOT_TIME        <span style="color: #000000;">70</span><br /><span style="color: #00D7D7;">#define</span> MORSE_DASH_TIME        <span style="color: #000000;">210</span><br /><span style="color: #00D7D7;">#define</span> MORSE_CHARACTER_SEPARATION  MORSE_DOT_TIME*<span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> MORSE_WORD_SEPARATION    MORSE_DOT_TIME*<span style="color: #000000;">7</span><br /><br /><span style="color: #B900B9;">// Functions prototipes</span><br />void playsound<span style="color: #000000;">&#40;</span>int note, int duration<span style="color: #000000;">&#41;</span>;<br />void morse<span style="color: #000000;">&#40;</span>char c<span style="color: #000000;">&#41;</span>;<br /><br />int main<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />  char buffer<span style="color: #000000;">&#91;</span><span style="color: #000000;">256</span><span style="color: #000000;">&#93;</span>;<br /><br />  printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Raymondjavaxx Text to Morse Code Converter<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />  printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"------------------------------------------<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />  printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Type a text and press enter: "</span><span style="color: #000000;">&#41;</span>;<br />  gets<span style="color: #000000;">&#40;</span>buffer<span style="color: #000000;">&#41;</span>;<br /><br />  int x=<span style="color: #000000;">0</span>;<br />  <span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span>buffer<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #000000;">&#123;</span><br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>buffer<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">' '</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />      printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />      <span style="color: #00C800;">while</span><span style="color: #000000;">&#40;</span>buffer<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">' '</span><span style="color: #000000;">&#41;</span><br />        x++;<br /><br />      <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>buffer<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> == <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">break</span>;<br /><br />#ifdef _MSC_VER<br />      <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_WORD_SEPARATION<span style="color: #000000;">&#41;</span>;<br />#else<br />      delay<span style="color: #000000;">&#40;</span>MORSE_WORD_SEPARATION<span style="color: #000000;">&#41;</span>;<br />#endif<br />    <span style="color: #000000;">&#125;</span><br />    morse<span style="color: #000000;">&#40;</span>buffer<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />    x++;<br />  <span style="color: #000000;">&#125;</span><br /><br />  system<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"PAUSE"</span><span style="color: #000000;">&#41;</span>;<br />  <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">/*********<br />* func: morse<br />* desc: morse parsing function<br />********************************************/</span><br />void morse<span style="color: #000000;">&#40;</span>char c<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />  char code<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> = <span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>;<br /><br />  <span style="color: #00C800;">switch</span><span style="color: #000000;">&#40;</span>toupper<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #000000;">&#123;</span><br />  <span style="color: #B900B9;">// Letter Morse</span><br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'A'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".-"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'B'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-..."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'C'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-.-."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'D'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-.."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'E'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'F'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"..-."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'G'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"--."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'H'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"...."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'I'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'J'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-.-."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'K'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-.-"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'L'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".-.."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'M'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"--"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'N'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'O'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"---"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'P'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".--."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'Q'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"--.-"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'R'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".-."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'S'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"..."</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'T'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'U'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"..-"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'V'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"...-"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'W'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".--"</span><span style="color: #000000;">&#41;</span>;  <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'X'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-..-"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'Y'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-.--"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'Z'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"--.."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br /><br />  <span style="color: #B900B9;">// Digit Morse </span><br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'0'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-----"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'1'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".----"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'2'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"..---"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'3'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"...--"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'4'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"....-"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'5'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"....."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'6'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"-...."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'7'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"--..."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'8'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"---.."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'9'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"----."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br /><br />  <span style="color: #B900B9;">// Others</span><br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'.'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">".-.-.-"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">','</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"--..--"</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #00C800;">case</span> <span style="color: #ff0000;">'?'</span>: <span style="color: #000000;">strcpy</span><span style="color: #000000;">&#40;</span>code, <span style="color: #ff0000;">"..--.."</span><span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br /><br />  <span style="color: #00C800;">default</span>: <span style="color: #000000;">printf</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"[invalid character '%c']<span style="color: #000000;">\n</span>"</span>, c<span style="color: #000000;">&#41;</span>; <span style="color: #00C800;">break</span>;<br />  <span style="color: #000000;">&#125;</span><br /><br />  <span style="color: #00C800;">for</span><span style="color: #000000;">&#40;</span>int i=<span style="color: #000000;">0</span>; i<<span style="color: #000000;">8</span>; i++<span style="color: #000000;">&#41;</span><br />  <span style="color: #000000;">&#123;</span><br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>code<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">'-'</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />      printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%c"</span>, code<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />      playsound<span style="color: #000000;">&#40;</span>MORSE_BEEP_FREQ, MORSE_DASH_TIME<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">else</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>code<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> == <span style="color: #ff0000;">'.'</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />      printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%c"</span>, code<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;<br />      playsound<span style="color: #000000;">&#40;</span>MORSE_BEEP_FREQ, MORSE_DOT_TIME<span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br />  <span style="color: #000000;">&#125;</span><br /><br />  printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">/*********<br />* func: playsound<br />* desc: play a note with pc internal speaker<br />********************************************/</span><br />void playsound<span style="color: #000000;">&#40;</span>int note, int duration<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />#ifdef _MSC_VER<br />  <span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>note, duration<span style="color: #000000;">&#41;</span>;<br />  <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_CHARACTER_SEPARATION<span style="color: #000000;">&#41;</span>;<br />#else<br />  sound<span style="color: #000000;">&#40;</span>note<span style="color: #000000;">&#41;</span>;<br />  delay<span style="color: #000000;">&#40;</span>duration<span style="color: #000000;">&#41;</span>;<br />  nosound<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />  delay<span style="color: #000000;">&#40;</span>MORSE_CHARACTER_SEPARATION<span style="color: #000000;">&#41;</span>;<br />#endif<br /><span style="color: #000000;">&#125;</span></div>[/code:1ot79qpi]
Codigo Morse en FWH ( SOLUCIONADO ) :)
[quote="Jairo Barbosa":2w88afwi]Biel Saludo Cordial Te pido respetuosamente que modifiques tu suposición y reconsidere que en este foro también nos encontramos personas en vías de aprendizaje "Novatos" y gracias a personas como usted, que con su gran sapiencia en el tema alimentan el deseo de conocimientos de este maravilloso trabajo FiveWin. [/quote:2w88afwi] Jairo, nada tengo contra los novatos, en informatica uno siempre esta aprendiendo, yo mismo soy un novato en muchas areas. Lo que supuse en mi post es que partimos de una base minima, programador, y despues apartir de esa base los hay que saben mas, menos, que son expetos en determinadas areas etc. Yo aprendo mucho de los foros, buscando, viendo código, probando, ... Si me lo dan hecho, poco aprendere, eso es lo que quise expresar en mi mensaje. Yo creo que lo que se pedia, pasar a xHarbour y un mensaje de argument error de una función estandar, cualquiera con dedicarle un mínimo de esfuerzo es capaz de resolverlo. De hecho veo que lo has resuelto, dandole un valor a la variable cStr. Esa varialble no se inicializaba dentro de la función porque se supone que recibe la llamada con el parametro ya asignado. En cuanto a la velocidad y al peso de puntos y rayas, lo que esta definido en la cabecera son los estandares, lo ideal es modificar WPM, que baja la velocidad de transmisión y hace mas largos puntos y rayas, pero mantiene los pesos entre puntos rayas y espacios. Pero evidentemente puedes ponerlos a tu gusto, si eres radioaficionado y sabes CW no tendras problema en adecuarlo. 73 de EA6DD
Codigo Morse en FWH ( SOLUCIONADO ) :)
No es exactamente igual a la que cuelgas, pero hace lo mismo. Str2Morse("Hola mundo") Por curiosidad, donde vas a usar la función. [code=fw:1mloevu0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br />BielSys 2012 EA6DD<br />*/</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#define</span> MORSE_BEEP_FREQ        <span style="color: #000000;">800</span> <span style="color: #B900B9;">// 0.8KHz</span><br /><span style="color: #B900B9;">// Timers</span><br /><span style="color: #00D7D7;">#define</span> WPM                         <span style="color: #000000;">20</span>  <span style="color: #B900B9;">//Palabras por minuto</span><br /><span style="color: #00D7D7;">#define</span> MORSE_DOT_TIME              <span style="color: #000000;">&#40;</span><span style="color: #000000;">1200</span> / WPM<span style="color: #000000;">&#41;</span>        <span style="color: #B900B9;">//Tiempo en milisegundos</span><br /><span style="color: #00D7D7;">#define</span> MORSE_DASH_TIME             MORSE_DOT_TIME * <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> MORSE_CHARACTER_SEPARATION  MORSE_DOT_TIME * <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> MORSE_WORD_SEPARATION       MORSE_DOT_TIME * <span style="color: #000000;">7</span><br /><span style="color: #B900B9;">//--------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> Str2Morse<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> cDig,cDashDot,hAlfa:=AlfabetoMorse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   cStr:=AllTrim<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><br />   hb_hCaseMatch<span style="color: #000000;">&#40;</span> hAlfa, .F. <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">FOR</span> EACH cDig IN cStr<br />      <span style="color: #00C800;">IF</span> cDig!=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">IF</span> hb_hHasKey<span style="color: #000000;">&#40;</span>hAlfa,cDig<span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">FOR</span> EACH cDashDot IN hAlfa<span style="color: #000000;">&#91;</span>cDig<span style="color: #000000;">&#93;</span><br />               <span style="color: #00C800;">IF</span>  cDashDot == <span style="color: #ff0000;">"-"</span><br />                  <span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>MORSE_BEEP_FREQ,MORSE_DASH_TIME <span style="color: #000000;">&#41;</span><br />               <span style="color: #00C800;">ELSE</span><br />                  <span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>MORSE_BEEP_FREQ,MORSE_DOT_TIME<span style="color: #000000;">&#41;</span><br />               <span style="color: #00C800;">ENDIF</span><br />               <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_DOT_TIME<span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">NEXT</span><br />            <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_CHARACTER_SEPARATION<span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br />      <span style="color: #00C800;">ELSE</span><br />         <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_WORD_SEPARATION<span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">NEXT</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//-------------------------------</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> AlfabetoMorse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> hAlfa:=hb_hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">' '</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">" "</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'A'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'B'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-..."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'C'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.-."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'D'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'E'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'F'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..-."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'G'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'H'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"...."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'I'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'J'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.-."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'K'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'L'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-.."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'M'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'N'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'O'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"---"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'P'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".--."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'Q'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--.-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'R'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'S'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'T'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'U'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'V'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"...-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'W'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".--"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'X'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-..-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'Y'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.--"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'Z'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--.."</span><br />   <span style="color: #B900B9;">// Digit Morse</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'0'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-----"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'1'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".----"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'2'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..---"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'3'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"...--"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'4'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"....-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'5'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"....."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'6'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-...."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'7'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--..."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'8'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"---.."</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'9'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"----."</span><br />   <span style="color: #B900B9;">// Others</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'.'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-.-.-"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">','</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--..--"</span><br />   hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'?'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..--.."</span><br /><span style="color: #00C800;">RETURN</span> hAlfa<br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SLEEP</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">BEEP</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   <span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:1mloevu0]
Codigo Morse en FWH ( SOLUCIONADO ) :)
Hola Gabriel, gracias por responder, voy a probar, Hay programas que traducen las letras a codigo morse pero ninguno traduce la letra [b:38t64bkf]ñ[/b:38t64bkf] el codigo morse lo usan los militares, la verdad desconozco para que jeje. saludos.
Codigo Morse en FWH ( SOLUCIONADO ) :)
por cierto Biel, la funcion Str2Morse("Hola mundo") es para harbour ? estoy compilando con xhb y no existe . saludos. gracias..
Codigo Morse en FWH ( SOLUCIONADO ) :)
Tambien al compilar la funcion con harbour, no encuentra la funcion, de seguro me falta alguna lib, <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Codigo Morse en FWH ( SOLUCIONADO ) :)
Cesar, me parece que la Funcion esta incluida en el codigo que coloca Biel en su mensaje ...
Codigo Morse en FWH ( SOLUCIONADO ) :)
Como te comentan el código de la función es el que te incluyo en el mensaje. Esta probado con Harbour, puede que para compilar en xHarbour haya que hacer algún cambio en las funciones relacionadas con el uso de hash.
Codigo Morse en FWH ( SOLUCIONADO ) :)
Gracias Biel, la funcion funciona de maravilla, y efectivamente solo esta para harbour pero mas que suficiente para lo que lo necesito Saludos.
Codigo Morse en FWH ( SOLUCIONADO ) :)
run ok onòy with harbour ..how converte it for xharbour ?
Codigo Morse en FWH ( SOLUCIONADO ) :)
Biel buenas noches Al compilar el código que cuelgas me da este error, por favor me ayudas? me interesa el ejemplo. URL=http://imageshack.us/photo/my-images/41/morse.jpg/][img:16xkxiak]http&#58;//img41&#46;imageshack&#46;us/img41/667/morse&#46;jpg[/img:16xkxiak][/URL] Uploaded with [url=http&#58;//imageshack&#46;us:16xkxiak]ImageShack.us[/url:16xkxiak] Muy agradecido Jairo Barbosa FWH 1204 Harbour xDevstudio, xmate
Codigo Morse en FWH ( SOLUCIONADO ) :)
Asumo que todos somos programaodores, luego pasar de harbour a xharbour en este caso no tiene mayor problema que buscar las funciones sinonimas para el uso de hash. (hb_hash => hash, etc), o si me apuras siguiendo la misma lógica usar alguna alternativa al uso de la tabla hash. Error BASE/2022 -> Error description: Error BASE/2022 Argument error: ALLTRIM Luego el error esta en el parametro que se le pasa a Alltrim, posiblemente una cadena vacia o NIL(revisa la llamada a la función). La funcíón Str2Morse no incorpora control de paramentros, pero es sencillo añadirselo para evitar este error.
Codigo Morse en FWH ( SOLUCIONADO ) :)
Biel Saludo Cordial Muchas gracias por su respuesta. Te pido respetuosamente que modifiques tu suposición y reconsidere que en este foro también nos encontramos personas en vías de aprendizaje "Novatos" y gracias a personas como usted, que con su gran sapiencia en el tema alimentan el deseo de conocimientos de este maravilloso trabajo FiveWin. Un Fuerte abrazo y aprovecho la oportunidad para desearle una Feliz Navidad y un año venidero lleno de éxitos, que cada paso que camines sean Bendecidos junto a los seres que tu mas amas
Codigo Morse en FWH ( SOLUCIONADO ) :)
agregen al inicio [code=fw:29vrkzkq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /> </div>[/code:29vrkzkq] para que sirva tanto para xharbour como para harbour. salu2 carlos vargas
Codigo Morse en FWH ( SOLUCIONADO ) :)
como explicacion existen tanto en harbour como en xharbour funciones con tareas similares y nombres un poco diferentes los hash, try..cacth, etc. el hbcompat.ch existe en ambos compiladores y lo que hace es algo como: [code=fw:12czsf8v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifdef __XHARBOUR__<br />&nbsp; &nbsp;...<br />&nbsp; &nbsp;<span style="color: #B900B9;">/* Hash item functions */</span><br />&nbsp; &nbsp;#xtranslate hb_Hash<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> Hash<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate hb_HHasKey<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; => HHasKey<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate hb_HPos<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> HGetPos<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate hb_HGet<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> HGet<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate hb_HSet<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> HSet<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate hb_HDel<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=> HDel<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;...<br />#else<br />&nbsp; &nbsp;...<br />&nbsp; &nbsp;<span style="color: #B900B9;">/* Hash item functions */</span><br />&nbsp; &nbsp;#xtranslate Hash<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => hb_Hash<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate HHasKey<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;=> hb_HHasKey<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate HGetPos<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;=> hb_HPos<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate HGet<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => hb_HGet<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate HSet<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => hb_HSet<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;#xtranslate HDel<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#91;</span><x,...><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => hb_HDel<span style="color: #000000;">&#40;</span> <x> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;...<br />#endif<br />&nbsp;</div>[/code:12czsf8v]
Codigo Morse en FWH ( SOLUCIONADO ) :)
Carlos Muchas gracias. Mira si se compila el siguiente código y lo ejecutas, escucharas en telegrafía el nombre contenido en cStr.le di mas tiempo al espacio para que se pueda entender mejor. Disculpa que quiera compartir ese sencillo ejemplo contigo, pero en la nostalgia que abrigan los años que tengo de ser radio aficionado me llenan de alegría mas aun cuando se puede hacer un sof que pueda modular este viejo sistema de comunicaciones es sencillamente fascinante, ya no se usa, solo en las bandas de Radio aficionados y solo en concursos, mis indicativos de llamado son HK3DQC [code=fw:20m7xzy4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br />BielSys 2012 EA6DD<br />*/</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> MORSE_BEEP_FREQ &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">800</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// 0.8KHz</span><br /><span style="color: #B900B9;">// Timers</span><br /><span style="color: #00D7D7;">#define</span> WPM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">20</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//Palabras por minuto</span><br /><span style="color: #00D7D7;">#define</span> MORSE_DOT_TIME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span><span style="color: #000000;">1200</span> / WPM<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//Tiempo en milisegundos</span><br /><span style="color: #00D7D7;">#define</span> MORSE_DASH_TIME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MORSE_DOT_TIME * <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> MORSE_CHARACTER_SEPARATION &nbsp;MORSE_DOT_TIME * <span style="color: #000000;">13</span><br /><span style="color: #00D7D7;">#define</span> MORSE_WORD_SEPARATION &nbsp; &nbsp; &nbsp; MORSE_DOT_TIME * <span style="color: #000000;">7</span><br /><span style="color: #B900B9;">//--------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> Str2Morse<span style="color: #000000;">&#40;</span>cStr<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cDig,cDashDot,hAlfa:=AlfabetoMorse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cStr:=<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"F+I+V+E+W+I+N"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_hCaseMatch<span style="color: #000000;">&#40;</span> hAlfa, .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> EACH cDig IN cStr<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> cDig!=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> hb_hHasKey<span style="color: #000000;">&#40;</span>hAlfa,cDig<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> EACH cDashDot IN hAlfa<span style="color: #000000;">&#91;</span>cDig<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> &nbsp;cDashDot == <span style="color: #ff0000;">"-"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>MORSE_BEEP_FREQ,MORSE_DASH_TIME <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>MORSE_BEEP_FREQ,MORSE_DOT_TIME<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_DOT_TIME<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_CHARACTER_SEPARATION<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span>MORSE_WORD_SEPARATION<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//-------------------------------</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> AlfabetoMorse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hAlfa:=hb_hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">' '</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">" "</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'A'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'B'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-..."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'C'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.-."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'D'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'E'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'F'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..-."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'G'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'H'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"...."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'I'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'J'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.-."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'K'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'L'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-.."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'M'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'N'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'O'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"---"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'P'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".--."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'Q'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--.-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'R'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'S'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'T'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'U'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'V'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"...-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'W'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".--"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'X'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-..-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'Y'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-.--"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'Z'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--.."</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Digit Morse</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'0'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-----"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'1'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".----"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'2'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..---"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'3'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"...--"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'4'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"....-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'5'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"....."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'6'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"-...."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'7'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--..."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'8'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"---.."</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'9'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"----."</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Others</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'.'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">".-.-.-"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">','</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"--..--"</span><br />&nbsp; &nbsp;hAlfa<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'?'</span><span style="color: #000000;">&#93;</span>:= <span style="color: #ff0000;">"..--.."</span><br /><span style="color: #00C800;">RETURN</span> hAlfa<br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"windows.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SLEEP</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">Sleep</span><span style="color: #000000;">&#40;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">BEEP</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Beep</span><span style="color: #000000;">&#40;</span>hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, hb_parnl<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:20m7xzy4] Un abrazo Mis deseos que Dios este Bendiciendo tus pasos Atentamente Jairo Barbosa
Codigo Morse en FWH ( SOLUCIONADO ) :)
Gracias Carlos, ya funciona para harbour/xharbour. Gracias saludos <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Codigo Morse en FWH ( SOLUCIONADO ) :)
Bien un fuerte abrazo. Gracias por sus palabras, pasa que para mi es muy importante este foro, por un lado yo no vivo de la programación es solo pasión por FW y en segundo lugar yo como novato me pongo mis propias tareas de aprendizaje y cuando no encuentro soluciones me veo en la necesidad de hacer las preguntas aunque para algunos no les parezca tema de debate. Este contacto amerita una QSL especial total envíame las ordenadas. Gracias por tu colaboración he interés con los novatos Un Abrazo Jairo
Codigo QR
Hola a todos y feliz Navidad, Por si alguien no lo sabe, como regalo de Navidad, Mindaugas Kavaliuskas ha dejado en la lista de contribuciones de harbour un fuente .c para generar codigos QR. [quote:1ddpkpql] Revision: 17155 <!-- m --><a class="postlink" href="http://harbour-project.svn.sourceforge.net/harbour-project/?rev=17155&view=rev">http://harbour-project.svn.sourceforge. ... 5&view=rev</a><!-- m --> Author: snaiperis Date: 2011-12-23 16:00:44 +0000 (Fri, 23 Dec 2011) Log Message: ----------- 2011-12-23 18:00 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + contrib/hbzebra/qrcode.c * contrib/hbzebra/hbzebra.ch * contrib/hbzebra/hbzebra.hbp * contrib/hbzebra/hbzebra.hbx + QR Code ; Christmas gift for Harbour project <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> ; TODO: encoding optimisation using mode switching * contrib/hbzebra/hbzebra.h * contrib/hbzebra/core.c + hb_bitbuffer_buffer(), hb_bitbuffer_not(), hb_bitbuffer_cat_int_rev() * formatting * contrib/hbzebra/tests/testcair.prg * contrib/hbzebra/tests/testhpdf.prg * contrib/hbzebra/tests/testwin.prg * updated to include QR Code * contrib/hbzebra/datamtrx.c * minor modification: code text support Modified Paths: -------------- trunk/harbour/ChangeLog trunk/harbour/contrib/hbzebra/core.c trunk/harbour/contrib/hbzebra/datamtrx.c trunk/harbour/contrib/hbzebra/hbzebra.ch trunk/harbour/contrib/hbzebra/hbzebra.h trunk/harbour/contrib/hbzebra/hbzebra.hbp trunk/harbour/contrib/hbzebra/hbzebra.hbx trunk/harbour/contrib/hbzebra/tests/testcair.prg trunk/harbour/contrib/hbzebra/tests/testhpdf.prg trunk/harbour/contrib/hbzebra/tests/testwin.prg [/quote:1ddpkpql] El nivel de Harbour es de super high liston. Un curioso blog del "mundo QR" es este sitio <!-- m --><a class="postlink" href="http://www.qrcode.es/">http://www.qrcode.es/</a><!-- m --> Saludos
Codigo QR
Buenas tardes compañeros, estoy trabajando desde un script con las librerías harupdf de harbour. Uso la función hb_zebra_create_code128(), para el código de barras y funciona, pero la función hb_zebra_create_qrcode(), que es para generar código QR, me tira el siguiente error: "Unknown or unregistered symbol HD_ZEBRA_CREATE_QRCODE". Por qué me reconoce hb_zebra_create_code128() y no hb_zebra_create_qrcode(), si están en la misma librería. Gracias de antemano.
Codigo QR
Santi, Por el error que te dá parece que ha sido un baile de letras: "Unknown or unregistered symbol H[color=#FF0000:gikhum61]D[/color:gikhum61]_ZEBRA_CREATE_QRCODE"
Codigo QR
Hola Antonio, escribí mal el error, pero la función la escribí bien, hZebra := hb_zebra_create_qrcode()
Codigo QR
Prueba a usar: extern HB_ZEBRA_CREATE_QRCODE al comienzo del PRG en donde la usas
Codigo QR
Antonio, sigue sin andar. Me pasa lo mismo de siempre, cuando lo compilo desde el programa anda lo más bien, pero desde el script me tira ese error.
Codigo QR
Como ejecutas el script ? Puedes mostrar el código ? Es en la rutina que ejecuta el script en donde debes hacer el extern HB_ZEBRA_CREATE_QRCODE para que el símbolo esté disponible
Codigo QR
[url:2thxan8x]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=40392&sid=604b1a04a24aa394c7bf9f6b3f2940d9[/url:2thxan8x]
Codigo QR
If you do not have any reason not to use FWH, here is a simple program to compile a Script generating QRCode using HBZEBRA and saving to PDF using HARUPDF: [code=fw:232wcbrs]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST FWHARU<br />REQUEST FWZEBRA<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> cScript, oHrb, uRet<br /><br /><span style="color: #0000ff;">TEXT</span> INTO cScript<br /> <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /> <span style="color: #00C800;">function</span> __Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oPrn, oFont<br /><br />&nbsp; &nbsp;TPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">lUseHaruPDF</span> := .t.<br /><br />   <span style="color: #00C800;">PRINT</span> oPrn PREVIEW FILE <span style="color: #ff0000;">"SCRIPT.PDF"</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"VERDANA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">OF</span> oPrn<br />   <span style="color: #0000ff;">PAGE</span><br />   @ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">TEXT</span> <span style="color: #ff0000;">"FWH USING HARUPDF AND HBZEBRA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">6.5</span>,<span style="color: #000000;">0.5</span> INCHES <span style="color: #0000ff;">FONT</span> oFont<br />   @ <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #00C800;">PRINT</span> <span style="color: #0000ff;">TO</span> oPrn <span style="color: #0000ff;">TEXT</span> <span style="color: #ff0000;">"QR Code generated by FWH and saved to PDF"</span> ;<br />      AS BARCODE TYPE <span style="color: #ff0000;">"QR"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> INCHES<br />   <span style="color: #0000ff;">ENDPAGE</span><br />   <span style="color: #0000ff;">ENDPRINT</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />ENDTEXT<br /><br />   cScript  := StrTran<span style="color: #000000;">&#40;</span> cScript, CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span>, CRLF <span style="color: #000000;">&#41;</span><br /><br />   FW_MEMOEDIT<span style="color: #000000;">&#40;</span> cScript <span style="color: #000000;">&#41;</span><br /><br />   oHrb = HB_CompileFromBuf<span style="color: #000000;">&#40;</span> cScript, <span style="color: #ff0000;">"-n"</span>, <span style="color: #ff0000;">"-Ic:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\i</span>nclude"</span>, <span style="color: #ff0000;">"-Ic:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\i</span>nclude"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oHrb <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">TRY</span><br />         uRet = hb_HrbDo<span style="color: #000000;">&#40;</span> hb_HrbLoad<span style="color: #000000;">&#40;</span> oHrb <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      CATCH<br />         ? <span style="color: #ff0000;">"Failed"</span><br />      END<br />   <span style="color: #00C800;">else</span><br />      ? <span style="color: #ff0000;">"empty ohrb"</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:232wcbrs] [url=https&#58;//imageshack&#46;com/i/pocJQ0uvp:232wcbrs][img:232wcbrs]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/924/cJQ0uv&#46;png[/img:232wcbrs][/url:232wcbrs]
Codigo QR
Gracias a todos por la ayuda. Antonio, tu solución funcionó. Gracias!!!
Codigo QR con Easy Report
Buenas noches para todos: De nuevo yo molestando, Lo que pasa es que requiero realizar la impresión de un codigoQR desde EASY REPORT, en la versión FWH1903 viene un prg para compilar con la funciones propias de FWZEBRA. qrcode.prg [url:1uznr5i9]http&#58;//demo&#46;livingo&#46;co/images/codigoqrddatosreales&#46;png[/url:1uznr5i9] Por pantalla se imprime perfectamente, ahora requiero hacerlo desde EasyReport. De antemano gracias
Codigo QR con Easy Report
Buenas tardes... De nuevo yo molestando. Lo que pasa es que requiero imprimir el código QR, estuve tratado de grabar ese archivo en el disco duro y luego pasarlo como imagen, pero hasta ahora sin éxito.Alguien sabe como hacerlo. El Código ejemplo es el siguiente: [code=fw:35w6gwxh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST FWZEBRA<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oWnd, cText, cPrg := cFileSetExt<span style="color: #000000;">&#40;</span> ExeName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"prg"</span> <span style="color: #000000;">&#41;</span><br /><br /><br />    <span style="color: #00C800;">local</span> cadena := <span style="color: #ff0000;">"NumFac: 99999999 FecFac: 20190508 NitFac: 99999999"</span><br />    cadena := cadena + <span style="color: #ff0000;">"DocAdq: 79777777 ValFac: 200000.00 ValIva: 0.00 ValOtroImp: 0.00 ValFacIm: 219000.00"</span><br />    cadena := cadena + <span style="color: #ff0000;">"CUFE: cad2225ed6af9a94dc588d5a56bac"</span><br />    cText :=  cadena<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> cPrg<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> oWnd:<span style="color: #000000;">SayBarCode</span><span style="color: #000000;">&#40;</span> cText, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">"QR-CODE"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:35w6gwxh] De antemano gracias
Codigo QR directamente en fichero .JPG o .PNG
Necesito generar un fichero tipo .JPG o .PNG con un código QR. Hasta ahora he encontrado que lo genera en BMP, pero no me sirve, Lo he buscado pero no doy con ello. Un saludo.
Codigo QR directamente en fichero .JPG o .PNG
[quote="ArgConsulting":oxj9gl36]Necesito generar un fichero tipo .JPG o .PNG con un código QR. Hasta ahora he encontrado que lo genera en BMP, pero no me sirve, Lo he buscado pero no doy con ello. Un saludo.[/quote:oxj9gl36] Mira se ayuda: [url:oxj9gl36]https&#58;//mega&#46;nz/file/cdkXkYqb#57cUNmXXIXTVEazBaRuUcjhpCGpHJ72zLQxLS9vMzOA[/url:oxj9gl36] Regards, saludos.
Codigo QR directamente en fichero .JPG o .PNG
Muchas gracias por tu rápida respuesta, pero... No me sirve porque aunque genera el código con el nombre que le indique, por ejemplo QR.JPG, lo que genera realmente es un BMP internamente, pero con extensión JPG Por cierto a modo de comentario, si en la llamada a la función DLL pongo DLL32 STATIC FUNCTION QRCode(cStr As STRING, cFile As STRING) AS LONG PASCAL FROM "FastQRCode" Lib "QRCodelib.Dll" con Lib en mayuscula, da un error de función invalida ¿? He visto en algún sitio que esta librería tiene varias funciones una de ellas es FastQRCode que admite mas parámetros. Voy a ver si alguno de ellos es el formato del fichero generado. Os cuento. Un saludo
Codigo QR directamente en fichero .JPG o .PNG
ArgConsulting Quizás el FW_SaveImage( cBuffer, cFile ) te ayude.
Codigo QR directamente en fichero .JPG o .PNG
Mira QRCODE.PRG linea: 200, todos los formatos. Saludos.
Codigo QR directamente en fichero .JPG o .PNG
Gracias de nuevo. Por lo que veo hasta ahora hay dos vías para hacer QR. Una esta basada en la dll QRCodelib.dll. y otra basada en hbZebra. Con QRCodelib.dll ya lo he probado con el resultado indicado anteriormente (genera ficheros con la extensión que se quiera pero internamente son BMP). Con hbZebra lo intente hace unos días pero no recuerdo porque no me funciono. Creo recordar que fue porque no encontraba esta librería. Ahora que se "un poco mas" lo voy a retomar y ya os contaré. Quizás os preguntéis porque necesito un QR en JPG. Cuando lo utilizo con la TPrinter, no hay problema pero si lo hago en PDF con la clase THaru, ésta solo admite JPG o PNG. Tengo una clase, la TimPDF que mediante un parámetro hace lo mismo en papel que en PDF, pero necesito un formato que admitan las dos clases (TPrinter y THaru) y este solo es JPG o PNG. Un saludo
Codigo QR: que hago mal ?
Hola amigos del foro. Estoy probando la generacion de codigos QR y tengo este codigo: [code=fw:sjn711j2]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//QR --------------------------------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#Define</span> DC_CALL_STD 0x0020<br /><br /><span style="color: #00D7D7;">#Define</span> TQRCodenEncoding_ALPHA    <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#Define</span> TQRCodenEncoding_BYTE     <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#Define</span> TQRCodenEncoding_NUMERIC  <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#Define</span> TQRCodenEncoding_KANJI    <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#Define</span> TQRCodenEncoding_AUTO     <span style="color: #000000;">4</span><br /><br /><span style="color: #00D7D7;">#Define</span> TQRCodeEC_LEVEL_L        <span style="color: #000000;">0</span> <span style="color: #B900B9;">//( 7 % )                                  </span><br /><span style="color: #00D7D7;">#Define</span> TQRCodeEC_LEVEL_M        <span style="color: #000000;">1</span> <span style="color: #B900B9;">//( 15 % )                                 </span><br /><span style="color: #00D7D7;">#Define</span> TQRCodeEC_LEVEL_Q        <span style="color: #000000;">2</span> <span style="color: #B900B9;">//( 25% )                                  </span><br /><span style="color: #00D7D7;">#Define</span> TQRCodeEC_LEVEL_H        <span style="color: #000000;">3</span> <span style="color: #B900B9;">//( 30% )                                  </span><br /><br /><span style="color: #B900B9;">//------------------------------------//</span><br /><span style="color: #B900B9;">//Ejm: FastQRCode("Rolando Salazar", "D:\QR.BMP")</span><br /><span style="color: #00C800;">Function</span> FastQRCode<span style="color: #000000;">&#40;</span>cTexto, cFile<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// genera codigo qr</span><br /><span style="color: #00C800;">local</span> nResp<br /><span style="color: #00C800;">STATIC</span> qrDLL<br /><br /><span style="color: #00C800;">DEFAULT</span> cTexto := <span style="color: #ff0000;">"SAURO SOFTWARE - Informatica y Sistemas"</span><br /><span style="color: #00C800;">DEFAULT</span> cFile := Tmp<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"QR_"</span>,<span style="color: #ff0000;">".bmp"</span><span style="color: #000000;">&#41;</span><span style="color: #B900B9;">//".\QR.bmp"</span><br /><br /><span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\Q</span>RCodelib.Dll"</span><span style="color: #000000;">&#41;</span><br />   MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Sin Librería de Soporte"</span>,<span style="color: #ff0000;">"Improcedente"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIF</span><br /><br />qrDLL:=LoadLibrary<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\Q</span>RCodelib.Dll"</span> <span style="color: #000000;">&#41;</span><br />nResp:=DllCall<span style="color: #000000;">&#40;</span>qrDLL,DC_CALL_STD,<span style="color: #ff0000;">"FastQRCode"</span>,cTexto,cFile<span style="color: #000000;">&#41;</span><br />FreeLibrary<span style="color: #000000;">&#40;</span>qrDLL<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//------------------------------------//</span><br /><span style="color: #B900B9;">//Ejm: FullQRCode2("Rolando Salazar", "D:\QR.BMP")</span><br /><span style="color: #00C800;">Function</span> FullQRCode2<span style="color: #000000;">&#40;</span>cTexto, cFile, nVersion, lAutoConfigurate, lAutoFit, backColor, barColor, nCorrectionLevel, nEncoding, nMarginpixels, nModuleWidth, nHeight, nWidth<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// genera codigo qr</span><br /><span style="color: #00C800;">local</span> nResp<br /><span style="color: #00C800;">STATIC</span> qrDLL<br /><br /><span style="color: #00C800;">DEFAULT</span> cTexto := <span style="color: #ff0000;">"SAURO SOFTWARE - Informatica y Sistemas"</span><br /><span style="color: #00C800;">DEFAULT</span> cFile := Tmp<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"QR_"</span>,<span style="color: #ff0000;">".bmp"</span><span style="color: #000000;">&#41;</span><span style="color: #B900B9;">//".\QR.bmp"</span><br /><br /><span style="color: #00C800;">DEFAULT</span> nVersion:=<span style="color: #000000;">6</span>,; <span style="color: #B900B9;">//(1 al 39)</span><br />        lAutoConfigurate:=.T.,;<br />    lAutoFit:=.F.,;<br />    backColor:=CLR_WHITE,; <br />    barColor:=CLR_BLACK,;<br />    nCorrectionLevel:=TQRCodeEC_LEVEL_M,;<br />    nEncoding:=TQRCodenEncoding_BYTE,;<br />    nMarginpixels:=<span style="color: #000000;">0</span>,;<br />    nModuleWidth:=<span style="color: #000000;">5</span>,;<br />    nHeight:=<span style="color: #000000;">200</span>,; <br />    nWidth:=<span style="color: #000000;">200</span><br /><br /><span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\Q</span>RCodelib.Dll"</span><span style="color: #000000;">&#41;</span><br />   MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Sin Librería de Soporte"</span>,<span style="color: #ff0000;">"Improcedente"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIF</span><br /><br />qrDLL:=LoadLibrary<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">".<span style="color: #000000;">\Q</span>RCodelib.Dll"</span> <span style="color: #000000;">&#41;</span><br />nResp:=DllCall<span style="color: #000000;">&#40;</span>qrDLL,DC_CALL_STD,<span style="color: #ff0000;">"FullQRCode2"</span>,nVersion,lAutoConfigurate, lAutoFit, backColor, barColor, cTexto, nCorrectionLevel, nEncoding, nMarginpixels, nModuleWidth, nHeight, nWidth, cFile<span style="color: #000000;">&#41;</span><br />FreeLibrary<span style="color: #000000;">&#40;</span>qrDLL<span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span>nResp<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>cFile<span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:sjn711j2] [b:sjn711j2]FastQRCode()[/b:sjn711j2] Funciona perfecto, me genera el archivo .BMP con el QR. [b:sjn711j2]FullQRCode2() [/b:sjn711j2][b:sjn711j2]NO FUNCIONA[/b:sjn711j2], que parametro estoy pasando MAL De antemano, gracias por la ayuda Atentamente Rolando Cochabamba, Bolivia
Codigo SysQuit
Favor si alguien tiene el código de SysQuit. La idea es salir de una ventana GTK Desde ya se agradece cualquier ayuda. Jorge Gayoso Santiago Chile
Codigo SysQuit
[code=fw:44j51ja7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> SYSQUIT <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GtkWidget * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> != hWndMain <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; gtk_widget_destroy<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> GtkWidget * <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;gtk_main_quit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span></div>[/code:44j51ja7]
Codigo SysQuit
Ok, funciona perfecto. Se agradece una vez mas. Saludos desde el sur del mundo. Jorge Gayoso
Codigo almacenado en tablas
Buen dia foro, Existe algun ejemplo de programa donde el codigo o parte de el este almacenado en un campo de tabla y sea llamado desde el ejecutable o por alguna opcion de menu?
Codigo almacenado en tablas
Descarga FiveDBU que incluye todo su código fuente. [url:1z2fxblg]https&#58;//bitbucket&#46;org/fivetech/fivewin-contributions/downloads/fivedbu_20140730&#46;zip[/url:1z2fxblg] Abre una DBF y luego dale a la opción Procesos.
Codigo almacenado en tablas
Tienes otro ejemplo completo en FivEdit.prg: [url:3exn605t]https&#58;//bitbucket&#46;org/fivetech/fivewin-contributions/downloads/fivedit&#46;zip[/url:3exn605t] Dale a la opción "Script" Revisa el código del método RunScript()
Codigo almacenado en tablas
Buenas Tardes Para todos Es posible esto con xharbour? Almacenar código en un archivo de texto para que este fuera del ejecutable? Es para un reporte que necesito modificar a la medida del usuario. [code=fw:1o83ze6o]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> reportesejecutable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />texto:=<span style="color: #ff0000;">"function Test()"</span> + CRLF + CRLF + <span style="color: #ff0000;">" &nbsp; MsgInfo( 'Hello world!' )"</span> + CRLF + CRLF + <span style="color: #ff0000;">"return nil"</span><br />Execute<span style="color: #000000;">&#40;</span> texto <span style="color: #000000;">&#41;</span></div>[/code:1o83ze6o]
Codigo almacenado en tablas
Saludos Puedes ver las funciones HRB*() que ejecuta programas PRG, ademas tambien permite compilar modulos HRB (similar a funciones en DLLS)
Codigo almacenado en tablas
Leandro, FWH proporciona la función Execute(): [code=fw:2735qffi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Execute<span style="color: #000000;">&#40;</span> cCode, ... <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oHrb, cResult, bOldError, uRet<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFWheaders := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lIsDir<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>nclude"</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>nclude"</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\F</span>WH<span style="color: #000000;">\i</span>nclude"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cHBheaders := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lIsDir<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>nclude"</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>nclude"</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\i</span>nclude"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// FReOpen_Stderr ( "comp.log", "w" )</span><br />&nbsp; &nbsp;oHrb = HB_CompileFromBuf<span style="color: #000000;">&#40;</span> cCode, <span style="color: #ff0000;">"-n"</span>, <span style="color: #ff0000;">"-I"</span> + cFWheaders, <span style="color: #ff0000;">"-I"</span> + cHBheaders <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oHrb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; BEGIN SEQUENCE<br />&nbsp; &nbsp; &nbsp; bOldError = ErrorBlock<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | o | DoBreak<span style="color: #000000;">&#40;</span> o <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; uRet = hb_HrbDo<span style="color: #000000;">&#40;</span> hb_HrbLoad<span style="color: #000000;">&#40;</span> oHrb <span style="color: #000000;">&#41;</span>, ... <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; END SEQUENCE<br />&nbsp; &nbsp; &nbsp; ErrorBlock<span style="color: #000000;">&#40;</span> bOldError <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> uRet</div>[/code:2735qffi]
Codigo almacenado en tablas
Gracias Antonio Lo pruebo y comento.
Codigo almacenado en tablas
Antonio Buenas Tardes... Que pena molestar.... estuve tratando de usar la funcion execute() que proporciona fw, así como lo mencionaste, se compila perfectamente, pero al momento de hacer el llamado de la funcion execute. Me arroja un msginfo que dice lo siguiente: this feature is only available with Harbour. Es obvio el mensaje.... Pero yo uso xharbour. Y en este momento requiero ejecutar código almacenado en un archivo de texto o desde una base de datos. Que pena el atrevimiento pero de casualidad tienes un ejemplo mas claro. Saludos
Codigo almacenado en tablas
Leandro, Es que solo Harbour permite hacer eso pues el compilador entero está dentro de una librería. xHarbour no tiene esa capacidad.
Codigo almacenado en tablas
Antonio buenos días Ya logre compilar mi aplicación con Harbour..... Ahora deseo agregar la opción para correr los prg por fuera del ejecutable; dices que miremos el código en el método runscript()... En el siguiente enlace. <!-- m --><a class="postlink" href="https://bitbucket.org/fivetech/fivewin-contributions/downloads/fivedit.zip">https://bitbucket.org/fivetech/fivewin- ... ivedit.zip</a><!-- m --> El problema es que el enlace esta roto.
Codigo almacenado en tablas
Leandro <!-- m --><a class="postlink" href="https://bitbucket.org/fivetech/fivewin-contributions/downloads/FivEdit.zip">https://bitbucket.org/fivetech/fivewin- ... ivEdit.zip</a><!-- m -->
Codigo de Autorización
Estimados Tengo el siguiente problemilla, que hay ocasiones que el sistema necesita una clave maestra para poder siguir el proceso, pero hay que ir al puesto de trabajo e ingresarla, pero la idea es que el sistema pida como un codigo de autorizacion y por telefono darle el codigo, alguien a hecho algo parecido o alguna idea desde ya se agradece..
Codigo de Autorización
Que es lo que necesitas, hacer teleasistencia o un codigo de autorizacion para poder usar tu programa? Como teleasistencia puedes usar varias opciones, algunas de pago y otras free. Desktop remoto de windows, vnc, ultravnc, logmein... espero te sirva.
Codigo de Autorización
Patricio: Hola, podrias hacerlo tipo consulta cheques, haces una llamada a un ejecutivo, el cual genera un codigo de autorizacion en un pc, guardas el codigo generado, la clave quien lo genero, fecha, hora y punto solicitante, luego se entrega al solicitante, quien digita el codigo para ejecutar la opcion, guardas el codigo de autorizacion, clave del solicitante, fecha, hora y datos pricipales del documento que se este procesando, de esta forma tendras, todos los datos al momento de una fiscalizacion. Tambien, podrias hacerlo via algun programa externo tipo Pc-Anywhere, programa que puede generar una llamada a un numero indicado, el cual permitira que una persona en un pc remoto, pueda realizar la digitacion de un codigo, desconectar y permitir que el solicitante puede proceder su proceso. Son las dos formas que conozco, espero te sirva. Saludos, Miguel Rivera Santiago, tu tienes mi cuenta del msn: <!-- e --><a href="mailto:riveraferrada@hotmail.com">riveraferrada@hotmail.com</a><!-- e -->
Codigo de Autorización
muchas Gracias por sus sugerencias En realidad la finalidad de hacer esto es hacer responsable a las personas, y que mejor con un codigo de validación, asi no van a decir que. ¿ que la clave se la pase a tal fulano, que a lo mejor me vieron la clave, etc..
Codigo de Barra
Amigos. Tengo el siguiente codigo que lo he reconstruido de ejemplos en este foro. Los codigos definidos solo por numeros los identifica bien ( en la parte de abajo del code-bar), no asi los que contienen caracteres, ej: "SERX005", de los cuales identifica bien unicamente los numericos. Los caracteres los presenta como numeros; en este caso SERX005 lo transforma a 3568005. Cual sería la forma de que los presente bien? Este es el codigo: [code=fw:3jht0997]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> VerCodeBar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oFont1, oFont2, oFont3, cCode := <span style="color: #ff0000;">"SERX005"</span>, cCode2:= StrZero<span style="color: #000000;">&#40;</span><span style="color: #000000;">123</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oSay1, oSay2, oSay3, oSay4, oSay5, oSay6<br /><br />&nbsp; &nbsp;AddFontResource<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\E</span>AN-13.ttf"</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">//cuando font no esta instalada en windows</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> &nbsp; <span style="color: #0000ff;">SIZE</span> &nbsp;<span style="color: #000000;">00</span>, <span style="color: #000000;">-36</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"EAN-13"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> &nbsp;<span style="color: #000000;">00</span>, <span style="color: #000000;">-36</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont3 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"EAN-13"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> &nbsp;<span style="color: #000000;">20</span>, <span style="color: #000000;">-36</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">630</span>, <span style="color: #000000;">660</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">020</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">SAY</span> oSay1 <span style="color: #0000ff;">PROMPT</span> cCode <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">050</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">SAY</span> oSay2 <span style="color: #0000ff;">PROMPT</span> cCode <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">60</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">090</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">SAY</span> oSay3 <span style="color: #0000ff;">PROMPT</span> cCode <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont3 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">60</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">160</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">SAY</span> oSay4 <span style="color: #0000ff;">PROMPT</span> cCode2 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">40</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">190</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">SAY</span> oSay5 <span style="color: #0000ff;">PROMPT</span> cCode2 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">60</span><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">230</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">SAY</span> oSay6 <span style="color: #0000ff;">PROMPT</span> cCode2 <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont3 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">60</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oFont1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont2:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont3:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;RemoveFontResource<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\E</span>AN-13.ttf"</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">//cuando font no esta instalada en windows</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:3jht0997] Agradezco cualquier comentario.
Codigo de Barra
Francisco: Si no recuerdo mal, el código EAN-13 solo acepta números de hasta 13 de longitud. Saludos
Codigo de Barra
Armando: Gracias por responder. Desconocía eso. Voy a buscar mas información. Saludos.
Codigo de Barras 2D
Hola FiveWinners. Hay alguna libreria o codigo fuente para generar un codigo de barras bidimencional? o alguna sugerencia? Saludos
Codigo de Barras PDF147
Hola amigos He visto que alguna vez alguien ha puesto ésta pregunta en el foro, pero no encuentro respuestas, ahora necesito yo sobre éste tema, a ver si alguien me ayuda. Necesito crear un código de barras de unos 250 dígitos alfanuméricos, y claro, si lo hago con barlib con cualquiera de los tipos normales, me voy a un codigo de 2 líneas, por lo tanto creo que necesito el PDF417, y mi pregunta es cómo puedo generarlo en uno de mis listados, es decir en un listado pongo el cliente, y a continuación el código que al leerlo con un scanner me lea un montón de datos que estén en éste código. Puedo hacerlo con alguna librería five, o con algún programa externo. Gracias y saludos
Codigo de Barras PDF147
Jose Luis, hasta donde he llegado a consultar lo mejor es hablar con el propietario de la pistola lectora, para saber si soporta ese código. Si es así te proporcionará una librería para que puedas enlazarla con distintos lenguajes. Uno de ellos es Visual Basic y otro C, pero estoy a la espera de que me respondan. Un saludo Juanjo [quote="JoseLuis":lmrcl3ls]Hola amigos He visto que alguna vez alguien ha puesto ésta pregunta en el foro, pero no encuentro respuestas, ahora necesito yo sobre éste tema, a ver si alguien me ayuda. Necesito crear un código de barras de unos 250 dígitos alfanuméricos, y claro, si lo hago con barlib con cualquiera de los tipos normales, me voy a un codigo de 2 líneas, por lo tanto creo que necesito el PDF417, y mi pregunta es cómo puedo generarlo en uno de mis listados, es decir en un listado pongo el cliente, y a continuación el código que al leerlo con un scanner me lea un montón de datos que estén en éste código. Puedo hacerlo con alguna librería five, o con algún programa externo. Gracias y saludos[/quote:lmrcl3ls]
Codigo de Barras PDF147
Jose Luis Solucionaste tu problema, yo estoy en estos momentos con el mismo dilema de generar y leer elcodigo de barra pdf417, si obtuviste alguna solucion , si me puedes ayudar gracias
Codigo de Barras en Pantalla
Hola, Estoy utilizando Barlib del Sr. Cayetano para impresión de códigos de barras, pero ahora me gustaría en el xbrowse al irme desplazando por los registros mostrar al lado el código de barras, pero no doy con bola. Esto funciona correcto al imprimir, @ nRenglon+4, 1 CM_EAN13 'C#' + ticket->Caja + strzero(ticket->Folio01,7) OF oPrn WIDTH 0.1 SIZE 2.5 pero al aplicarlo a una ventana o dialogo marca error @ nRenglon+4, 1 CM_EAN13 'C#' + ticket->Caja + (cArticulos)->Codigo OF oDlg WIDTH 0.1 SIZE 2.5 me tira este error: Application =========== Path and name: F:\sistema\siswin.Exe (32 bits) Size: 821,248 bytes Time from start: 0 hours 0 mins 10 secs Error occurred at: 31-12-2008, 16:50:42 Error description: Error BASE/1004 Message not found: TMDICHILD:CMTR2PIX Stack Calls =========== Called from: source\rtl\tobject.prg => TMDICHILD:ERROR(172) Called from: source\rtl\tobject.prg => TMDICHILD:MSGNOTFOUND(205) Called from: source\rtl\tobject.prg => TMDICHILD:CMTR2PIX(0)
Codigo de Barras en Pantalla
La barlib es solo para impresion. Lo mas facil es buscar una fuente TTF o FNT para incluir en tu aplicacion...hay varias y gratios por ahi... y usarla en tu dialogo o ventana. Saludos Desde Chile Adolfo
Codigo de Barras y tUtilPrn
Hola grupo: Estoy tratando de imprimir una boleta y utilizo la clase tUtilPrn, todo bien hasta ahí, pero quiero agregarle un código de barras y no se como hacerlo con esta clase. Lo hago de la siguiente forma: @ xStep,yStep code128 oDBCheq:NroCom of oPr SIZE 1 mode 'A' // pero a distintas impresoras sale en distintas posiciones. Se puede imprimir con la clase tUtilPrn los códigos de barras? O que otra alternativa debo usar para que salga igual sin depender de la impresora. Gracias
Codigo de Barras y tUtilPrn
Lo solucione instalando el font code128 y usando de la siguiente manera: Define Font oFC128   name 'CODE 128'        size 0,-14 of oPr UTILPRN oUtils nLinea,nColum+12   SAY oDBCheq:Barra  FONT oFC128 La única contra de esto es que se debe instalar en cada maquina del cliente dicho font. Espero les sirva. Saludos
Codigo de Barras y tUtilPrn
Me apure en contestar, si me imprime bien , pero el lector de código de barras no lee lo que imprimo. Alguno puede saber porque? Gracias
Codigo de Barras y tUtilPrn
Para imprimir codigos de barra, tienes varias soluciones: - Busca hbzebra en el foro - Barlib de Cayetano, yo la he utilizado mucho <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=29669&p=189486&hilit=codebar#p167720">viewtopic.php?f=6&t=29669&p=189486&hilit=codebar#p167720</a><!-- l -->
Codigo de Barras y tUtilPrn
Hola buenos días A mi alguna vez me sucedió algo similar, lo solucione colocando un asterisco al inicio y al final del código de barras.
Codigo de Barras y tUtilPrn
Estimado Caducca: Una solucion puede ser la siguiente [code=fw:ayq5jszf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />AddFontResource<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"i2of5txt.ttf"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Este es el nombre de la fuente de tu codigo de barra, yo uso esta para interleave 2 de 5</span><br /><span style="color: #B900B9;">// Lo bueno de usar addfontresourse es que no tiene que estar instalada la fuente, solo debes distribuirla con tu programa.</span><br />nIndX := oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">7016</span>  <span style="color: #B900B9;">// Aca simplemente ajusto segun la definicion de la impresora</span><br />nIndY := oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">4958</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont4 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Interleaved 2of5 Text"</span>    <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>*nIndX, <span style="color: #000000;">170</span>*nIndY<br /><span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ejemplo"</span> PREVIEW<br />         <span style="color: #0000ff;">PAGE</span><br />            oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">100</span>*nIndX - <span style="color: #000000;">&#40;</span>nRow*<span style="color: #000000;">6</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">100</span>*nIndY , CodigoBarra<span style="color: #000000;">&#40;</span>STRTRAN<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nCodbar,<span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,oFont4<span style="color: #000000;">&#41;</span> <br />         <span style="color: #0000ff;">ENDPAGE</span><br /><span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> CodigoBarra<span style="color: #000000;">&#40;</span> x <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> i, bar := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, j := <span style="color: #000000;">0</span>, bar1 := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, cBarr := <span style="color: #ff0000;">""</span><br /><span style="color: #B900B9;">// Para este tipo de font, toma de a pares y los representa con los caracteres desde el 48 al 97 y del 192 al 241</span><br /><span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">48</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">97</span><br />       AADD<span style="color: #000000;">&#40;</span>bar ,CHR<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />       AADD<span style="color: #000000;">&#40;</span>bar1,STRTRAN<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>j,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />       j++<br /><span style="color: #00C800;">NEXT</span> i<br /><span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">192</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">241</span><br />       AADD<span style="color: #000000;">&#40;</span>bar,CHR<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />       AADD<span style="color: #000000;">&#40;</span>bar1,STRTRAN<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>j,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">" "</span>,<span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />       j++<br /><span style="color: #00C800;">NEXT</span> i<br /><span style="color: #B900B9;">// Aca recorro el string que le paso de a dos y voy armando el codigo que lo representa</span><br /><span style="color: #00C800;">FOR</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span> STEP <span style="color: #000000;">2</span><br />    i := ASCAN<span style="color: #000000;">&#40;</span>bar1,<span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>x,j,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    cBarr := cBarr + bar<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">NEXT</span> j<br /><span style="color: #B900B9;">// En el caso de este font, para que el lector de codigos de barra lo lea, el inicio y cierre del codigo de barra esta determinado por parentesis, asi que se los agrego</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">"("</span>+cBarr+<span style="color: #ff0000;">")"</span><br /> </div>[/code:ayq5jszf] Espero te sirva el dato, cualquier duda a tu disposicion. Saludos
Codigo de Barras y tUtilPrn
Olá, Utilizo a TImprime e a UtilPrn, ótimas classes. Para gerar código de barras com elas e a barlib do caetano, faço assim: ::Salto() aCoord := ::oPrn:Cmtr2Pix( ::nLinea, 1.00 ) INT25( aCoord[ 1 ], aCoord[2], AllTrim( cCodigo_Barra ), ::oPrn, .F., 0, .T., 0.30, 1.20 ) *---------------------------------------------------------------------------------------------------------------* INT25, intercalado 2 de 5 para boleto bancário e funciona bem. Qualquer coisa manda teu e-mail que te passo um exemplo completo. Att., Oliveiros Junior
Codigo de Barras y tUtilPrn
Gracias a todos. Solucione con la forma que me indico oliveiros junior porque me resulto la mas fácil de implementar. Gracias
Codigo de FiveLinux funciona en Fivewin?
Saludos, segun lo que lei en el manual de FiveLinux y en post anteriores de este foro el desarrollo en fivewin no se puede transpasar a fivelinux y solo compilarlo, mi duda es podra ser de FiveLinux a FiveWin? O cual de las 3 versiones principales (a mi ver ya que las pantallas de ppc en una desktop normal se va a ver muy pequeña) podria utilizarse como lenguaje de programacion multiplataforma (crosplataform programing languaje) ? Gracias Gabino V. Mexico
Codigo de FiveLinux funciona en Fivewin?
Gabino, La limitación viene dada por el nivel de desarrollo de cada versión: Nuestra versión para Windows (FWH) está muy desarrollada, desde hace bastante tiempo, e incluye muchas características que no están ni en Linux ni en Mac. Por otra parte, usar FiveLinux ó FiveMac como modelo a usar, limitaría bastante las posibilidades que ofrece Windows. La solución idónea es buscar un equilibrio, es decir, un código que con pocas modificaciones, pueda usarse en los tres sistemas operativos. Eso depende principalmente de las necesidades de la aplicación a programar.
Codigo de FiveLinux funciona en Fivewin?
Antonio Segun tengo entendido (por el manual fivelinux) los componentes no disponibles son los archivos INI, MDI, print preview y archivos RC o a que mas limitantes te refieres?? De esas limitantes las que pienso (de manera presonal) que si son importantes es el print preview y archivos RC pero que igual no tanto ya que puede manejar glade y a futuro lo convertiras a @.., .., y print preview que me gusta como para utilizar mientras la libreria Pdflib que viene en xHarbour Contributions y asi que abra el archivo con la herramienta externa correspondiente a la plataforma cuando quieran un preview (funcionara?) que opinas. Gracias Gabino V. Mexico