topic
stringlengths
1
63
text
stringlengths
1
577k
APORTE. Exportar a PDF
[quote="Adolfo":29ir9401]Fivewinners. Al inicio de nuestro sistema ( ojala al inicio de la Function MAIN() ) [code=fw:29ir9401]<div class="fw" id="{CB}" style="font-family: monospace;">RPrevUserBtns<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span>|oPreview,oBar| ReportExtend<span style="color: #000000;">&#40;</span>oPreview,oBar<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span></div>[/code:29ir9401] Crear la funcion ReporExtend().. o cualquier otro nombre que le quieran poner [/quote:29ir9401] ¿RPrevUserBtns es un método nuevo de la clase Preview?
APORTE. Exportar a PDF
Manuel... Esta presente desde FWH9.05 (Mayo 2009) Saludos
APORTE: FUNCTION DISPLAY 2.0
amigos de lo forum , estoy colocando un aporte a lo Forum. Se trata de la function DISPLAY.PRG version 2.0 y faz o redimensionar automaticamente a la resolucion corrente de la pantalla, o seja, sus pantallas visualizarao sempre iguales em qualquer resolucion ! Y las fuentes de los controles se ajustam automaticamente, no precisando se importar com los tamanos de las fuentes ! Lo exemplo TELA.EXE foi inicialmente desenado en resolucion de 800 X 600 y lo dialog aparecera sempre igual en qualquer resolucion !!!! Este projecto teve inicio con la function AutoResiz() de nostro hermano FIVEWIDI (muchas gracias Fivewidi por la grande idea inicial ) publicada aqui neste forum . link para download: <!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=1009">http://www.fivewin.com.br/exibedicas.asp?id=1009</a><!-- m --> Para utilizar la funcion deve-se coloca-la en lo evento ON INIT: Activate Dialog Odlg ON INIT display(odlg,nresolution) - nResolution : numero que indica qual resolucion las pam]ntallas foram desenhadas inicialmente , y podem ter los seguintes valores: 1 = 640 X 480 2 = 800 X 600 3 = 1024 X 768 4 = 1152 X 864 5 = 1280 X 800 6 = 1280 X 1024 7 = 1600 X 1200 8 = 768 X 1024 9 = 1440 x 900 10 = 1280 x 768 11 = 1280 x 720 Controles implementados ate agora: (redimensionam correctamente !) - Say - Get - Group - Radio - Checkbox - ComboBox - Xbrowse - Listbox - Wbrowse - Timage - Bitmaps - BarButton - Trees - Folders - BtnBmp - Tbutton - Ssay - Dsay - SBrowse - DbCombo - SayRef - TTabs - Tpages Espero que les sejam muy util, asi como esta siendo para mi. Muchas Gracias a Antonio Linares e Daniel Garcia (Gil) que bastante mi ajudaram en los processos de redimension de los controles. Y muchas, muchas gracias a FiveWidi ! Aguardo los coments de usteds sobre la funcion Muchas Gracias Saludos William Adami Pouso Alegre - Brasil
APORTE: FUNCTION DISPLAY 2.0
Perdon mi amigos, yo creo que publique en lugar errado ! Isto seria a lo forum XHARBOUR. Mil disculpas Gracias William
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
[url=https&#58;//ibb&#46;co/TTH6LP0:ah7lvj56][img:ah7lvj56]https&#58;//i&#46;ibb&#46;co/LPCm59g/vista&#46;png[/img:ah7lvj56][/url:ah7lvj56] Quisiera aportar este abm de tipo ficha como solíamos usar hace años, pero en lugar de usar dbfs y objetos database[b:ah7lvj56] utiliza una tabla mariadb y utiliza rowset con FWHmariadb NATIVO DE FWH.[/b:ah7lvj56] En la carpeta Documentos están las instrucciones para usarlos y un main.prg que permite probarlo En la carpeta SQL está una archivo sql con el cual pueden cargar una base de datos con la tabla para poder probarlo. En fin todo lo necesario se adjunta, solo hay que compilar los fuentes. Un abrazo y la gratitud a quienes pacientemente contestaron mis preguntas, [b:ah7lvj56]este abm no pretende ser una maravilla pero si un ejemplo muy eficaz, sencillo y potente de como usar rowsets y fwhmariadb.[/b:ah7lvj56] En este link hallaran todo lo necesario. <!-- m --><a class="postlink" href="https://mega.nz/file/eZxGnT4Q#WUDiybfh3TZSEvPANGPaYO0RMuyldiihSn3o38DI3qc">https://mega.nz/file/eZxGnT4Q#WUDiybfh3 ... n3o38DI3qc</a><!-- m -->
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
Hola, Gracias por tu aporte Me podrias pasar tu archivo xedit.cfg para tratar de compilarlo?
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
Aquí va. <!-- m --><a class="postlink" href="https://mega.nz/file/PMgEBBQC#tsdFmd6i2oOUUvGw5Ig-sQHZMDEfH9Rc4rQGfzM1o4I">https://mega.nz/file/PMgEBBQC#tsdFmd6i2 ... rQGfzM1o4I</a><!-- m -->
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
Muchisimas gracias! Va genial!
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
Nueva versión *Se muestra el ordinal del recordset y el Id arriba (así se puede hacer coincidir el go to con la fila del rowset *debajo de la folder se ve el numero ordinal y la cantidad real de registros en el rowset <!-- m --><a class="postlink" href="https://mega.nz/file/CUgUiLrb#e8YGidFjKUu4VHM_Quhnds8SoORa9VRgbkS5Hzwm4PA">https://mega.nz/file/CUgUiLrb#e8YGidFjK ... kS5Hzwm4PA</a><!-- m --> En breve irán las búsquedas.
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
Gracias tocayo por tus aportes. Es importantisimo para novatos como yo. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Saludos. Jose.
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
[quote="jvtecheto":1m7qgg2g]Gracias tocayo por tus aportes. Es importantisimo para novatos como yo. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Saludos. Jose.[/quote:1m7qgg2g] Espero que te sea de ayuda, puedes estar pendiente porque habrá una actualización mas con las búsquedas, las cuales son fundamentales. Gracias por tu comentario.
APORTE: ABM con FWHMariadb NATIVO (Rowsets)
Versión Final. ***Se agrega búsqueda múltiple Descargar desde: <!-- m --><a class="postlink" href="https://mega.nz/file/nERU3bRD#mvPE9OFvdd6-3kRIXSH4zU8F-O6rXpl6T2DVgHfqPVY">https://mega.nz/file/nERU3bRD#mvPE9OFvd ... 2DVgHfqPVY</a><!-- m -->
APORTE: FUNCTION DISPLAY 2.0
Amigos de lo forum , estoy colocando un aporte a lo Forum. Se trata de la function DISPLAY.PRG version 2.0 y faz o redimensionar automaticamente a la resolucion corrente de la pantalla, o seja, sus pantallas visualizarao sempre iguales em qualquer resolucion ! Y las fuentes de los controles se ajustam automaticamente, no precisando se importar com los tamanos de las fuentes ! Lo exemplo TELA.EXE foi inicialmente desenado en resolucion de 800 X 600 y lo dialog aparecera sempre igual en qualquer resolucion !!!! Este projecto teve inicio con la function AutoResiz() de nostro hermano FIVEWIDI (muchas gracias Fivewidi por la grande idea inicial ) publicada aqui neste forum . link para download: <!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=1009">http://www.fivewin.com.br/exibedicas.asp?id=1009</a><!-- m --> Para utilizar la funcion deve-se coloca-la en lo evento ON INIT: Activate Dialog Odlg ON INIT display(odlg,nresolution) - nResolution : numero que indica qual resolucion las pam]ntallas foram desenhadas inicialmente , y podem ter los seguintes valores: 1 = 640 X 480 2 = 800 X 600 3 = 1024 X 768 4 = 1152 X 864 5 = 1280 X 800 6 = 1280 X 1024 7 = 1600 X 1200 8 = 768 X 1024 9 = 1440 x 900 10 = 1280 x 768 11 = 1280 x 720 Controles implementados ate agora: (redimensionam correctamente !) - Say - Get - Group - Radio - Checkbox - ComboBox - Xbrowse - Listbox - Wbrowse - Timage - Bitmaps - BarButton - Trees - Folders - BtnBmp - Tbutton - Ssay - Dsay - SBrowse - DbCombo - SayRef - TTabs - Tpages Espero que les sejam muy util, asi como esta siendo para mi. Muchas Gracias a Antonio Linares e Daniel Garcia (Gil) que bastante mi ajudaram en los processos de redimension de los controles. Y muchas, muchas gracias a FiveWidi ! Aguardo los coments de usteds sobre la funcion Muchas Gracias Saludos William Adami Pouso Alegre - MG -Brasil
APORTE: FUNCTION DISPLAY 2.0
EXCELENTE!!!! Salu2
APORTE: FUNCTION DISPLAY 2.0
William, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
APORTE: FUNCTION DISPLAY 2.0
Yo gostaria de pedir a los colegas do Forum que ao acrescentarem otros controles en la dicta function que tambien publique en lo forum para todos. Gracias y perdon por escrever no muy bien lo Espanhol .... Salu2 William Adami
APORTE: FUNCTION DISPLAY 2.0
Gracias William, Me alegro mucho de que te haya sido útil. Un Saludo Carlos G.
APORTE: FUNCTION DISPLAY 2.0
Gracias, Hace tiempo que necesitaba algo como esto, Mi problema es que no me trabaja?? <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
APORTE: FUNCTION DISPLAY 2.0
AdBlanco, disculpa si no compreendo corretamente, non te estás funcionando la funcion ? William
APORTE: FUNCTION DISPLAY 2.0
Que bien <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Esto si es algo muy bueno <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Muchas gracias <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Saluditos Aida
APORTE: FUNCTION DISPLAY 2.0
Si Wiliam, Por alguna razón me da una serie de errores a la hora de compilar. Puede ser por la versión de Xharbour y/o Fw que utilizo, total que cuando logré que compilara no hace efecto alguno.
APORTE: FUNCTION DISPLAY 2.0
Hola Aida! <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
APORTE: FUNCTION DISPLAY 2.0
o que no compila, lo TELA.PRG o la DISPLAY.PRG ? Usted deves Testar solamente la DISPLAY.PRG juntamente con uno Dialog que USTED criou. Existe varias pessoas que testaram la funcion y no apresenta errors, independente de la version de FW. Verfique los #include que no utilizar en su PRG e debes comenta-lo con // verfique o que usted estas fazendo errado William
APORTE: FUNCTION DISPLAY 2.0
la display no me compila me arroja Ambiguous reference: 'STRETCHCOL_LAST'
APORTE: FUNCTION DISPLAY 2.0
ok, lo problema es con lo XBROWSE, enton su version de FWH no es compatible. Para corrigir , en la DISPLAY.PRG debes quitar lo #Include "XBROWSE.CH" y quitar la linea que chama a 'STRETCHCOL_LAST' Retirando estas lineas , la DISPLAY.PRG hay que compilar y funcionar con su FWH Please, verifique y habla-me si funciona William
APORTE: FUNCTION DISPLAY 2.0
Por alguna extraña razón no me trabaja, Me explico, ya compila, pero no surte efecto en el sistema, Sin embargo el ejemplo que tu mandastes si corrige la resolución de pantalla, pero en ningún sistema de los de nosotros lo hace, Lo estoy colocando en el On Init <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
APORTE: FUNCTION DISPLAY 2.0
ok, verifique: - los Dialogs del .RC debem estar desenhados com lo WorkShop en resolucion 800X600 - la chamada a la function Display() : Activate Dialog oDlg on init display(odlg,2) // 2 = resolucion 800 X 600 - Todos los controles del dialog debem tener una Font associada ( do tipo : oControl:oFont:= SuFont ) - Verifique si no tienes modificado a la classe Dialog.prg Agora si no te trabajas la funcion, solamente puede ser la version de su FW. Lamento. Saludos William
APORTE: FUNCTION DISPLAY 2.0
Alfonso, estarei colocando essas mudanças en la nueva version de la funcion (3.0) que logo estarei a publicar. Muchas gracias William
APORTE: FUNCTION DISPLAY 2.0
WILIAM; YA LOGRÉ QUE TRABAJARA (A MEDIAS), PERO NO CORRIGE LA RESOLUCIÓN DEL WINDOW PRINCIPAL NI DEL MENÚ PRINCIPAL. EXCEPTUANDO POR ESO, ESTÁ MUY BIÉN. NO SERÍA BUENO QUE EL FIVEWIN TUVIERA UNA CLÁUSULA PARA DEFINIR LA RESOLUCIÓN DE DISEÑO Y LA RESPETARA EN TODO EL DESARROLLO (OPCIONAL)
APORTE: FUNCTION DISPLAY 2.0
Hola, He estado trabajando con la funcion Display y he incrporado alguna funcionalidad. - En la funcion se tiene como obligatorio el definir font en cada control. He realizado algun cambio y no es necesario poner font en cada control, utiliza el defecto. - Otro cambio realizado consiste en posibilidad de usar la opcion de centrado en Activate del Dialogo (clausula Centered). Aqui tienen la funcion con las modificaciones (Identificadas con // *** AAA ***//). Saludos, Jose Alfonso [code=fw:2fzth363]<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;">2.0</span> - Setembro de <span style="color: #000000;">2009</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 <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; &nbsp;<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 <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 /><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 />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) //desenhada em 800 X 600<br /><br /><br />-* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -* -*<br />*/</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> AutResiz<span style="color: #000000;">&#40;</span> lAutoresize, nWhatSize, oWnd, nResolution, lRepaint <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<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 /><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 /><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; &nbsp;<span style="color: #B900B9;">/* Este sera o caso no qual se pretende desfazer o redimensionamiento<br />&nbsp; &nbsp; &nbsp;dos controles realizado previamente. */</span><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;<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 />&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;">"/TTOOLBAR/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; * AINDA NAO FUNCIONOU !<br />&nbsp; &nbsp; &nbsp; &nbsp; ** &nbsp;msgalert<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nwidth</span> &nbsp;<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; *oWnd:<span style="color: #000000;">nWidth</span>:= oWnd:<span style="color: #000000;">nWidth</span> * nFactorWitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; *oWnd:<span style="color: #000000;">nHeight</span>:= oWnd:<span style="color: #000000;">nHeight</span> * nFactorHeight<br />&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; &nbsp; &nbsp;newwit:= oWnd:<span style="color: #000000;">nBtnWidth</span> * nFactorWitdh<br />&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; &nbsp; &nbsp;newhei:= oWnd:<span style="color: #000000;">nBtnHeight</span> * nFactorHeight<br />&nbsp; &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;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; &nbsp; &nbsp;newwit:= ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</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;newhei:= ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</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;ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nwidth</span>:= ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nwidth*nfactorwitdh</span><br />&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; &nbsp; &nbsp;ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nheight</span>:=ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nheight*nfactorheight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp; &nbsp; &nbsp; ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:= resizebmp<span style="color: #000000;">&#40;</span> ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>, newwit, newhei <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; *msgalert<span style="color: #000000;">&#40;</span>ownd:<span style="color: #000000;">oimagelist</span>:<span style="color: #000000;">abitmaps</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><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; &nbsp; &nbsp; &nbsp; &nbsp;hBmp := resizebmp<span style="color: #000000;">&#40;</span> hBmp, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* troca imagelist<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:AddButton( { || oWnd:nBtnWidth := 50, oWnd:nBtnHeight := 50,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ownd:oImagelist:End(), &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SendMessage( oWnd:hWnd, 1072, 0, ownd:hImageList ),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oWnd:Refresh() }, "Users management", "Users" )<br />&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />&nbsp; &nbsp; &nbsp; &nbsp; * &nbsp;OwND:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><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;">"/TIMAGE/TBITMAP/TLISTBOX/TWBROWSE/TSSAY/TDSAY/TSAYREF/"</span> &nbsp; &nbsp;<br />&nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><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 />&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. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; EndFor<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</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;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><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. <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><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<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/TDSAY/TSSAY/"</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><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aj_get<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/"</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; 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;">"/TXBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_XBRW<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_XBRW<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;">"/TSBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_TSB<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_TSB<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;">"/TWBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_OLBX<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_OLBX<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; * AINDA NAO TESTADO, PODE HAVER ERROS !!! &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;">"/TLISTBOX/TCOMBOBOX/"</span> <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> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><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 />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> lRepaint<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 />&nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><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 />&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. <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/TBITMAP/TLISTBOX/TWBROWSE/TSSAY/TDSAY/TSAYREF/"</span> &nbsp; &nbsp;<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 />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</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;">"/TCOMBOBOX/TDBCOMBO/"</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;">"/TXBROWSE/"</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;">"/TIMAGE/"</span> &nbsp; &nbsp;<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. <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 /><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><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<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/TDSAY/TSSAY/"</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><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aj_get<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/"</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; 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;">"/TXBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_XBRW<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_XBRW<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;">"/TSBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_TSB<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_TSB<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;">"/TWBROWSE/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_OLBX<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_OLBX<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 /><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 /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> AjustaLarg<span style="color: #000000;">&#40;</span>oq,ownd<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;:= <span style="color: #000000;">0</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;nAlturaDaFonte &nbsp; &nbsp; := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp;nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><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 />&nbsp; &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<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:=<span style="color: #000000;">0</span>, 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;* 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 />&nbsp; &nbsp;nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span> <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 />&nbsp; &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 /><span style="color: #00C800;">FUNCTION</span> Aj_get<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 ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDaFonte &nbsp; &nbsp;:= <span style="color: #000000;">0</span>, nLarguraDoControle , &nbsp;nTime := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+3</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;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; nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><br /><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 />&nbsp; &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> 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; 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 />&nbsp; &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 := <span style="color: #000000;">0</span>, 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 />&nbsp; &nbsp; &nbsp; &nbsp;<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;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> ajl_XBRW<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 := .F., nAlturaDaFonte,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDaFonte &nbsp;:= <span style="color: #000000;">0</span>, nLarguraDoControle, nTime := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+3</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFontTmp,ofont<br />&nbsp;<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 />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp;nAlturaDaFonte &nbsp; &nbsp; := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span> <br />&nbsp; &nbsp;nLarguraDaFonte = nLarguraDaFonte*nf<br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">NAME</span> cFontName;<br />&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;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br /><br />&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;* redimensiona fontes <span style="color: #00C800;">do</span> xbrw<br />&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;">odatafont</span> :=oFontTmp<br />&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;">oHeaderFont</span>:=ofontTmp<br />&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;">oFooterFont</span>:=oFontTmp<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> aja_XBRW<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 &nbsp; &nbsp; := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDaFonte &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;nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp;nAlturadaFonte:=nalturadafonte*nf <br /><br />&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;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br /><br />&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;* redimensiona as colunas <span style="color: #00C800;">do</span> Xbrw<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nf=<span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; nf:=<span style="color: #000000;">1.2</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&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 /><br />&nbsp; &nbsp; &nbsp; &nbsp;* pega tamanho anterior X factor<br />&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;* atualiza o novo tamanho da coluna<br />&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 /><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;oq:<span style="color: #000000;">nStretchcol</span>:=STRETCHCOL_LAST<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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> aja_OLBX<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., &nbsp;nAlturaDaFonte &nbsp; &nbsp; := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDaFonte &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;nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp;nAlturadaFonte:=nalturadafonte*nf <br /><br />&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;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br /><br />&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;* redimensiona as colunas <span style="color: #00C800;">do</span> Xbrw<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nf=<span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; nf:=<span style="color: #000000;">1.2</span><br />&nbsp; &nbsp;<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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> ajl_OLBX<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 := .F., nAlturaDaFonte,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLarguraDaFonte := <span style="color: #000000;">0</span>, nLarguraDoControle,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &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 /><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;nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp;nAlturaDaFonte &nbsp; &nbsp; := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp;nLarguraDaFonte = nLarguraDaFonte*nf<br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">NAME</span> cFontName;<br />&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;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;* atualiza a largura das colunas<br />&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 /><br />&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 /><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Ajustal_ds<span style="color: #000000;">&#40;</span>oq<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 &nbsp; := .F., nAlturaDaFonte &nbsp; &nbsp; := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAlturaDoControle , nLarguraDaFonte , nTime := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+3</span>,;<br />&nbsp; &nbsp; &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;nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span><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;<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 />&nbsp; &nbsp; &nbsp; <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; <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 />&nbsp; &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 />* ajusta altura tsbrowse<br /><span style="color: #00C800;">FUNCTION</span> aja_TSB<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;<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;nLarguraDaFonte &nbsp; &nbsp;:= oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp;nAlturadaFonte:=nalturadafonte*nf <br /><br />&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;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br /><br />&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;* redimensiona as colunas <span style="color: #00C800;">do</span> Xbrw<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nf=<span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; nf:=<span style="color: #000000;">1.2</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&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;">acolumns</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;* pega tamanho anterior X factor<br />&nbsp; &nbsp; &nbsp; &nbsp;ov:=oq:<span style="color: #000000;">nHeightCell</span> * nf<br />&nbsp; &nbsp; &nbsp; &nbsp;* atualiza o novo tamanho da coluna<br />&nbsp; &nbsp; &nbsp; &nbsp;oq:<span style="color: #000000;">nHeightCell</span> := ov<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 />&nbsp; &nbsp;<span style="color: #00C800;">next</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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br />* ajusta largura tsbrowse<br /><span style="color: #00C800;">FUNCTION</span> ajl_TSB<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 ,;<br />&nbsp; &nbsp; &nbsp; nLarguraDaFonte &nbsp; &nbsp;:= <span style="color: #000000;">0</span>,;<br />&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 /><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;nLarguraDoControle := oq:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp;nAlturaDaFonte &nbsp; &nbsp; := oq:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span> <br />&nbsp; &nbsp;nLarguraDaFonte = nLarguraDaFonte*nf<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontTmp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">NAME</span> cFontName;<br />&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;oq:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>oFontTmp<span style="color: #000000;">&#41;</span><br /><br />&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;">acolumns</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;* redimensiona fontes <span style="color: #00C800;">do</span> tsbrowse<br />&nbsp; &nbsp; &nbsp; &nbsp;oq:<span style="color: #000000;">acolumns</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oFont</span> :=oFontTmp<br />&nbsp; &nbsp; &nbsp; &nbsp;oq:<span style="color: #000000;">acolumns</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oFontHead</span>:=ofontTmp<br />&nbsp; &nbsp; &nbsp; &nbsp;oq:<span style="color: #000000;">acolumns</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oFontFoot</span>:=oFontTmp<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;* reajusta a largura fo sbrowse<br />&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 /><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFontTmp<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 /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:2fzth363]
APORTE: FUNCTION DISPLAY 2.0
Hola de donde lo puedo bajar? Gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
APORTE: FUNCTION DISPLAY 2.0
Aida: [url:1jeigyv9]http&#58;//www&#46;4shared&#46;com/rar/NIwJho3C/DISPLAY3&#46;html[/url:1jeigyv9] [code=fw:1jeigyv9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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 />&nbsp;* <span style="color: #000000;">12</span> = <span style="color: #000000;">1366</span> X <span style="color: #000000;">768</span><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 />ElseIf <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>nResolution<span style="color: #000000;">&#41;</span> = <span style="color: #000000;">12</span><br />&nbsp; &nbsp;nOriWidth := <span style="color: #000000;">1366</span><br />&nbsp; &nbsp;nOriHeight := <span style="color: #000000;">768</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 />ElseIf nWhatSize = <span style="color: #000000;">12</span><br />&nbsp; &nbsp;nWidth := <span style="color: #000000;">1366</span><br />&nbsp; &nbsp;nHeight := <span style="color: #000000;">768</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 /><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; 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 /><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; 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 /><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; ELSEif ownd:<span style="color: #000000;">classname</span>$<span style="color: #ff0000;">"/TGET/TSSAY/TDSAY/"</span><br /><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; 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 /><br /><span style="color: #B900B9;">/*<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; if ownd:acontrols[nContador]:classname$"/TSAY/TSAYREF/"<br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ajustaalt(ownd:acontrols[nContador],nfactorheight,lFullres) <br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ajustalarg(ownd:acontrols[nContador],ownd,nfactorwitdh,lFullres) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:acontrols[nContador]:classname$"/TGET/TSSAY/TDSAY/"<br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ajustaalt(ownd:acontrols[nContador],nfactorheight,lFullres) <br />* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ajl_FLD(ownd:acontrols[nContador],nFactorWitdh) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSEif ownd:acontrols[nContador]:classname$"/TFOLDER/TPAGES/TCOMBOBOX/TGROUP/TTREE/TCHECKBOX/TBTNBMP/TTOOLBAR/TRADIO/TDBCOMBO/TTABS/TXBROWSE/TSBROWSE/TWBROWSE/"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aja_FLD(ownd:acontrols[nContador],nFactorHeight) <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ajl_FLD(ownd:acontrols[nContador],nFactorWitdh) <br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; endif <br />*/</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> 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 />&nbsp;</div>[/code:1jeigyv9] Saludos
APORTE: FUNCTION DISPLAY 2.0
Karinha Muchas gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
APOYO PARA TGRAPH
Hola, es mi primera solicitud de ayuda para solucionar una obsesión "[b:3ehm55rc]Colocar la leyenda (valor) sobre la barra[/b:3ehm55rc]" en una "grafica de barras", por default la leyenda aparece a la derecha de la barra. Agradezco su atención
APOYO PARA TGRAPH
+1
APOYO PARA TGRAPH
Estimado Piteco, Puedes poner aqui un PRG de ejemplo de cómo lo estás haciendo ? gracias
APOYO PARA TGRAPH
Piteco, no se si es lo que buscas, pero si es que muestre los valores de las barras sería: [code=fw:1m2zo4u6]<div class="fw" id="{CB}" style="font-family: monospace;">oGraph:<span style="color: #000000;">lViewVal</span> := .t.</div>[/code:1m2zo4u6]
APOYO PARA TGRAPH
Saludos Algún sitio para descargar estas clases?
APOYO PARA TGRAPH
La clase TGraph viene incluida en la distribucion de Fivewin
APPBOX para 32
Existe AppBox para FWH 2.6 Daniel Segura <!-- e --><a href="mailto:ciacpd@terra.com.br">ciacpd@terra.com.br</a><!-- e -->
APPBOX para 32
Daniel, Que es AppBox ?
APPBOX para 32
uma classe Incrustando ventanas externas / Embedding external windows torna aplicações externas como se fosse feitas em fivewin dentro de uma dialog ou window voce coloca o internet explore como se fosse um componente, fica muito bom para fundo de dialog se quiser mando um exemplo em fw20 é so informar o email. baixado de <!-- m --><a class="postlink" href="http://www.fivewin.info/ulfiles/Appbox.zip">http://www.fivewin.info/ulfiles/Appbox.zip</a><!-- m --> Daniel Segura <!-- e --><a href="mailto:ciacpd@terra.com.br">ciacpd@terra.com.br</a><!-- e -->
APPBOX para 32
Daniel, De donde se puede descargar AppBox ?
APPE FROM ...DELIMITED date-format question.
Hi, I want to add CSV-files like into a DBF like this [list:jpvdeav8]11795129,"2012-07-31",42,9,"","Laadbrug",8,1,0,0.00 11795130,"2012-07-31",42,10,"","Ret.oude ketting",8,1,0,0.00 11795131,"2012-07-31",42,11,"","",8,1,0,0.00 11795132,"2012-07-31",42,12,"","HULSHOUT",8,1,0,0.00 11795133,"2012-07-26",84,1,"","Vervolg",1,3,0,0.00 11795134,"2012-07-27",97,1,"","JWJ-153",1,0,0,0.00 11795135,"2012-07-27",54,1,"","YRT-645",1,0,0,0.00 11795136,"2012-07-27",95,13,"VERS","DEINZE",13,0,0,0.00 11795137,"2012-07-27",95,14,"","13.30U - 17.30U",13,0,0,0.00 11795138,"2012-07-27",95,15,"","31545",13,0,0,0.00 11795139,"2012-07-27",95,16,"","laden3007",13,0,0,0.00 11795140,"2012-07-27",95,17,"","LONDERZEEL",13,0,0,0.00 11795141,"2012-07-27",91,11,"VERS","DEINZE",11,2,0,0.00 11795142,"2012-07-27",91,12,"","13.30U - 17.30U",11,2,0,0.00 11795143,"2012-07-27",91,13,"","31544",11,2,0,0.00 11795144,"2012-07-27",91,14,"","laden3007",11,2,0,0.00 [/list:u:jpvdeav8] All fields are imported except the date. I have tried to use [code=fw:jpvdeav8]<div class="fw" id="{CB}" style="font-family: monospace;">SET DATE ansi</div>[/code:jpvdeav8] Without result. Does anyone know how to import this? Thanks, Marc
APPE FROM ...DELIMITED date-format question.
Dear Marc Vanzegbroeck, Try use numeric for date with format YYYYMMDD , like : 11795129,20120731,42,9,"","Laadbrug",8,1,0,0.00 Thank kok
APPE FROM ...DELIMITED date-format question.
Thanks for the reply, but the problem is that I can't change this, because it's a CSV-file created by an SQL-command. I can't find how how to change the format in MySQL in an 'INTO OUTFILE' command. So I need to solve this with Harbour.. Regards, Marc
APPE FROM ...DELIMITED date-format question.
Hi solved it with a workaround by first reading the file into a memofield and remove all '-' with a STRTRAN, and save it again. Marc
APPEND FROM (rutaf) DELIMITED WITH "";""
Amigos del foro.... Resulta y pasa que tengo que convertir un archivo txt a una dbf lo estoy haciendo de la siguiente manera: [code:13m5hb2j] rutaf&#58;=LFN2SFN&#40;ruta&#41; USE &#40;oLamcla&#58;tSube&#41; ALIAS tSube NEW EXCLUSIVE ZAP dbgotop&#40;&#41; APPEND FROM &#40;rutaf&#41; DELIMITED WITH ";" dbgotop&#40;&#41; [/code:13m5hb2j] El problema es que no vale el WITH ";" no valida el punto y coma, solo recibe lo que este delimitado por comas ",". Alguien me puede indicar por que sucede esto, o que debo hacer para que si tome el valor de punto y coma ";". De antemano gracias
APPEND FROM (rutaf) DELIMITED WITH "";""
Amigo Use SET DEMILITER TO ";" no cabecalho do programa e veja se funciona.
APPEND FROM (rutaf) DELIMITED WITH "";""
Nop <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Rochinha: No me funciono... de todas formas muchas gracias por la respuesta. Un abrazo.
APPEND FROM (rutaf) DELIMITED WITH "";""
OK Try [code:31d21zwd] APPEND FROM &#40;rutaf&#41; DELIMITED WITH chr&#40;59&#41; [/code:31d21zwd]
APPEND FROM (rutaf) DELIMITED WITH "";""
Amigo Leandro, Yo lo hago de la siguiente forma: 1) Creo un fichero temporal, con un solo campo (muy grande) DbCreate( "tFichero.dbf",{ {"NOMBRE", "C", 256, 0} } ) 2) Hago el Append From a este fichero temporal : USE tFichero new EXCLUSIVE APPE FROM (cFichero) SDF DBGOTOP() 3) Abro el fichero definitivo y voy copiando la información desde el fichero temporal al definitivo, usando la claúsula SUBSTRING para cada uno de los campos. definitivo->NOMBRE:= SUBS(tFichero->NOMBRE, 1, 24)
APPEND FROM (rutaf) DELIMITED WITH "";""
Rochinha de Nuevo gracias por tu respuesta hice el intento pero no funca.. jejeje Manuel.. muchas gracias por tu respuesta creo que es lo que voy a hacer... voy a dejar la pereza y montar la rutina... De paso te hago una preguntica... ¿Como detecto si hay un tab ?, en caso que el archivo no venga separado por ";" si no por "tab"? Valga la rebusnancia. y de Nuevo gracias por la ayuda.
APPEND FROM (rutaf) DELIMITED WITH "";""
Solo se acepta como delimitador la COMA "," , asi que para otro tipo de caracter delimitador diferente a la COMA"," solo te queda crear una funcion para leer tu archivo que contenga otro tipo de delimitadores, no hay otra. Jaime
APPEND FROM (rutaf) DELIMITED WITH "";""
Amigo Leandro, Cuando al mandato APPEND FROM le añade la claúsula SDF los registros y los campos tienen una longitud fija. De esa forma, es facil saber donde empieza cada campo y donde termina.
APPEND FROM (rutaf) DELIMITED WITH "";""
No me do por vencido. Amigo usa la solucion de Manuel Valdenebro para cada linha del fichero. Usa mi funcion em <!-- m --><a class="postlink" href="http://www.pctoledo.com.br/forum/viewtopic.php?t=5306">http://www.pctoledo.com.br/forum/viewtopic.php?t=5306</a><!-- m --> asi: aArrayObtido := StringToArray( "O|Rochinha|es|tu|amigo", ";" ) Resultado: ? aArrayObtido[1] // Mostra O ? aArrayObtido[2] // Mostra Rochinha ? aArrayObtido[3] // Mostra Es ? aArrayObtido[4] // Mostra Tu ? aArrayObtido[5] // Mostra Amigo Fica por tu conta ahora.
APPEND FROM (rutaf) DELIMITED WITH "";""
Rochinha, Excelente función, verdaderamente combinándola con la idea de Manuel se logra un "append from" cualquier cosa, sin bases intermedias y con excelente desempeño!!!
APPEND FROM (rutaf) DELIMITED WITH "";""
Obrigado Jose, no podemos vencer sempre, mas lutar sempre!
APPEND FROM (rutaf) DELIMITED WITH "";""
Muchas Gracias Rochinha, de verdad que me uno a las felicitaciones de jose excelente funcion, problema solucionado...... De nuevo Muchas Gracias
APPEND FROM + Progress Bar
Seria posible utilizar un control "progress bar" durante un APPEND FROM? Alguna sugerencia o codigo de alguien que lo haya implementado? Gracias George
APPEND FROM + Progress Bar
Hola Yo utilizo con un MsgRun.. [code=fw:32q6igl7]<div class="fw" id="{CB}" style="font-family: monospace;">    MsgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Espere, importando "</span>, <span style="color: #ff0000;">"Usuario"</span>,;<br />                             <span style="color: #000000;">&#123;</span> || __dbApp<span style="color: #000000;">&#40;</span> cPath + <span style="color: #ff0000;">"<span style="color: #000000;">\"</span>+cDbf, {},,,,,.F., "</span>DBFCDX<span style="color: #ff0000;">") } )<br /></span></div>[/code:32q6igl7] podrias hacerlo dentro del codeblock <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
APPEND FROM + Progress Bar
Eu, utilizo desta forma: APPEND FROM IMOVEL ; FOR If(lNewFile,(oMtr1:nTotal:=Reccount(), Sysrefresh(), lNewFile:=.f.,.t. ), (nPercent1++,oMtr1:Set(nPercent1),SysRefresh(),.t. ) )
APPEND FROM + Progress Bar
Gracias Ronaldo y Patricio por su ayuda. Creo cualquiera de las dos soluciones propuesta por ustedes me sirve. Saludos George
APPEND FROM + Progress Bar
Ronaldo, Está muy ben. ¿Se podría utilizar un CodeBlock o llamara una funcción desde la clausula FOR? Gracias
APPEND FROM + Progress Bar
Añadiendo un dialogo NOWAIT con el control METER, el siguiente codigo funciona: [code=fw:yd391xti]<div class="fw" id="{CB}" style="font-family: monospace;"><br />     MsgRun<span style="color: #000000;">&#40;</span>cMsgRun, <span style="color: #ff0000;">"Creating Transactions file January 2010 [BETA 0.9]"</span>,;<br />             <span style="color: #000000;">&#123;</span> || TransaJan2010<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> TransaJan2010<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    APPEND <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"Jan2010.CSV"</span> <span style="color: #00C800;">FOR</span>  <span style="color: #000000;">&#40;</span>nPercent1++, oMtr1:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span>nPercent1<span style="color: #000000;">&#41;</span>,  SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span>  DELIMITED WITH <span style="color: #000000;">&#40;</span>,<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /> </div>[/code:yd391xti] El problema es que hice una prueba añadiendo cerca de 800,000 records con los siguientes resultados: A) Sin el METER tarda 1.5 minutos B) Con el METER tarda casi 7 minutos. Habra algun otro modo de hacerlo o alguna otra sugerencia? Saludos George
APPEND FROM + Progress Bar
George.. Pueds intentar hacer el SysRefresh() cada "x" registros, por ejemplo 100, 200, 500 o 1000
APPEND FROM + Progress Bar
Gracias Daniel por tu sugerencia. Con el siguiente cambio en APPEND FROM se toma ahora cerca de 2 minutos lo cual es aceptable. [code=fw:39zjyunw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> TransaJan2010<span style="color: #000000;">&#40;</span>nPercent1, oMtr1<span style="color: #000000;">&#41;</span><br />    APPEND <span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"Jan2010.CSV"</span> <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span>nPercent1++, oMtr1:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span>nPercent1<span style="color: #000000;">&#41;</span>,  IIF<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>nPercent1/<span style="color: #000000;">1000</span> - int<span style="color: #000000;">&#40;</span>nPercent1/<span style="color: #000000;">1000</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span> , SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">TRUE</span>  <span style="color: #000000;">&#41;</span>  DELIMITED WITH <span style="color: #000000;">&#40;</span>,<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /> </div>[/code:39zjyunw] George
APPEND FROM + Progress Bar
Buen dia Alguien tiene el ejemplo completo de como funciona un APPEND FROM con el PROGRESS BAR, trato de implementar el que aqui adjuntan pero no me sale bien, GRACIAS
APPEND FROM + Progress Bar
Enrique aqui tienes un ejemplo de la implementación de la barra de progreso leyendo el CSV que está en el array. [code=fw:1w7qxiab]<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 /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> oDlg, oMeter, nActual := <span style="color: #000000;">0</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> CLR_LGRAY<br />        <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oDlg ;<br />            <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Reading CSV file in array"</span>;<br />            <span style="color: #0000ff;">BRUSH</span> oBrush;<br />            <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;">20</span>, <span style="color: #000000;">80</span><br /><br />         @ <span style="color: #000000;">8</span>, <span style="color: #000000;">10</span> METER oMeter <span style="color: #0000ff;">VAR</span> nActual TOTAL <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">30</span><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ReadCSV<span style="color: #000000;">&#40;</span>oDlg, oMeter<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> ReadCSV<span style="color: #000000;">&#40;</span>oDlg, oMeter<span style="color: #000000;">&#41;</span>  <br />    <span style="color: #00C800;">LOCAL</span> cMsgRun := <span style="color: #ff0000;">"Procedure in execution; please Wait..."</span>, cMsgArrayData := <span style="color: #ff0000;">"Creating CSV array data; please wait..."</span><br />    <span style="color: #00C800;">LOCAL</span> nStart := Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nEnd, aData := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, cText := <span style="color: #ff0000;">""</span>, cMsgMemo := <span style="color: #ff0000;">"Reading CSV data source; please wait..."</span><br /><br />    <span style="color: #B900B9;">//===================================================================================================================</span><br />    <span style="color: #B900B9;">// STEP ONE: Read CSV File</span><br />    <span style="color: #B900B9;">//===================================================================================================================</span><br />    cFileCSV = <span style="color: #ff0000;">"your_file.csv"</span><br />    MsgRun<span style="color: #000000;">&#40;</span>cMsgMemo, <span style="color: #ff0000;">"Main"</span>,  <span style="color: #000000;">&#123;</span> | | cText := fCSVMemo<span style="color: #000000;">&#40;</span>cFileCSV<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    Sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">//===================================================================================================================</span><br />    <span style="color: #B900B9;">// STEP TWO:  Read each line and save the result in array aData</span><br />    <span style="color: #B900B9;">//===================================================================================================================</span><br />    MsgRun<span style="color: #000000;">&#40;</span>cMsgArrayData, <span style="color: #ff0000;">"Main"</span>,  <span style="color: #000000;">&#123;</span> | | aData := HB_ATokens<span style="color: #000000;">&#40;</span> cText, Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>, .t., .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />    syswait<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">05</span><span style="color: #000000;">&#41;</span><br />    Sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    ? <span style="color: #ff0000;">"Total rows in array: "</span>, len<span style="color: #000000;">&#40;</span>aData<span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"Delay (secs): "</span>, <span style="color: #000000;">&#40;</span>Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nStart<span style="color: #000000;">&#41;</span><br /><br />    separate_fields_in_array<span style="color: #000000;">&#40;</span>aData, oDlg, oMeter<span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> fCSVMemo<span style="color: #000000;">&#40;</span>cFileCSV<span style="color: #000000;">&#41;</span><br />    cText := StrTran<span style="color: #000000;">&#40;</span> MemoRead<span style="color: #000000;">&#40;</span> cFileCSV <span style="color: #000000;">&#41;</span>, CRLF, Chr<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: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>cText<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> separate_fields_in_array<span style="color: #000000;">&#40;</span>aData, oDlg, oMeter<span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #B900B9;">//=======================================================================================================================</span><br />    <span style="color: #B900B9;">// STEP THREE: Separate fields in each line based in delimiters and save the info in Array</span><br />    <span style="color: #B900B9;">//=======================================================================================================================</span><br />    nLenData := int<span style="color: #000000;">&#40;</span>len<span style="color: #000000;">&#40;</span>aData<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    nDivisor := int<span style="color: #000000;">&#40;</span>nLenData/<span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />    IIF<span style="color: #000000;">&#40;</span> nDivisor < <span style="color: #000000;">1</span>, nDivisor := <span style="color: #000000;">1</span>,<span style="color: #000000;">&#41;</span><br />    oMeter:<span style="color: #000000;">nTotal</span> := nLenData<br />    oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />    AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |c,i| c := StrTran<span style="color: #000000;">&#40;</span> c, Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>, CRLF <span style="color: #000000;">&#41;</span>, aData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := HB_ATokens<span style="color: #000000;">&#40;</span> c, <span style="color: #ff0000;">","</span>, .t., .t. <span style="color: #000000;">&#41;</span>, MyProgressBar<span style="color: #000000;">&#40;</span>i, nDivisor, oMeter, oDlg<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />    nSec4 := Second<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span>nLenData<span style="color: #000000;">&#41;</span><br />    syswait<span style="color: #000000;">&#40;</span>.<span style="color: #000000;">05</span><span style="color: #000000;">&#41;</span><br />    Sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #B900B9;">//================================================================================================================</span><br /><span style="color: #00C800;">FUNCTION</span> MyProgressBar<span style="color: #000000;">&#40;</span>i, nDivisor, oMeter, oDlg<span style="color: #000000;">&#41;</span><br />    IIF<span style="color: #000000;">&#40;</span>i/nDivisor = int<span style="color: #000000;">&#40;</span>i/nDivisor<span style="color: #000000;">&#41;</span>,;<br />        <span style="color: #000000;">&#40;</span>oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>,sysrefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br /><br /> </div>[/code:1w7qxiab]
APPEND FROM + Progress Bar
George GRACIAS eso era lo que necesitaba !!! y es rapidisimo en comparacion con leer Excel
APPEND FROM ... SDF
I don't really know if this an XHB error or FWH error. It worked before Feb 2006 (XHB and FWH), but now it crashes [code:32k9g5g2] Error description&#58; Error DBFCDX/1023 Exclusive required Called from&#58; => __DBPACK&#40;0&#41; Called from&#58; dbsdf&#46;prg => __DBSDF&#40;241&#41; Called from&#58; IMP_CLK&#46;PRG => IMPORT_HRS&#40;343&#41; Line 343 contained this below, but never had problems before 10/mar/2006 append from &#40;xClPath+"_MAST&#46;TXT"&#41; SDF [/code:32k9g5g2] My search for DBSDF.PRG in FWH\SOURCE failed of course ... The original code was as this: [code:32k9g5g2] Create &#40;xClPath+"_MIMP&#46;DBF"&#41; FROM &#40;xClPath+"_MAST&#46;STR"&#41; newinfile &#58;= Select&#40;&#41; SELECT &#40;newinfile&#41; append from &#40;xClPath+"_MAST&#46;TXT"&#41; SDF &#40;newinfile&#41;->&#40;DBCLOSEAREA&#40;&#41;&#41; [/code:32k9g5g2] My solution was to add this line: [code:32k9g5g2] Create &#40;xClPath+"_MIMP&#46;DBF"&#41; FROM &#40;xClPath+"_MAST&#46;STR"&#41; newinfile &#58;= Select&#40;&#41; SELECT &#40;newinfile&#41; USE &#40;xClPath+"_MIMP&#46;DBF"&#41; alias QQQQ EXCLUSIVE // added append from &#40;xClPath+"_MAST&#46;TXT"&#41; SDF &#40;newinfile&#41;->&#40;DBCLOSEAREA&#40;&#41;&#41; [/code:32k9g5g2] Any advise ? Regards, saludos Evans
APPEND FROM ... SDF
The following sample works fine. Can you modify it to reproduce the problem? [code:31wd44ht]FUNCTION MAIN&#40;&#41; USE TEST SHARED COPY TO TMPTEST FOR &#46;F&#46; USE TMPTEST SHARED APPEND FROM TEST GO TOP BROWSE&#40;&#41; CLOSE FERASE&#40; "TMPTEST&#46;DBF" &#41; RETURN NIL[/code:31wd44ht] EMG
APPEND FROM ... SDF
Sorry for the long example. This example you can save in \FWH\SAMPLES and run it. I use XHB Professional ver. 4.01 Jan 24 2006 09:15:21 APPEND FROM ... DATABASE works fine. APPEND FROM ... SDF does not work (see the error below) Thanks for the interest regards Evans [code:13ocrqsk] #INCLUDE 'FIVEWIN&#46;CH' Function MAIN&#40;&#41; // This example was ran in FWH\SAMPLES USE CUSTOMER SHARED COPY TO TMPTEST&#46;TXT FOR RTrim&#40;first&#41; == 'Homer' SDF // SDF correctly outputs 5 records COPY TO TMPTEST&#46;DBF FOR RTrim&#40;first&#41; == 'Andy' // DBF correctly outputs 2 records USE TMPTEST SHARED BROWSE&#40;&#41; // Contains 2 records APPEND FROM TMPTEST&#46;TXT SDF // SDF crashes here !!! /* Error description&#58; Error DBFNTX/1023 Exclusive required Stack Calls =========== Called from&#58; => __DBPACK&#40;0&#41; Called from&#58; dbsdf&#46;prg => __DBSDF&#40;241&#41; Called from&#58; APPEND_FROM&#46;PRG => MAIN&#40;15&#41; */ GO TOP BROWSE&#40;&#41; CLOSE FERASE&#40; "TMPTEST&#46;TXT" &#41; // &#46;TXT !!! RETURN NIL // Suggested solution by Antonio - Must be added to a PRG #pragma BEGINDUMP #include "hbapi&#46;h" #include "hbapiitm&#46;h" PHB_SYMB hb_dynsymSymbol&#40; PHB_DYNS pDynSym &#41; &#123; return pDynSym->pSymbol; &#125; #pragma ENDDUMP [/code:13ocrqsk]
APPEND FROM ... SDF
Confirmed. Already reported in the xHarbour developer's mailing-list. Thank you. EMG
APPEND FROM ... SDF
[quote="E. Bartzokas":lov6xfw2]Sorry for the long example. This example you can save in \FWH\SAMPLES and run it. I use XHB Professional ver. 4.01 Jan 24 2006 09:15:21 APPEND FROM ... DATABASE works fine. APPEND FROM ... SDF does not work (see the error below) Thanks for the interest regards Evans [code:lov6xfw2] #INCLUDE 'FIVEWIN&#46;CH' Function MAIN&#40;&#41; // This example was ran in FWH\SAMPLES USE CUSTOMER SHARED COPY TO TMPTEST&#46;TXT FOR RTrim&#40;first&#41; == 'Homer' SDF // SDF correctly outputs 5 records COPY TO TMPTEST&#46;DBF FOR RTrim&#40;first&#41; == 'Andy' // DBF correctly outputs 2 records USE TMPTEST SHARED BROWSE&#40;&#41; // Contains 2 records APPEND FROM TMPTEST&#46;TXT SDF // SDF crashes here !!! /* Error description&#58; Error DBFNTX/1023 Exclusive required Stack Calls =========== Called from&#58; => __DBPACK&#40;0&#41; Called from&#58; dbsdf&#46;prg => __DBSDF&#40;241&#41; Called from&#58; APPEND_FROM&#46;PRG => MAIN&#40;15&#41; */ GO TOP BROWSE&#40;&#41; CLOSE FERASE&#40; "TMPTEST&#46;TXT" &#41; // &#46;TXT !!! RETURN NIL // Suggested solution by Antonio - Must be added to a PRG #pragma BEGINDUMP #include "hbapi&#46;h" #include "hbapiitm&#46;h" PHB_SYMB hb_dynsymSymbol&#40; PHB_DYNS pDynSym &#41; &#123; return pDynSym->pSymbol; &#125; #pragma ENDDUMP [/code:lov6xfw2][/quote:lov6xfw2] I have reported this bug over a month ago in the xharbour ng with a sample, but no one replied !!!!! <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> A fix will be opening the file "exclusive" <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Richard
APPEND FROM ... SDF
You may directly report it to Przemek at <!-- e --><a href="mailto:druzus@priv.onet.pl">druzus@priv.onet.pl</a><!-- e --> as he is the RDDs best expert.
APPEND FROM ... SDF
Atualizei minhas versão tanto do Fivewin quanto Xharbour para FHW7.05 e Xharb99.71 e me deparei com dois problemas até o momento: 1- @ 0.35,8.5 SAY " " RAISED BOX COLOR CLR_BLACK,CLR_WHITE SIZE 95,50 OF oDlg Versões anteriores fazia um box de linha preta e findo branco, agora fax somente o box com a linha preta e não aceito o fundo que defino não importa a cor 2- Dou um APPEND FROM TEXTO.TXT SDF e não funciona nesta nova versão O que posso fazer?
APPEND FROM ... SDF
Paulo, Estas usando este xharbour ? <!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/xharbour.exe">www.fivetechsoft.com/files/xharbour.exe</a><!-- w -->
APPEND FROM ... SDF
Sim estou usando esse versão, baixei novamente para ter certeza. Mas continua sem funcionar o APPEND FROM TEXTO.TXT SDF e as cores do SAY. Estou usando FWH7.05 + Xharbour 0.99.71 (simplex)
APPEND FROM ... SDF
Paulo, > APPEND FROM TEXTO.TXT SDF Por favor envíame por email en un fichero ZIP incluyendo Texto.txt y la DBF en donde vas a añadirlo Vamos a revisar el tema de los colores que nos comentas
APPEND FROM ... SDF
Enviei para seu e-mail.
APPEND FROM ... SDF
Paulo, Añade el texto de esta forma: [code:qeio6e7i] #include "FiveWin&#46;ch" function Main&#40;&#41; local cText &#58;= MemoRead&#40; "texto&#46;txt" &#41;, n DBCREATE&#40; "NOTICW&#46;DBF", &#123;&#123; "LINHA","C",255,0 &#125;&#125; &#41; USE NOTICW&#46;DBF for n = 1 to MLCount&#40; cText &#41; APPEND BLANK field->Linha &#58;= MemoLine&#40; cText,, n &#41; next GO TOP Browse&#40;&#41; return nil [/code:qeio6e7i]
APPEND FROM ... SDF
El color del SAY funciona bien aqui. Estás usando temas de XP ? [url=http&#58;//imageshack&#46;us:3icgcgwa][img:3icgcgwa]http&#58;//img354&#46;imageshack&#46;us/img354/6334/colorfp9&#46;png[/img:3icgcgwa][/url:3icgcgwa]
APPEND FROM ... SDF
[quote="Antonio Linares":14c6msfy]Paulo, Añade el texto de esta forma: [code:14c6msfy] #include "FiveWin&#46;ch" function Main&#40;&#41; local cText &#58;= MemoRead&#40; "texto&#46;txt" &#41;, n DBCREATE&#40; "NOTICW&#46;DBF", &#123;&#123; "LINHA","C",255,0 &#125;&#125; &#41; USE NOTICW&#46;DBF for n = 1 to MLCount&#40; cText &#41; APPEND BLANK field->Linha &#58;= MemoLine&#40; cText,, n &#41; next GO TOP Browse&#40;&#41; return nil [/code:14c6msfy][/quote:14c6msfy] Funcionou, mas não é igual a Função APPEND FROM TEXTO.TXT SDF, o arquivo gerado pela Função acima gerou um DBF diferente do DBF do APPEND FROM SDF. Preciso que seja igual a APPEND FROM SDF
APPEND FROM ... SDF
[quote="Antonio Linares":rqvinfd4]El color del SAY funciona bien aqui. Estás usando temas de XP ? [url=http&#58;//imageshack&#46;us:rqvinfd4][img:rqvinfd4]http&#58;//img354&#46;imageshack&#46;us/img354/6334/colorfp9&#46;png[/img:rqvinfd4][/url:rqvinfd4][/quote:rqvinfd4] Sim uso tema do WINDOWS num arquivo .manifest, tirei o arquivo .manifest e funcionou corretamente. Porém em versões anteriores ele funcionava independente do arquivo .Manisfest.
APPEND FROM ... SDF
Paulo, > Preciso que seja igual a APPEND FROM SDF Es un comportamiento propio de xharbour que tendrás que reportar en el foro de xharbour, gracias
APPEND FROM ... SDF
[quote="Antonio Linares":32c9ex2z]Paulo, > Preciso que seja igual a APPEND FROM SDF Es un comportamiento propio de xharbour que tendrás que reportar en el foro de xharbour, gracias[/quote:32c9ex2z] O que fazer neste caso, eu uso a versão FWH7.05, qual outro build do xHarbour posso utilizar e como recomplicar as LIBs do FWH?
APPEND FROM ... SDF
Paulo, La mejor solución es que comentes el problema en comp.lang.xharbour (puedes registrarte y escribir en él desde Google, groups). Seguramente lo arreglaran en sólo unos dias
APPEND FROM ... SDF
Como conseguir outro build compativel com a versão 7.05 para fazer testes, a versão do xHarbour 99.70 é compativel? Onde consegui-la?
APPEND FROM ... SDF
Paulo, El pcode de otras versiones de xharbour no es compatible con FWH 7.05. Lo más fácil es que pidas ayuda en comp.lang.xharbour Otra solución sería reconstruir FiveHX.lib con el build de xharbour que te funciona bien con el APPEND FROM ... SDF
APPEND FROM ... SDF
[quote="Antonio Linares":vmgfc2af]Paulo, El pcode de otras versiones de xharbour no es compatible con FWH 7.05. Lo más fácil es que pidas ayuda en comp.lang.xharbour Otra solución sería reconstruir FiveHX.lib con el build de xharbour que te funciona bien con el APPEND FROM ... SDF[/quote:vmgfc2af] Como fazer para reconstruir a FiveHx.Lib? pretento testar com o build 99.70
APPEND FROM ... SDF
for %%f in (*.prg) do c:\harbour\bin\harbour %%f /n /ic:\fwh\include;c:\harbour\include for %%f in (*.c) do c:\bcc55\bin\bcc32 -c -Ic:\bcc55\include;c:\harbour\include %%f for %%f in (*.obj) do c:\bcc55\bin\tlib fivehx.lib -+ %%f /0 /P32,,
APPEND FROM ... SDF
[quote="Antonio Linares":2qinkj2f]for %%f in (*.prg) do c:\harbour\bin\harbour %%f /n /ic:\fwh\include;c:\harbour\include for %%f in (*.c) do c:\bcc55\bin\bcc32 -c -Ic:\bcc55\include;c:\harbour\include %%f for %%f in (*.obj) do c:\bcc55\bin\tlib fivehx.lib -+ %%f /0 /P32,,[/quote:2qinkj2f] Em qual diretório do FWH devo executar os comandos acima?
APPEND FROM ... SDF
Es preferible que crees un directorio nuevo en donde copies todos los PRGs de source\classes y source\function
APPEND FROM ... SDF
Resolvido mat_stru={} Aadd(mat_stru,{"LINHA","C",255,0}) DBCREATE("NOTICW.DBF",mat_stru) USE NOTICW.DBF SET(_SET_EOL,CHR(10)) // Muda o caracter de finalização APPEND de CHR(10)+CHR(13) para CHR(10) APPEND FROM NOTIC.DAT SDF GO TOP SET(_SET_EOL,cSvSetEOL) //Retorno o caracter de finalização default do APPEND CHR(10)+CHR(13) Resolvido por Flavio: <!-- m --><a class="postlink" href="http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10067">http://www.fivewin.com.br/forum/topic.a ... C_ID=10067</a><!-- m -->
APPEND FROM ... SDF
bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
APPEND FROM DE CLIPPER
Hola amigos, son mis primeros pasos con Clipper y tengo un problema que no pude resolver, tal vez me puedan ayudar dándome una pista. Desde el Append From quiero tomar un archivo .csv con ; (punto y coma) como separadores para meterlos en una tabla y me levanta todos los datos en el primer campo con el ; incluido, en lugar de meterlos en cada uno de los campos correspondientes.
APPEND FROM DE CLIPPER
Append From xxx.cvs DELIMITER ";" Salu2
APPEND FROM DE CLIPPER
Muchas Gracias por tu Ayuda Willi . Saludos !
APPEND FROM DELIMITED
Estoy tratando de importar datos de un fichero txt en el que los datos están delimitado con un * pero no logro importar más que el primer dato. Seguramente estaré haciendo algo mal. ¿Alguna sugerencia? Este es el código: [code=fw:2n3l0ufg]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Local</span> cNombreFi:=<span style="color: #ff0000;">"prueba.txt"</span><br /><span style="color: #00C800;">Local</span> aDbf:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #B900B9;">//</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TIPO"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DNI"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"NOMBRE"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"APE1"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"APE2"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DOMICILIO"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">41</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"CPOSTAL"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"NPROVIN"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"NLOCA"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  AADD<span style="color: #000000;">&#40;</span>aDbf,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TELEFONO"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">9</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #B900B9;">//</span><br />  DBCREATE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"PRUEBA"</span>,aDbf<span style="color: #000000;">&#41;</span><br />  <span style="color: #B900B9;">//</span><br />  DbUseArea<span style="color: #000000;">&#40;</span>.T.,,<span style="color: #ff0000;">"PRUEBA"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #B900B9;">//</span><br />  APPEND <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">&#40;</span>cNombreFi<span style="color: #000000;">&#41;</span> DELIMITED WITH <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"*"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #B900B9;">//</span><br /><br /> </div>[/code:2n3l0ufg]