topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Cambio de tipo de letra aleatorio | Hola amigos, estoy con un problema que no consigo localizar. Desde hace un tiempo tengo algunos clientes a los que, de vez en cuando, se les cambia el tipo de letra dentro de mi aplicación quedando los controles (barra de botones, gets, etc...) en negrita y más grande. Un tipo de letra que no utilizo en toda la aplicación ... ¿alguna pista? No se muy bien por dónde tirar. |
Cambio de tipo de letra aleatorio | Angel,
Eso suele suceder cuando estas destruyendo un font más veces de las necesarias. Busca por oFont:End()
Que versión de FWH estás usando ? |
Cambio de tipo de letra aleatorio | Hola Ángel,
El problema ocurre cuando un Font es released excesivamente.
En algún punto de tu programa hay un oFont:End() de más.
Para comprobarlo y como solución cortoplacista es poner oFont:nCount:= 999
Revisa:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=30017&hilit=ncount&start=15#p171326">viewtopic.php?f=6&t=30017&hilit=ncount&start=15#p171326</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=30228&start=0&hilit=ncount">viewtopic.php?f=6&t=30228&start=0&hilit=ncount</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=29235&start=0&hilit=ncount">viewtopic.php?f=6&t=29235&start=0&hilit=ncount</a><!-- l -->
Saludos |
Cambio de tipo de letra aleatorio | Antonio, FWH 12.04 . Quise probar la función checkres() pero el fichero que crea no contiene ningún recurso (incluso forzando a queden algunos sin destruir), puse Setresdebug (.T.) al inicio de la aplicación pero sin resultados.
Antonio, hmpaquito, voy a revisar lo que comentáis. Gracias. |
Cambio de tipo de letra aleatorio | A mi me ocurre a veces cuando utilizo un Font que no existe en otra máquina. En mi ordenador sale bien, pero en el otro, como no lo tiene, coge uno por efecto, supongo que algún ARIAL de tamaño medio. |
Cambio de xHarbour 1.21 a Harbour 3.2 | En el intento de cambiar de xHarbour a Harbour, me he topado con algunos problemillas visuales como por ejemplo:
en xHarbour
[img:2wuyn7cd]http://www.mayapos.com/FiveWin/brow3.png[/img:2wuyn7cd]
en Harbour, sin ninguna modificacion:
[img:2wuyn7cd]http://www.mayapos.com/FiveWin/brow4.png[/img:2wuyn7cd]
parte del codigo:
[code=fw:2wuyn7cd]<div class="fw" id="{CB}" style="font-family: monospace;"><br />:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">addbmpfile</span><span style="color: #000000;">(</span> Camino + <span style="color: #ff0000;">"images<span style="color: #000000;">\d</span>elete.bmp"</span> <span style="color: #000000;">)</span><br />:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">lBtnTransparent</span> := .T.<br />:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nBtnBmp</span> := <span style="color: #000000;">1</span><br />:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nEditType</span> := EDIT_BUTTON <br /> </div>[/code:2wuyn7cd]
Alguien tiene alguna sugerencia de como ver la imagen de la X como en la primera imagen???? Gracias |
Cambio de xHarbour 1.21 a Harbour 3.2 | He logrado modificar considerablemente el aspecto del boton cambiando el tamaño de la imagen...
[img:2ml7pj5j]http://www.mayapos.com/FiveWin/xbrowse6.png[/img:2ml7pj5j]
Pero me gustaría saber si hay alguna manera de que se muestre solo como una imagen y no como un boton... o sea de la manera que se mostraba en xHarbour... |
Cambio de xHarbour 1.21 a Harbour 3.2 | Hola Bayron, mas alla de esa diferencia en tu ejemplo, cual seria la diferencia entre usar uno y el otro?
osea, por que se te genero la inquitud a cambiar? me imagino a la compatibilidad en el uso de alguna libreria!!!
Saludos
Marcelo |
Cambio de xHarbour 1.21 a Harbour 3.2 | Bueno, desde el principio me llamó más la atención xHarbour, increiblemente por el nombre, ya que a menos que seas un programador muy avanzado haciendo algo más que manejar unos cuantos archivos .DBF, la diferencia ni la notarás... yo aún no lo hago... pero hoy por hoy, de acuerdo a lo que dicen otros usuarios, Harbour lleva la delantera en muchos aspectos... lo mejor es probarlo y ver si te conviene... Recuerda que casi todo el código es 100% compatible entre los dos, y solo en aspectos muy avanzados tendrás que modificar algo...
La razón del cambio mía, es porque desde algun tiempo he venido eliminando las librerías de terceros y bueno, es mucho más fácil el cambio...
[url:2jprn26y]http://harbour-project.svn.sourceforge.net/viewvc/harbour-project/trunk/harbour/doc/xhb-diff.txt[/url:2jprn26y]
o simplemente busca[color=#0000BF:2jprn26y] Harbour vs xHarbour [/color:2jprn26y]en google y encontrarás más... |
Cambio de xHarbour 1.21 a Harbour 3.2 | Muchas gracias Bayron, voy a intentar probarlo y compararlo en cuanto a la estabilidad y velocidad.
Saludos
Marcelo |
Cambio del tamaño de la imagen con thumbnails | Foro buenos días, esa es la pregunta, estoy probando un thumbnails con la clase txbrgrid que apareció publicada en este foro, y ahora se me hace necesario poder cambiar el tamaño de las imágenes.
¿Qué se modificar para lograrlo?
Gracias
Algún ejemplo funcional |
Cambio del tamaño de la imagen con thumbnails | clase txbrgrid?? Donde la encuentro? Gracias. |
Cambio del tamaño de la imagen con thumbnails | Esta es la clase..
[code=fw:2vzho4qi]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* Begin ========================================================================================================== *<br />* DERIVED <span style="color: #00C800;">CLASS</span><br /><span style="color: #00C800;">CLASS</span> TXbrGrid <span style="color: #0000ff;">FROM</span> TXBrowse<br /><br /> CLASSDATA lRegistered AS LOGICAL && This is compulsory <span style="color: #00C800;">for</span> derived classes<br /> <span style="color: #00C800;">DATA</span> bColClass <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">{</span> | | TXbGridCol <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">DATA</span> nGridCols <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">1</span> <span style="color: #00C800;">PROTECTED</span><br /> <span style="color: #00C800;">DATA</span> hlGridView AS LOGICAL <span style="color: #0000ff;">INIT</span> .F.<br /> <span style="color: #00C800;">DATA</span> nRows<br /><br /> ACCESS lListview <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">(</span> ! ::<span style="color: #000000;">hlGridView</span> <span style="color: #000000;">)</span><br /> ASSIGN lListView <span style="color: #000000;">(</span> l <span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> IIF <span style="color: #000000;">(</span> ::<span style="color: #000000;">hlGridView</span> == l, <span style="color: #000000;">(</span> ::<span style="color: #000000;">hlGridview</span> := ! l, ::<span style="color: #000000;">ResetGridView</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ::<span style="color: #0000ff;">Refresh</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /> ACCESS lGridView <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">hlGridView</span> <span style="color: #000000;">)</span><br /> ASSIGN lGridView <span style="color: #000000;">(</span> l <span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> IIF <span style="color: #000000;">(</span> ::<span style="color: #000000;">hlGridView</span> != l, <span style="color: #000000;">(</span> ::<span style="color: #000000;">hlGridView</span> := l, ::<span style="color: #000000;">ResetGridView</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ::<span style="color: #0000ff;">Refresh</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span> <span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span> CONSTRUCTOR<br /> <span style="color: #00C800;">METHOD</span> SetArray <span style="color: #000000;">(</span> aData, lAutoSort, nColOrder, aCols <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Adjust</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">METHOD</span> Resize <span style="color: #000000;">(</span> nSizeType, nWidth, nHeight <span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">ResetGridView</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #00C800;">Super</span>:<span style="color: #000000;">ReSize</span> <span style="color: #000000;">(</span> nSizeType, nWidth * <span style="color: #000000;">2</span>, nHeight * <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">PROTECTED</span>:<br /> <span style="color: #00C800;">METHOD</span> ResetGridView<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXbrGrid<br /><br /> <span style="color: #00C800;">Super</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">METHOD</span> SetArray <span style="color: #000000;">(</span> aData, lAutoSort, nColOrder, aCols <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXbrGrid<br /><span style="color: #00C800;">Local</span> nCols, n<br /><br /><span style="color: #00C800;">IF</span> VALTYPE <span style="color: #000000;">(</span> aCols <span style="color: #000000;">)</span> != <span style="color: #ff0000;">"A"</span>; aCols := <span style="color: #00C800;">NIL</span>; <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">Super</span>:<span style="color: #000000;">SetArray</span> <span style="color: #000000;">(</span> aData, .F., <span style="color: #00C800;">NIL</span>, aCols <span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">nRows</span> := LEN <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">nRows</span> <span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">bEof</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">nArrayAt</span> > ::<span style="color: #000000;">nRows</span> * ::<span style="color: #000000;">nGridCols</span> <span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">bGoTop</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">nArrayAt</span> := <span style="color: #000000;">1</span> <span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">bGoBottom</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">nArrayAt</span> := <span style="color: #000000;">(</span> ::<span style="color: #000000;">nRows</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> * ::<span style="color: #000000;">nGridCols</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">nRows</span> <span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">bSkip</span> := <span style="color: #000000;">{</span> | nSkip, nOld | IIF <span style="color: #000000;">(</span> nSkip == <span style="color: #00C800;">NIL</span>, nSkip := <span style="color: #000000;">1</span>, <span style="color: #000000;">)</span>, ;<br /> nOld := ::<span style="color: #000000;">nArrayAt</span>, ;<br /> ::<span style="color: #000000;">nArrayAt</span> += ::<span style="color: #000000;">nGridCols</span> * nSkip, ;<br /> ::<span style="color: #000000;">nArrayAt</span> := <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">nArrayAt</span>, ::<span style="color: #000000;">nRows</span> * ::<span style="color: #000000;">nGridCols</span> - <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">(</span> ::<span style="color: #000000;">nArrayAt</span> - nOld <span style="color: #000000;">)</span> / ::<span style="color: #000000;">nGridCols</span> <span style="color: #000000;">}</span><br /><br /> ::<span style="color: #000000;">bBookMark</span> := ::<span style="color: #000000;">bKeyNo</span> := <span style="color: #000000;">{</span> | n | IIF <span style="color: #000000;">(</span> n != <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">nArrayAt</span> := <span style="color: #000000;">(</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> * ::<span style="color: #000000;">nGridCols</span> + <span style="color: #000000;">1</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span>, INT <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">nArrayAt</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> / ::<span style="color: #000000;">nGridCols</span> <span style="color: #000000;">)</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">}</span><br /><br /> nCols := LEN <span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span> <span style="color: #000000;">)</span><br /> AEval <span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #000000;">{</span> | o | o:<span style="color: #000000;">nArrayRow</span> := <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Adjust</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASs</span> TXbrGrid<br /><span style="color: #00C800;">Local</span> n<br /><br /><span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">10</span><br /> AddGridCols <span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span>, LEN <span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span> <span style="color: #000000;">)</span>, n <span style="color: #000000;">)</span><br /><span style="color: #00C800;">NEXT</span> n <br /><br />AEVAL <span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #000000;">{</span> | o, i | o:<span style="color: #000000;">nCreationOrder</span> := i <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">Adjust</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">Static</span> <span style="color: #00C800;">Function</span> AddGridCols <span style="color: #000000;">(</span> oBrw, nCols, n <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> nCol<br /><br /><span style="color: #00C800;">FOR</span> x := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCols<br /> AADD <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aCols</span>, OClone <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">[</span> x <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <br /> WITH OBJECT ATAIL <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nArrayRow</span> := n<br /> :<span style="color: #000000;">lHide</span> := .T.<br /> END<br /><br /><span style="color: #00C800;">NEXT</span> x<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">METHOD</span> ResetGridview <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXbrGrid<br /><span style="color: #00C800;">Local</span> nWidth := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">Local</span> nCols := <span style="color: #000000;">0</span><br /><br />AEVAL <span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #000000;">{</span> | o | IIF <span style="color: #000000;">(</span> EMPTY <span style="color: #000000;">(</span> o:<span style="color: #000000;">nArrayRow</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">(</span> nCols ++, nWidth += o:<span style="color: #000000;">nWidth</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br />nWidth += <span style="color: #000000;">3</span><br /><br /><span style="color: #00C800;">IF</span> ::<span style="color: #000000;">hlGridView</span><br /> ::<span style="color: #000000;">nGridCols</span> := INT <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">BrwWidth</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span> - <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> / nWidth <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">nRows</span> := Ceiling <span style="color: #000000;">(</span> LEN <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span> / ::<span style="color: #000000;">nGridCols</span> <span style="color: #000000;">)</span><br /> nCols *= ::<span style="color: #000000;">nGridCols</span><br /><br /><span style="color: #00C800;">ELSE</span> <br /> ::<span style="color: #000000;">nGridCols</span> := <span style="color: #000000;">1</span><br /> ::<span style="color: #000000;">nRows</span> := LEN <span style="color: #000000;">(</span> ::<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span> <br /><br />AEVAL <span style="color: #000000;">(</span> ::<span style="color: #000000;">aCols</span>, <span style="color: #000000;">{</span> | o, i | o:<span style="color: #000000;">lHide</span> := o:<span style="color: #000000;">nCreationOrder</span> > nCols <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br />::<span style="color: #000000;">GetDisplayCols</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />* ::<span style="color: #0000ff;">Refresh</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span><br />* End ============================================================================================================ *<br /><br />* Begin ========================================================================================================== *<br /><span style="color: #00C800;">CLASS</span> TXbGridCol <span style="color: #0000ff;">FROM</span> TXBrwColumn<br /><br /> <span style="color: #00C800;">DATA</span> nArrayRow <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span> <span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span> CONSTRUCTOR<br /> <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Adjust</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span> <span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXbGridCol<br /><br /><span style="color: #00C800;">Super</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oBrw <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Adjust</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXbGridCol<br /><span style="color: #00C800;">Local</span> tmp<br /><br />::<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> | x | IIF <span style="color: #000000;">(</span> x == <span style="color: #00C800;">NIL</span>, ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">ArrCell</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span> + ::<span style="color: #000000;">nArrayRow</span>, ::<span style="color: #000000;">nArrayCol</span> <span style="color: #000000;">)</span>,;<br /> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">ArrCellSet</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span> + ::<span style="color: #000000;">nArrayRow</span>, ::<span style="color: #000000;">nArrayCol</span>, x <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #00C800;">IF</span> VALTYPE <span style="color: #000000;">(</span> ::<span style="color: #000000;">bBmpData</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"N"</span><br /> tmp := ::<span style="color: #000000;">bBmpData</span><br /> ::<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">aRow</span> <span style="color: #000000;">[</span> tmp <span style="color: #000000;">]</span> <span style="color: #000000;">}</span><br /><br />ELSEIF ::<span style="color: #000000;">bStrData</span> == <span style="color: #00C800;">NIL</span> .AND. ! ::<span style="color: #000000;">hChecked</span><br /> ::<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> | | ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">ArrCell</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span> + ::<span style="color: #000000;">nArrayRow</span>, ::<span style="color: #000000;">nArrayCol</span>, ::<span style="color: #000000;">cEditPicture</span>, ::<span style="color: #000000;">lDisplayZeros</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><span style="color: #00C800;">ENDIF</span> <br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">Adjust</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />* End ============================================================================================================ *<br /><br />* ---------------------------------------------------------------------------------------------------------------- *<br />*<br />*<br />*<br /><br /> </div>[/code:2vzho4qi] |
Cambio del tamaño de la imagen con thumbnails | Tiens un ejemplo práctico/simples, para teste? gracias, saludos. |
Cambio del tamaño de la imagen con thumbnails | Este es un ejemplo tomado desde el foro
[code=fw:2f2wlgam]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* -------------------------------------------------------------------------------------------------------------- *<br /><span style="color: #00C800;">Function</span> Main <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oWnd_BMP, oBar_BMP, oBrw_BMP, aData_BMP, oFont_12, oFont_16<br /><span style="color: #00C800;">Local</span> n<br /><br /><span style="color: #00C800;">Public</span> cPath <br />*<span style="color: #00C800;">Local</span> sFileName := cGetFile <span style="color: #000000;">(</span> <span style="color: #ff0000;">"*.dbf"</span> , <span style="color: #ff0000;">"Seleccione un archivo DBF"</span>, <span style="color: #000000;">1</span> , sDirName , .T. , .T. , <span style="color: #000000;">)</span><br />*<span style="color: #00C800;">Local</span> sFileName := cGetFile <span style="color: #000000;">(</span> <span style="color: #ff0000;">"*.dbf"</span> , <span style="color: #ff0000;">"Seleccione un archivo DBF"</span>, <span style="color: #000000;">1</span> , <span style="color: #ff0000;">"<span style="color: #000000;">\"</span> , .T. , .T. , )<br />* cGetFile ( <cFileMask>, <cTitle> , [<nDefaultMask>], [<cInitialDirectory>], [lSave], [lLongNames], [nFlags] ) -> <sFileName><br /><br />SW := "</span> <span style="color: #ff0000;">"<br /><br />DEFINE FONT oFont_12 NAME "</span>Times <span style="color: #00C800;">New</span> Roman<span style="color: #ff0000;">" SIZE 0, -12 ITALIC<br />DEFINE FONT oFont_16 NAME "</span>Times <span style="color: #00C800;">New</span> Romna<span style="color: #ff0000;">" SIZE 0, -16 ITALIC BOLD<br /><br />DO WHILE SW = "</span> <span style="color: #ff0000;">"<br /> <br /> cpath := "</span><span style="color: #ff0000;">"<br /> cPath := cGetDir ( "</span>Seleccione Directorio/Carpeta de imagenes *.bmp<span style="color: #ff0000;">", "</span>\<span style="color: #ff0000;">" , .T. )<br />* cGetDir ( cTitle , cInitDir, l95Look )<br /><br /> IF LEN ( ALLTRIM ( cPath ) ) = 0 <br /> SW := "</span>*<span style="color: #ff0000;">"<br /><br /> ELSE<br /> cPath += "</span>\<span style="color: #ff0000;">"<br /> aData_BMP := {}<br /> AEVAL ( DIRECTORY ( cPath + "</span>*.bmp<span style="color: #ff0000;">" ), { | a | AADD ( aData_BMP, { cPath + a [ 1 ], SUBSTR ( a [ 1 ], 1, AT ( "</span>.<span style="color: #ff0000;">", a [ 1 ] ) - 1 ) } ) } ) && a [ 1 ] } ) } )<br />* STRTRAN ( a [ 1 ], "</span>.bmp<span style="color: #ff0000;">", "</span><span style="color: #ff0000;">" ) <br />* Listado de imagenes bmp imagen bmp , nombre del archivo <br /><br /> DEFINE WINDOW oWnd_BMP<br /><br /> oWnd_BMP:SetFont ( oFont_12 )<br /> <br /> DEFINE BUTTONBAR oBar_BMP OF oWnd_BMP SIZE 100,32 2007<br /> DEFINE BUTTON OF oBar_BMP PROMPT "</span>Vista_Verical<span style="color: #ff0000;">" ACTION ( oBrw_BMP:lListView := .T. )<br /> DEFINE BUTTON OF oBar_BMP PROMPT "</span>Vista_Cuadricula<span style="color: #ff0000;">" ACTION ( oBrw_BMP:lGridView := .T. )<br /><br /> @ 040, 020 XBROWSE oBrw_BMP SIZE -30, -30 PIXEL OF oWnd_BMP ; && 40, 40<br /> DATASOURCE aData_BMP ;<br /> COLUMNS ;<br /> 1 ,;<br /> 2 ;<br /> HEADERS ;<br /> "</span>Foto<span style="color: #ff0000;">" ,;<br /> "</span>Código<span style="color: #ff0000;">" ;<br /> SIZES ;<br /> 060 ,;<br /> 120 ;<br /> NOBORDER ;<br /> CLASS TXbrGrid ()<br /><br /> WITH OBJECT oBrw_BMP<br /> :lHeader := :lFooter := .T. && .F.<br /> :lHScroll := :lVScroll := :lRecordSelector := .T.<br /> <br /> WITH OBJECT :aCols [ 1 ]<br /> :cDataType := "</span>F<span style="color: #ff0000;">"<br /> :nDataBmpAlign := AL_CENTER<br /> :lBmpTransparent := .T.<br /> END<br /><br /> :nRowHeight := 60 && Altura de la fila<br /> :CreateFromCode ()<br /> END<br /><br /> oBrw_BMP:bRClicked := { | | xbrowse ( oBrw_BMP ) } && Cuando haga click sobre la imagen<br /><br /> ACTIVATE WINDOW oWnd_BMP MAXIMIZED && ;<br />* ON INIT ( oBrw_BMP:lGridView := .T. )<br /><br /> ENDIF<br />ENDDO <br /> <br />RELEASE FONT oFont_12, oFont_16<br /><br />Return ( NIL )<br />* ---------------------------------------------------------------------------------------------------------------- *<br /></span></div>[/code:2f2wlgam]
Añadir la clase
Saludos |
Cambio del tamaño de la imagen con thumbnails | Que intentas hacer?
[img:2lw5lstq]http://i.imgur.com/ZcsXN5H.png[/img:2lw5lstq] |
Cambio del tamaño de la imagen con thumbnails | [img:62ulew52]http://i.imgur.com/xU734tY.png[/img:62ulew52] |
Cambio del tamaño de la imagen con thumbnails | Fuentes y .EXE para testes:
[url:jmpdjbq9]http://www.4shared.com/rar/MlmW_uSTba/TXTGRID.html[/url:jmpdjbq9]
Saludos. |
Cambio del tamaño de la imagen con thumbnails | Estoy intentando agrandar la imagen para visualizarla mejor. |
Cambio del tamaño de la imagen con thumbnails | I made this class in 2012.
\fwh\samples\xblstgrd.prg
Do you want to enlarge to its original size? or more than the original size?
Is it okay for you to see full image in separate dialog if you click on the image?
What is the latest fwh version you have? |
Cambio dinamico de color en Say (SOLUCIONADO) | Hola gente
Tengo definido un SAY con un determinado color, que tiene la clausula UPDATE
Mas adelante, cambio el texto y pretendo cambiar el color haciendo:
oSay:SetText( "nuevo texto )
oSay:SetColor( CLR_HRED )
oSay:Refresh
y mantiene el color inicial
Tambien probe con:
oSay:Hide()
oSay:SetText( "nuevo texto )
oSay:SetColor( CLR_HRED )
oSay:Refresh()
tampoco funciona
Cual es la manera?, si la hay
gracias
USO FWH FWHX 2.7 December 2005 <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> |
Cambio dinamico de color en Say (SOLUCIONADO) | Hola Mario
te falta el segundo parametro del setcolor( nClrText, nClrBack ), si quieres mantener el mismo "fondo" has lo siguiente
oSay:SetColor( CLR_RED, oSay:nClrPane )
aprovecho la oprtunidad para decirte que fivetech tiene una version "minima" disponible, es mas reciente a la que usas actualmente, la puedes decargar desde la pagina oficial de fivetech
[url:3fo69xmh]http://www.fivetechsoft.com/english/downloads.html[/url:3fo69xmh] |
Cambio dinamico de color en Say (SOLUCIONADO) | Daniel;
Gracias por la respuesta.
Tambien por el dato
Saludos |
Cambio dinamico de color en Say (SOLUCIONADO) | Gente;
Retomo este tema porque al parecer, hace 2 años atras no lo solucione <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
Tengo la siguiente situacion;
[code=fw:341uibje]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">RADIO</span> saO<span style="color: #000000;">[</span>_Radio1<span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">nDocForma</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span>,<span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oDlgV</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">WHEN</span> Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aArticulos</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span>_CodArt<span style="color: #000000;">]</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nDctoTipo</span>==_NDEBITO, CLR_HRED, CLR_HGREEN <span style="color: #000000;">)</span>, saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">)</span>, ;<br /> saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> ...<br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">hDatDcto</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"TOTAL"</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">32</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oDlgV</span> <span style="color: #0000ff;">PICTURE</span> PIC_OCHOCIF0 <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">hFont</span><span style="color: #000000;">[</span><span style="color: #ff0000;">"Calibri40B"</span><span style="color: #000000;">]</span> <br /> </div>[/code:341uibje]
Tambien probe haciendo
[code=fw:341uibje]<div class="fw" id="{CB}" style="font-family: monospace;">... <br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #000000;">nClrText</span>:= <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nDctoTipo</span>==_NDEBITO, CLR_HRED, CLR_HGREEN <span style="color: #000000;">)</span>, ;<br /> saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #000000;">Colors</span><span style="color: #000000;">(</span> saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #000000;">hDC</span> <span style="color: #000000;">)</span>, saO<span style="color: #000000;">[</span>_STOTAL <span style="color: #000000;">]</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:341uibje]Sin exito
Se puede?, como?
gracias |
Cambio dinamico de color en Say (SOLUCIONADO) | Prueba haciendo esto:
[code=fw:6so7hpon]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> SayDinamico<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oDlg,oSay,oTmr<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"UPDATE"</span> TRANSPARENT<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">TIMER</span> oTmr <span style="color: #0000ff;">INTERVAL</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">(</span>ChangeColor<span style="color: #000000;">(</span>oSay<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cambiando de Color"</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> oTmr<br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> ChangeColor<span style="color: #000000;">(</span> oSay <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">STATIC</span> lStatus := .F.<br /> <br /> <span style="color: #00C800;">IF</span> lStatus<br /> oSay:<span style="color: #000000;">SETCOLOR</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"0"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span> <br /> oSay:<span style="color: #000000;">SETCOLOR</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"R+/W*"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> lStatus = ! lStatus<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span></div>[/code:6so7hpon]
A mi me funciona desde recurso.. Saludos.. |
Cambio dinamico de color en Say (SOLUCIONADO) | No me funciona aplicando :SetColor() ni dando valor a :nClrText y luego aplicando:Colors()
Cual puede ser el problema?
gracias |
Cambio dinamico de color en Say (SOLUCIONADO) | toc...toc
otra forma? |
Cambio dinamico de color en Say (SOLUCIONADO) | NOOOOOOOOOOOOOOOOOOOOO! ... estoy lgual que Luis (Mostrar xBrowse filtrado....)
Tengo 2 Radiobox. Pretendiendo cambiar el color de un Say de acerudo a la seleccion del Radio.... solo que evaluaba el SetColor() al cambiar el Radio1; cuando debía hacerlo con el Radio2!!! ... que papelon! <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
Por suerte me puse a preparar un sample para mostrar, y como anduvo, no me quedo otra que mirar mi codigo con mas atención!
Agrego; usando :nClrText:= nnn y :Colors( hDC ), tambien funciona!... como no podía ser de otra manera <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
...gracias a lso 50 y tantos que lo leyeron! |
Cambio en Errorsys | Hola,
Alguno de ustedes ha conseguido cambiar el errorsys de forma que solo se quite el programa si pulsarmos el botón QUIT, y si pulsarmos el botón SALIR el programa continue normalmente? Se si, donde puedo coger tal información?
Saludos |
Cambio en Errorsys | No es tan facil, continuar o no la ejecucion de un programa depende del tipo de error que se haya generado, algunos errores pueden "reintentar" pero otros requieren que la aplicacion se aborte.
Clipper posee un "objeto Error" y (x)Harbour hereda dicho comportamiento, funciona asi:
Existe una funcion "global" llamada ErrorBlock(), que recibe como parámetro un bloque de código el cual a su vez puede recibe como parametro el objeto error, el bloque de codigo lleva una funcion a la cual se va a llamar cuando el programa cause un error:
ErrorBlock({|oError| MiControlDeErrores(oError)})
Tan simple como eso, cuando tu programa cause un error, se llama de manera automatica a la funcion MiControlDeErrores() y ahi, tu puedes escribir lo que tu quieras que pase con los errores.
Lo mas facil es hacer:
Funcion MiControlDeErrores(oError)
QUIT
RETURN
Asi el programa directamente se sale sin hacer mas preguntas.
FiveWin tiene el Errsysw.prg que contiene la función que controla los errores en tiempo de ejecucion de FiveWin, esta en \source\function. Esta funcion "analiza" el objeto error y en base a eso dibuja el dialogo muestra el listado de errores y dependiendo del estado del error muestra los botones correspondientes, en algunos casos, dependiendo de la serveridad del error sera el "Default", en otras el "Retry" y en otras directamente el "Quit", pero todo esto vienen de analizar las datas del objeto error.
Para mas informacion sobre las propiedades del objeto ERROR las puedes encontrar en el manual de Clipper. |
Cambio en Errorsys | Maestro Rene,
Gracias por la aclaración. Lo que pasa es que en el Errsysw.prg de Fivewin me muestra siempre la misma pantalla con los mismos botones, no importando si el error es un error que se pueda intentar nuevamente o no. Por eso pregunto se si puede "forzar" la diferenciación de un error y otro, y asi hacer una "configuración" del errorsys.
Saludos, |
Cambio en Registro de Windows | Hola Amigos:
Hace algún tiempo puse el siguiente post
<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=1104">http://fivetechsoft.com/forums/viewtopic.php?t=1104</a><!-- m -->
y después de muchas pruebas, ya que es de esas cosas que tenía que funcionar porque estaba todo bien estructurado, y no funcionaba, he visto la solución de casualidad aunque de manera muy chunga.
La cuestión era la siguiente:
Escribo en el registro el directorio y el nombre del pdf.
oReg:=TReg32():New(HKEY_CURRENT_USER,"SOFTWARE\PDFCreator\Program")
oReg:Set("AutosaveDirectory","c:\pruebas")
oReg:Set("AutosaveFilename",ccodpro+"-"+cliqui)
oReg:Close()
Si ahora abro el controlador de impresora
PRINT oPrn TO "PDFCreator"
.................. etc
Pues no funciona.
Pero si justo después de oReg:Close() pongo msginfo('Espera'), pues ya si funciona. Esto quiere decir que necesita tiempo para grabar en el registro antes de utilizar la impresora ?.
Voy a sustituir el msginfo() por un Timer a ver si funciona.
Comentadme algo sobre éste tema.
Saludos
Jose Luis |
Cambio en Registro de Windows | Jose Luis,
Usa SysRefresh() en vez de MsgInfo(). Posiblemente Windows necesite procesar algunos mensajes antes de que esté disponible. |
Cambio en Registro de Windows | Hola Antonio
Nada, le pongo SysRefresh(), For..Next, MsgWait(), etc. y sólo me funciona cuando pongo un mensaje que detenga y que haya que pulsar para seguir msgalert(), msginfo() etc.
No habrá algo que sustituya a ésto para que no tenga que estar dándole a la teclita cada vez que me imprima una factura ?
Saludos
Jose Luis |
Cambio en api hb_par*() / hb_stor*() de harbour | Antonio,
Segun lei en la lista de harbour, existe un cambio en el api de hb_par*() / hb_stor*(), y creo que obliga a cambiar/recompilar fwh para que funcione con la ultima version del svn de harbour ( 11478 ).
Atte.,
Lautaro |
Cambio en api hb_par*() / hb_stor*() de harbour | Lautauro,
Vamos a revisarlo cuanto antes, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambio en api hb_par*() / hb_stor*() de harbour | Olá antonio,
Seria possível para este problema um "fix" no fwh 9.05 ? |
Cambio en api hb_par*() / hb_stor*() de harbour | Rossine,
Creo que la solución correcta es implementar una capa de compatibilidad, para que la misma FiveHC.lib trabaje con versiones antiguas de Harbour tambien.
No podemos forzar a los usuarios de FWH y Harbour a que tengan que usar el Harbour más reciente, que además de momento tiene problemas con OleAuto y ActiveX.
La versión de Harbour que nosotros distribuimos funciona correctamente con OleAuto y ActiveX, y no necesita cambios en el extend API, y es totalmente estable. Aunque no sea la versión más actual del SVN. |
Cambio tipo de datos xbrowse | Hola buenos días para todos
Como dice el encabezado, requiero cambiar el tipo de datos que se muestra en un xbrowse, inicialmente cargamos un tree, pero quiero poder cambiarlo por un array. Tambien cambiar la cantidad de columnas que se muestran.
Dejo este código para ver si pueden ayudarme, espero haberme hecho entender, de antemano gracias
[code=fw:165wzxdw]<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;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw<br /> <span style="color: #00C800;">local</span> oTree , oBtn<br /> <span style="color: #00C800;">local</span> aOther := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aCols := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Code"</span>,<span style="color: #ff0000;">"Name"</span>,<span style="color: #ff0000;">"Cant"</span>,<span style="color: #ff0000;">"Value"</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aCol2 := <span style="color: #000000;">{</span><span style="color: #ff0000;">"cod"</span>,<span style="color: #ff0000;">"name"</span>,<span style="color: #ff0000;">"cant"</span>,<span style="color: #ff0000;">"value"</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> cbChange := <||<br /> oBrw:<span style="color: #000000;">nDataType</span> := DATATYPE_ARRAY<br /> oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">(</span> aOther, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, aCol2 <span style="color: #000000;">)</span><br /> oBrw:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"finish"</span><span style="color: #000000;">)</span><br /> ><br /> <br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"001"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"First"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">1</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">15</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"002"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"Second"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">2</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">54</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"001"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"Third"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">9</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">77</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <br /> USE Customer<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Field->State <span style="color: #0000ff;">TO</span> State<br /> SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"State"</span><br /> GO TOP<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Cambiando el tipo de datos xbrowse"</span><br /> <br /> oTree := BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> BUTTONBMP oBtn <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cambiar"</span> <span style="color: #0000ff;">ACTION</span> EVAL<span style="color: #000000;">(</span>cbChange<span style="color: #000000;">)</span> <br /> <br /> @ <span style="color: #000000;">50</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd ;<br /> LINES <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER ;<br /> DATASOURCE oTree COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> ; <br /> HEADERS <span style="color: #ff0000;">"State & City"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"First"</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oTree, cState<br /><br /> TREE oTree<br /> <span style="color: #00C800;">while</span> ! Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cState <span style="color: #000000;">)</span><br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>, Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> TREE<br /> cState = Customer->State<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">if</span> cState != Customer->State<br /> ENDTREE<br /> cState = Customer->State<br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>, Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> TREE<br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">if</span> Customer->State == cState<br /> _TreeItem<span style="color: #000000;">(</span> Customer->City <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Customer->Last, Customer->First <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">endif</span> <br /> SKIP<br /> <span style="color: #00C800;">enddo</span><br /> ENDTREE<br /> ENDTREE<br /> oTree:<span style="color: #000000;">OpenAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> GO TOP<br /><br /><span style="color: #00C800;">return</span> oTree<br /> </div>[/code:165wzxdw] |
Cambio tipo de datos xbrowse | Algo asi Leandro?
[code=fw:8if15pn9]<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;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw<br /> <span style="color: #00C800;">local</span> oTree , oBtn<br /> <span style="color: #00C800;">local</span> aOther := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> aCols := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Code"</span>,<span style="color: #ff0000;">"Name"</span>,<span style="color: #ff0000;">"Cant"</span>,<span style="color: #ff0000;">"Value"</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> aCol2 := <span style="color: #000000;">{</span><span style="color: #ff0000;">"cod"</span>,<span style="color: #ff0000;">"name"</span>,<span style="color: #ff0000;">"cant"</span>,<span style="color: #ff0000;">"value"</span><span style="color: #000000;">}</span><br /><br /> <br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"001"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"First"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">1</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">15</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"002"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"Second"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">2</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">54</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"001"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"Third"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">9</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">77</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <br /> USE Customer<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Field->State <span style="color: #0000ff;">TO</span> State<br /> SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"State"</span><br /> GO TOP<br /> lTree := .t.<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Cambiando el tipo de datos xbrowse"</span><br /> <br /> oTree := BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"HASH"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br /> <span style="color: #0000ff;">ACTION</span> Mutar<span style="color: #000000;">(</span>aOther,oBrw, aCol2<span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">50</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd ;<br /> LINES <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER ;<br /> DATASOURCE oTree COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> ;<br /> HEADERS <span style="color: #ff0000;">"State & City"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"First"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1300</span>,<span style="color: #000000;">600</span><br /><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oTree, cState<br /><br /> TREE oTree<br /> <span style="color: #00C800;">while</span> ! Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cState <span style="color: #000000;">)</span><br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>, Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> TREE<br /> cState = Customer->State<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">if</span> cState != Customer->State<br /> ENDTREE<br /> cState = Customer->State<br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>, Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> TREE<br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">if</span> Customer->State == cState<br /> _TreeItem<span style="color: #000000;">(</span> Customer->City <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Customer->Last, Customer->First <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">endif</span> <br /> SKIP<br /> <span style="color: #00C800;">enddo</span><br /> ENDTREE<br /> ENDTREE<br /> oTree:<span style="color: #000000;">OpenAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> GO TOP<br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><br />******************************************<br />** Mutar a Hash<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Mutar<span style="color: #000000;">(</span>aOther,oBrw,aCol2<span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">(</span> aOther, .f., <span style="color: #000000;">0</span>, aCol2 <span style="color: #000000;">)</span> <br /> oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:8if15pn9]
Lo que no encuentro es como volver de nuevo a la vista arbol.
Si lo solucionas avisa.
Saludos |
Cambio tipo de datos xbrowse | Hola Cesar buenos días, muchas gracias por responder
Si funciona, perfecto para array, tambien estuve intentando devolverlo a tree, pero no funciona. Esta tarde continuo intentando, si obtengo algún resultado positivo, de cuento.
Gracias por la ayuda. |
Cambio tipo de datos xbrowse | +1
Mr. Nages buenas tardes
Sera que tu, nos puedes ayudar a cambiar el tipo de datos de array a tree. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> |
Cambio tipo de datos xbrowse | Hola Leandro:
Fijate aqui [url:2iycr96j]https://forums.fivetechsupport.com/viewtopic.php?f=6&t=42922&sid=0396673029a2a41b3f374dd4ec04a26f&sid=0396673029a2a41b3f374dd4ec04a26f#p258122[/url:2iycr96j]
Aqui cambias pero con la misma estructura de datos (es en dbf, pero podría adaptarse a Mysql o Array)
También otra respuesta que había visto en el foro, es mostrar y ocultar los xbrowse superpuestos, cuando los datos nada tienen que ver unos con otros, y no me parecio mala idea.
[code=fw:2iycr96j]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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;">"xbrowse.ch"</span><br /><span style="color: #00C800;">STATIC</span> lTree<br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">local</span> oWnd, oBrw, oBrw1<br /> <span style="color: #00C800;">local</span> oTree , oBtn<br /> <span style="color: #00C800;">local</span> aOther := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> aCols := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Code"</span>,<span style="color: #ff0000;">"Name"</span>,<span style="color: #ff0000;">"Cant"</span>,<span style="color: #ff0000;">"Value"</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> aCol2 := <span style="color: #000000;">{</span><span style="color: #ff0000;">"cod"</span>,<span style="color: #ff0000;">"name"</span>,<span style="color: #ff0000;">"cant"</span>,<span style="color: #ff0000;">"value"</span><span style="color: #000000;">}</span><br /><br /> <br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"001"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"First"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">1</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">15</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"002"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"Second"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">2</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">54</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cod"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"001"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"name"</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"Third"</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"cant"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">9</span><br /> hLine<span style="color: #000000;">[</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">]</span> := <span style="color: #000000;">77</span><br /> AADD<span style="color: #000000;">(</span>aOther,hLine<span style="color: #000000;">)</span><br /> hLine := <span style="color: #000000;">{</span>=><span style="color: #000000;">}</span><br /> <br /> USE Customer<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> Field->State <span style="color: #0000ff;">TO</span> State<br /> SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"State"</span><br /> GO TOP<br /> lTree := .t.<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Cambiando el tipo de datos xbrowse"</span><br /> <br /> oTree := BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"HASH"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oWnd FLAT ;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>Mutar<span style="color: #000000;">(</span>oBrw, oBrw1<span style="color: #000000;">)</span>, oBtn:<span style="color: #000000;">cTitle</span> := <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>lTree,<span style="color: #ff0000;">"HASH"</span>,<span style="color: #ff0000;">"TREE"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <br /> @ <span style="color: #000000;">50</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd ;<br /> LINES <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER ;<br /> DATASOURCE oTree COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> ;<br /> HEADERS <span style="color: #ff0000;">"State & City"</span>, <span style="color: #ff0000;">"Last"</span>, <span style="color: #ff0000;">"First"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1300</span>,<span style="color: #000000;">600</span><br /><br /> @ <span style="color: #000000;">50</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw1 <span style="color: #0000ff;">OF</span> oWnd ;<br /> LINES <span style="color: #0000ff;">STYLE</span> FLAT NOBORDER ;<br /> DATASOURCE aOther COLUMNS <span style="color: #ff0000;">"Cod"</span>,<span style="color: #ff0000;">"Name"</span>,<span style="color: #ff0000;">"Cant"</span>,<span style="color: #ff0000;">"Value"</span> ;<br /> HEADERS <span style="color: #ff0000;">"Code"</span>,<span style="color: #ff0000;">"Name"</span>,<span style="color: #ff0000;">"Cant"</span>,<span style="color: #ff0000;">"Value"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1300</span>,<span style="color: #000000;">600</span><br /><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw1:<span style="color: #000000;">nMarqueeStyle</span> = MARQSTYLE_HIGHLROW<br /> oBrw1:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw1:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BuildTree<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oTree, cState<br /><br /> TREE oTree<br /> <span style="color: #00C800;">while</span> ! Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> cState <span style="color: #000000;">)</span><br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>, Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> TREE<br /> cState = Customer->State<br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">if</span> cState != Customer->State<br /> ENDTREE<br /> cState = Customer->State<br /> _TreeItem<span style="color: #000000;">(</span> Customer->State <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span>, Space<span style="color: #000000;">(</span> <span style="color: #000000;">20</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> TREE<br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">endif</span> <br /> <span style="color: #00C800;">if</span> Customer->State == cState<br /> _TreeItem<span style="color: #000000;">(</span> Customer->City <span style="color: #000000;">)</span>:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">{</span> Customer->Last, Customer->First <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">endif</span> <br /> SKIP<br /> <span style="color: #00C800;">enddo</span><br /> ENDTREE<br /> ENDTREE<br /> oTree:<span style="color: #000000;">OpenAll</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> GO TOP<br /><br /><span style="color: #00C800;">return</span> oTree<br /><br /><br />******************************************<br />** Mutar a Hash<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Mutar<span style="color: #000000;">(</span>oBrw,oBrw1<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> lTree<br /> oBrw:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw1:<span style="color: #000000;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span> <br /> oBrw1:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span> <br />lTree := !lTree <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span> <br /> </div>[/code:2iycr96j] |
Cambio tipo de datos xbrowse | Cesar, como siempre gracias por responder.
Si buena idea lo de los dos xbrowse, voy a irme por ese lado.
Por que intente con el ejemplo de dbf que mencionaste, pero no funciona, aunque cambia los datos, no cambia las columnas.
De nuevo gracias |
Cambios a Campo Memo | Hola a todos amigos y colegas.
Mi consulta en esta oportunidad es la siguiente:
Muestro un campo MEMO dentro de un dialogo cuya finalidad es solamente informativa:
[img:2skolqxs]http://www.datanet.space/fw/letra.png[/img:2skolqxs]
El caso es que me gustaria mostralo con variantes en las letras, negrita, subrayado, cursiva, colores
He leido sobre los richedit pero no tengo idea. No me aparece el .PRG de ejemplo en mi fivewin
Busque en el foro y vi un ejemplo de Mr. Rao pero no me funciona, solo muestra el campo vacio, no se ven las letras.
[url:2skolqxs]https://forums.fivetechsupport.com/viewtopic.php?f=6&t=40552&p=242255&hilit=negrita+memo&sid=d1a0fc66718a11ac994135240e13c165&sid=d1a0fc66718a11ac994135240e13c165#p242255[/url:2skolqxs]
alguna sugerencia? |
Cambios a Campo Memo | Lo mejor es que actualices tu versión a la más actual. O use SUBCADENA(). Creo que funcionará.
O adapta esta función a tu gusto personal:
[url:22cku88u]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43362&sid=50fb3327569ff14f9be54a49599dd1cf&sid=50fb3327569ff14f9be54a49599dd1cf#p261092[/url:22cku88u]
Saludos. |
Cambios a Campo Memo | Jose, te recomiendo que uses un control RichEdt5 y grabes en tu memo el contenido del control
De esa manera podrás darle a tu "texto" la presentación que necesitas ( y más ) |
Cambios a Campo Memo | Gracias joao y cristobal.
Algun ejemplo de richedit? No tengo idea de eso.
Sirve para mi version de fw? (19) |
Cambios a Campo Memo | Busca en el foro, hay muchos ejemplos
Si, con la version que tienes puedes usar la clase RICHEDIT
( la actual que desarrollé es la RICHEDT5 ) |
Cambios a RPreview.Prg | Hola Amigos del foro:
Cómo cada año quiero expresarles mis mejores deseos para
estas fiestas decembrinas.
"Que los atropelle la dicha y que los destroce la felicidad!"
Después de esto paso a hacerles una pregunta, Tengo FW1905 y en el PREVIEW
hay un botón para enviar el reporte por e-mail, RPreview abre MS-Outlook y
arma el correo casi en su totalidad.
Como puedo hacer para agregar, a lo que arma RPreview, la dirección de correo
a la que se va a enviar, más direcciones de correo (CC), son a elección del usuario,
el titulo y texto del mensaje?
Saludos |
Cambios a RPreview.Prg | Hola:
Tendrás que modificar el método sendmail() y añadir lo que necesites a:
[code=fw:2ie961ez]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">MAIL</span> oMail ;<br /> <span style="color: #0000ff;">SUBJECT</span> cName ;<br /> <span style="color: #0000ff;">TEXT</span> <span style="color: #ff0000;">""</span> ;<br /> FILES cFile, cFileNoPath<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span> ; <span style="color: #B900B9;">//FILES cFile, cFile ; // by dfl 1712</span><br /> <span style="color: #0000ff;">FROM</span> USER<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">MAIL</span> oMail</div>[/code:2ie961ez] |
Cambios a RPreview.Prg | Como te indican tendrás que modificar el método sendmail(), te pongo las modificaciones que yo he hecho por si te pueden servir de ayudar, yo le paso, por ejemplo, el email del cliente, proveedor.
[code=fw:3j03vbjw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> SendEmail<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TPreview<br /><br /> <span style="color: #00C800;">local</span> oMail, cName, cFile, olMailItem, oOutLook, oAttach<br /><br /> cName := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oReport</span> != <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oReport</span>:<span style="color: #000000;">cName</span>, ::<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">cDocument</span> <span style="color: #000000;">)</span><br /> cFile := cFilePath<span style="color: #000000;">(</span> ::<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">aMeta</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> + StrTran<span style="color: #000000;">(</span> cName, <span style="color: #ff0000;">'.'</span>, <span style="color: #ff0000;">''</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">".pdf"</span><br /><br /> CursorWait<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cFile := ::<span style="color: #000000;">SaveAs</span><span style="color: #000000;">(</span> .t., cFile, .f. <span style="color: #000000;">)</span><br /> CursorArrow<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> ! File<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"PDF not saved to send Email"</span> <span style="color: #000000;">)</span>, FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Information"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> elseif ::<span style="color: #000000;">bEmail</span> != <span style="color: #00C800;">nil</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bEmail</span>, <span style="color: #00C800;">Self</span>, cName, cFile <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> <span style="color: #00C800;">TRY</span><br /> oOutLook := GetActiveObject<span style="color: #000000;">(</span><span style="color: #ff0000;">"Outlook.Application"</span><span style="color: #000000;">)</span><br /> EmSend := .T.<br /> CATCH<br /> <span style="color: #00C800;">TRY</span><br /> oOutLook := GetActiveObject<span style="color: #000000;">(</span><span style="color: #ff0000;">"Outlook.Application"</span><span style="color: #000000;">)</span><br /> EmSend := .F.<br /> CATCH<br /> EmSend := .F.<br /> END<br /> END<br /><br /> <span style="color: #00C800;">IF</span> !EmSend<br /> ShellExecute<span style="color: #000000;">(</span>,<span style="color: #ff0000;">"Open"</span>,<span style="color: #ff0000;">"Outlook"</span>,,,<span style="color: #000000;">3</span><span style="color: #000000;">)</span><br /> EmSend = .T.<br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">IF</span> EmSend<br /> oOutlook = CREATEOBJECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Outlook.Application"</span> <span style="color: #000000;">)</span><br /> oNameSpace := oOutlook:<span style="color: #000000;">GetNameSpace</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"MAPI"</span><span style="color: #000000;">)</span><br /> oMail = oOutlook:<span style="color: #000000;">CreateItem</span><span style="color: #000000;">(</span> olMailItem <span style="color: #000000;">)</span><br /> oMail:<span style="color: #0000ff;">to</span> := vmailpre<br /> oMail:<span style="color: #0000ff;">Subject</span> = cName<br /> oMail:<span style="color: #000000;">htmlBody</span> =<span style="color: #ff0000;">" "</span><br /> oMail:<span style="color: #000000;">BodyFormat</span> := <span style="color: #000000;">2</span> <span style="color: #B900B9;">// FORMAT HTML</span><br /> oMail:<span style="color: #000000;">Attachments</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span>cFile<span style="color: #000000;">)</span><br /> oMail:<span style="color: #00C800;">Display</span><span style="color: #000000;">(</span>.T.<span style="color: #000000;">)</span><br />* oMail:<span style="color: #000000;">Send</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">endif</span><br /><br /> ::<span style="color: #000000;">oMeta1</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3j03vbjw] |
Cambios a RPreview.Prg | Moises y Garbi:
Muchas gracias, lo voy a intentar.
Feliz Navidad |
Cambios a RPreview.Prg | There is no need to modify the RPreview.prg.
Instead, make this assignment initially in the program.
[code=fw:r0xkxf4f]<div class="fw" id="{CB}" style="font-family: monospace;"><br />TPreview<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">bEmail</span> := <span style="color: #000000;">{</span> |oPreview, cReportName, cPdfFile| MySendEmail<span style="color: #000000;">(</span> oPreview, cReportName, cPdfFile <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /><span style="color: #B900B9;">// ...</span><br /><span style="color: #B900B9;">// ...</span><br /><br /><span style="color: #00C800;">function</span> MySendEmail<span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span>, cReportName, cPdfFile <span style="color: #000000;">)</span><br /><br /><your <span style="color: #00C800;">method</span> body><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:r0xkxf4f] |
Cambios a RPreview.Prg | Mr. Rao:
Thanks a lot, I will.
Best regards |
Cambios en BtnBmp (Manuel) | Hola Manuel,
He necesitado poner gris los botones y he visto que habíais tenido una buena idea con el código que convierte el BMP1 a gris si no se le pasa
un BMP3.
Pero he visto que habías tocado la clase TBtnBmp en loadBitmaps y creo que en algún sitio más. Le he echado un vistazo y creo que sólo hay que tocar
el método disable. Lo he probado y funciona perfectamente.
Mi pregunta es, ¿lo que se consigue con los cambios que hiciste tiene alguna ventaja con respecto a mi implementación?
Este es el cambio que he hecho, modificar el método disable():
[b:3d7be4m4]METHOD Disable() INLINE [color=#FF0000:3d7be4m4]::hBitmap3 := IF(::hBitmap3=0, BMP2DIS(::hBitmap1) , ::hBitmap3) , [/color:3d7be4m4]::Super:Disable(), ::Refresh()[/b:3d7be4m4]
Gracias por tus aportaciones. |
Cambios en BtnBmp (Manuel) | Tu implementación es mejor que la que yo hice , si quieres puedes añadir la data que yo añadí para que puedas regular aún mejor el comportamiento según lo que se desea :
[code=fw:p5etnupq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> Disable<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">hBitmap3</span> := <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>::<span style="color: #000000;">hBitmap3</span>=<span style="color: #000000;">0</span> , <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span>::<span style="color: #000000;">ldisableBmp</span>, BMP2DIS<span style="color: #000000;">(</span>::<span style="color: #000000;">hBitmap1</span><span style="color: #000000;">)</span>, ::<span style="color: #000000;">hBitmap1</span> <span style="color: #000000;">)</span> , ::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">)</span> , ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:p5etnupq] |
Cambios en BtnBmp (Manuel) | Manuel,
La Data no sè para que se usaría, porque cuando desabilito es porque lo quiero grisàceo.
Quizàs en otros casos podría ser útil, pero no se me dado el caso.
Gracias, |
Cambios en BtnBmp (Manuel) | Buenas de nuevo ...
Perdon por el codigo anterior , las prisas ... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Realmente era esto :
[code=fw:25mca1tv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> <span style="color: #00C800;">METHOD</span> Disable<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">lDisableBmp</span>,;<br /> ::<span style="color: #000000;">hBitmap3</span> := <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>::<span style="color: #000000;">hBitmap3</span>=<span style="color: #000000;">0</span> , BMP2DIS<span style="color: #000000;">(</span>::<span style="color: #000000;">hBitmap1</span><span style="color: #000000;">)</span>,::<span style="color: #000000;">hBitmap3</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span>, ;<br /> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:25mca1tv]
La data lDisableBmp lo unico de pretende es poder definir si queremos el comportamiento "por defecto" de la clase o el nuevo comportamiento ...
La diferencia en :
Hablamos siempre en el caso de que no se defina un bmp3 ( para deshabilitados ) , al hacer disable() en la clase sin modificar el texto aparece en gris pero el bmp se mantiene en color , si ponemos ldisablebmp a .t. tambien el bmp pasa a gris . En algunas ocasiones puede interesar mantener ese comportamiento ( hasta ahora y a fecha de hoy muchos usuarios lo usan así ) , mantenemos compatibilidad con lo que existe y añadimos nueva función ... <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
Cambios en BtnBmp (Manuel) | Buenos días Manuel,
Gracias por tu explicación, ya entiendo por qué lo pusiste.
Al final, todo es cuestión de compatibilidad, pero poco a poco habría que hacer con FWH como Microsoft, a partir de unos años, por ejemplo 2, poder limpiar
código y dejarlo documentado para que el usuario pueda en 1 día cambiar de una versión más antigua de 2 años, pasar a la actual.
Porque esta compatibilidad tan a largo plazo, creo que hace más difícil avanzar el producto y que el código cada vez está más ilegible con tantos condicionantes.
Bueno, es mi humilde sugerencia. |
Cambios en BtnBmp (Manuel) | Joaquín,
vamos limpiándolo poco a poco y siempre optimizando todo lo que se puede <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Lo que ocurre es que FWH es tan grande y cubre tantas cosas que no es fácil hacerlo todo de golpe <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Gracias por vuestra ayuda como siempre! |
Cambios en buttonb.prg | para poder usar png,jpg con esta clase ...
[code=fw:2nv6dbu7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />......<br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight,;<br /> nHelpId, oFont, lDefault, lPixel, lDesign, cMsg,;<br /> lUpdate, bWhen, bValid, lCancel, cBitmap, cPosText, cToolTip <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TButtonBmp<br /><br /> <span style="color: #00C800;">DEFAULT</span> cCaption := <span style="color: #ff0000;">""</span>, cPosText := <span style="color: #ff0000;">""</span><br /><br /> ::<span style="color: #000000;">LoadBitmap</span><span style="color: #000000;">(</span> cBitmap <span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">cPosText</span> = Upper<span style="color: #000000;">(</span> cPosText <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">cToolTip</span> = cToolTip<br /><br /> <span style="color: #00C800;">DEFAULT</span> nWidth := nBmpWidth<span style="color: #000000;">(</span> ::<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span> + <span style="color: #000000;">9</span>, nHeight := nBmpHeight<span style="color: #000000;">(</span> ::<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span> + <span style="color: #000000;">9</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nRow, nCol, cCaption, oWnd, bAction, nWidth, nHeight,;<br /> nHelpId, oFont, lDefault, lPixel, lDesign, cMsg,;<br /> lUpdate, bWhen, bValid, lCancel, cBitmap <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> nId, bAction, oWnd, nHelpId, cMsg,;<br /> lUpdate, bWhen, bValid, cPrompt, lCancel, cBitmap, cPosText, cToolTip <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TButtonBmp<br /><br /> <span style="color: #00C800;">DEFAULT</span> cPrompt := <span style="color: #ff0000;">""</span>, cPosText := <span style="color: #ff0000;">""</span><br /><br /> ::<span style="color: #000000;">LoadBitmap</span><span style="color: #000000;">(</span> cBitmap <span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">cPosText</span> = Upper<span style="color: #000000;">(</span> cPosText <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">cToolTip</span> = cToolTip<br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">(</span> nId, bAction, oWnd, nHelpId, cMsg, lUpdate, bWhen,;<br /> bValid, cPrompt, lCancel <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> LoadBitmap<span style="color: #000000;">(</span> cBmpName <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TButtonBmp<br /><br /> <span style="color: #00C800;">local</span> aBmp<br /><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> ::<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">hBitmap</span> = <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /><br /> ::<span style="color: #000000;">cBitmap</span> = cBmpName<br /><br /> <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">(</span> cBmpName <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'N'</span><br /> <span style="color: #00C800;">if</span> IsGdiObject<span style="color: #000000;">(</span> cBmpName <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">hBitmap</span> := cBmpName<br /> <span style="color: #00C800;">endif</span><br /> ::<span style="color: #000000;">cBitmap</span> := cValToChar<span style="color: #000000;">(</span> cBmpName <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /><br /> aBmp := ::<span style="color: #000000;">ReadPalBmpEx</span><span style="color: #000000;">(</span> cBmpName <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">hBitmap</span> := aBmp<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">If</span> !Empty<span style="color: #000000;">(</span> aBmp<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> aBmp<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #B900B9;">// old code </span><br /> <span style="color: #B900B9;">// elseif File( cBmpName )</span><br /> <span style="color: #B900B9;">// ::hBitmap = ReadBitmap( 0, cBmpName )</span><br /> <span style="color: #B900B9;">// else</span><br /> <span style="color: #B900B9;">// ::hBitmap = LoadBitmap( GetResources(), cBmpName )</span><br /><br /> <span style="color: #00C800;">endif</span><br /> ::<span style="color: #000000;">HasAlpha</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />........<br /><br /> </div>[/code:2nv6dbu7] |
Cambios en buttonb.prg | Manuel,
gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambios en lIsDir | Hola Antonio
En las novedades leo
[quote:1w7qwjhv] Corrección: Recientes cambios en la función lIsDir() no estaban funcionando correctamente. Ahora funcionan correctamente. [/quote:1w7qwjhv]
Cual era el comportamiento anómalo? Porque antes me funcionaba bien y ahora me fallan todos los lIsDir en la aplicación!
Saludos,
Carlos. |
Cambios en lIsDir | Carlos,
Estas usando FWH 7.07 ? |
Cambios en lIsDir | Si Antonio, 7.07 con xHarbour 7.07.
El cambio de comportamiento respecto de 7.04 parece ser que no acepta nombre de directorio terminados en '\', Por ejemplo:
? lIsDir( "C:\Windows" ) => .T.
? lIsDir( "C:\Windows\" ) => .T. en 7.04, .F. en 7.07
Saludos,
Carlos. |
Cambios en lIsDir | Yo tenia instalado el 7.01 y el lIdir funcionaba , ahora instale el 8.05 y no funciona.lIsdir("A:")a que se debe |
Cambios en lIsDir | Alguien ha podido solucionar este problema o existe otra funcion que realice esta verificacion de directorios.El problema radica en que no tiene considerado la letra de la unidad, en mi caso es por eso que no reconoce ningun directorio ejemplo.lisdir ("a:\windows") .f. el directorio si existe en la unidad a:lisdir ("\windows") .t. el directorio existe pero en la unidad c:Ahora si el diskette no se encuentra en la unidad te devuelve una pantalla de error de windows, tampoco se puede controlar ese mensaje de error. para solucionar este problema debes cambiarte de unidad, verificar que exista el directorio y volver a la unidad actual donde estabas trabajandoEn el anterior FW 7.01 funcionaba sin problema pero ahora con las nuevas versiones se volvio un problema.fwh 8.05 xharbour |
Cambios en lIsDir | El código fuente de la función lIsDir() esta ahora totalmente basado en Harbour/xHarbour:[code:g5hip0ke]
function lIsDir( cDirName ) // Checks an existing directory
local aResult
if Right( cDirName, 1 ) == "\" .or. Right( cDirName, 1 ) == "/"
cDirName = Left( cDirName, Len( cDirName ) - 1 )
endif
aResult = Directory( cDirName, "DHS" )
return Len( aResult ) == 1 .and. "D" $ aResult[ 1 ][ 5 ]
[/code:g5hip0ke] |
Cambios en lIsDir | Hola Antonio, gracias por tu respuesta..........Pero la funcion quedo muy limitada, ya que solo verifica directorios que estan en la unidad actual, como los ejemplos anteriores, ya que al asignarle una letra de unidad siempre da .F., aunque el directorio exista en esa unidad, el lIsdir anterior tenia esa cualidad de verificar en cualquier unidad el directorio.Pienso modestamente que la funcion anterior es mejor que la actual....Pero ya lo solucione copiando la funcion anterior dentro de mi programa lo cual ha funcionado super bien.Y por Ultimo el mensaje que envia el LCHDIR() cuando no existe es un mensaje del propio Windows y no hay alternativa de colocarle el mensaje que uno quiere. en la version anterior de fivewin 7.01 que trabajaba todo funcionaba bien Saludos |
Cambios en la clase TFTPFile? | El trozo de código que inserto mas abajo con la versión 0908, funciona de maravilla, sinembargo con las versiones posteriores, no consigo que funcione, a lo más que llego es que se escriba en el servidor ftp, el fichero vacio, pero nunca escribe ningun dato en el, en otros casos sin dar ningún error, hace como si lohubiera escrito sin haberlo hecho.
[code=fw:25h2eoxa]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oInternet := TInternet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> oInternet:<span style="color: #000000;">hSession</span> <span style="color: #000000;">)</span>,MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Imposible establecer conexión"</span> <span style="color: #000000;">)</span>,<span style="color: #000000;">)</span><br /> oFTP := tfTP<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> cftpsite, oInternet, usuario,password <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oFTP:<span style="color: #000000;">hFTP</span> <span style="color: #000000;">)</span><br /> MsgStop<span style="color: #000000;">(</span> <span style="color: #ff0000;">"No se puede conectar al servidor FTP"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">endif</span><br /> cbuffer:=space<span style="color: #000000;">(</span>nbufsize<span style="color: #000000;">)</span><br /> oFile = tFtpFile<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> directorio+cfilenoext<span style="color: #000000;">(</span>csource<span style="color: #000000;">)</span>+<span style="color: #ff0000;">".htm"</span>,oFTP <span style="color: #000000;">)</span><br /> oFile:<span style="color: #000000;">OpenWrite</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> hSource = FOpen<span style="color: #000000;">(</span> csource <span style="color: #000000;">)</span><br /> FSeek<span style="color: #000000;">(</span> hSource, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">while</span> <span style="color: #000000;">(</span> nBytes := FRead<span style="color: #000000;">(</span> hSource, @cBuffer, nBufSize <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> oFile:<span style="color: #000000;">Write</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">substr</span><span style="color: #000000;">(</span>cBuffer, <span style="color: #000000;">1</span>, nBytes <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> end<br /> FClose<span style="color: #000000;">(</span> hSource <span style="color: #000000;">)</span><br /> oFile:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oftp:<span style="color: #000000;">end</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oInternet:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:25h2eoxa]
Me podeis aclarar algo?
Muchas gracias. y un saludo
José Luis |
Cambios en la clase TFTPFile? | Me respondo a mi mismo, no hay cambio alguno, el problema es que mi aplicación reside en un determinado directorio, y con ese nombre de directorio no funciona el código expuesto, modifico aunque sea añadiendo un caracter o dígito al nombre del directorio compilo y linko de nuevo, y voalá, todo funciona.
¿Alguien podria decirme a que se podría deber este expediente X?
Muchas gracias y un saludo
José Luis |
Cambios en la clase TFTPFile? | José Luis,
Cual es el nombre del directorio ? |
Cambios en la clase TFTPFile? | Anonio:
La aplicacion reside en C:\Rallye, y el nombre de la misma es Rallye, pero antes y en otros equipos no me da problemas, el cortafuegos lo tengo desactivado, ya sólo me queda desinstalar el antivirus y cortafuegos, pues me temo que es el responsable.
Muchas gracias y un saludo
José Luis |
Cambios en la clase TFTPFile? | He tenido el mismo problema, pero lo que me parece raro es que se da en un solo computador, tengo 14 computadores ubicados en zonas geográficas distintas, por FTP genero actualizaciones automáticas de cada computador a un servidor MYSQL, el problema lo he tenido en un solo computador, pensé que podría ser algún problema con el router, porque el archivo que se sube via FTP ya en el servidor ocupa 0 bytes, no graba nada, pero el mismo ejecutable funciona de maravilla en las restantes 13 terminales.
por ahora lo he solucionado de pura casualidad, agregue una linea de texto para saber que es lo que sale, agregue el
oTxt:=TTxtFile():New("c:\probando.txt") para ir agregando alli algunos parametros conforme va corriendo el programa, y me doy con la sorpresa que ahora ya actualiza via FTP el archivo, pienso que debe ser un retraso, al escribir en el archivo txt se retrasa unos segundos y de ahi se logra subir al servidor FTP.
oFile:OpenWrite()
oTxt:=TTxtFile():New("c:\probando.txt")
oTxt:add(cFTPDir+cFile+" "+time())
oTxt:add(STR(oFile:hFile)+" "+time())
oTxt:Close()
if oFile:hFile > 0
h := fOpen(cFile)
nSize := fSeek(h,0,2)
fSeek(h,0,0)
cBuff := Space(nSize)
nRead := fRead(h,@cBuff,nSize)
fClose(h) |
Cambios en tReport y Preview | Antonio,
en este enlace [url:1rq1xsoi]https://app.box.com/s/p50zt6k91ztzkvbqndl0[/url:1rq1xsoi] puedes bajar unas modificaciones que hice hace unos años a la clase tReport, y a la clase Preview.
El ejemplo te permite generar código de los valores de las datas, puede que te sirva de idea para las mejoras que estas haciendo a la clase, también tiene una prueba para la numeración de página 1/n ... n/n
Comentaron que el preview tiene problemas de perdida de memoria, lo siento lo que pasa es que como desarrollo solo para casa, no tuve feedbak, no se si podré ver ese tema, pero si alguien lo puede arreglar estaría bien.
saludos
Marcelo |
Cambios en tReport y Preview | Marcelo,
muchas gracias, lo revisaremos e incorporaremos las mejoras a FWH <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambios en tReport y Preview | Este es un ejemplo:
[img:2a28zzur]http://img198.imageshack.us/img198/8031/zs90.jpg[/img:2a28zzur]
y este es el código generado
[code=fw:2a28zzur]<div class="fw" id="{CB}" style="font-family: monospace;"> oReport:<span style="color: #000000;">lSeparator</span> := .F.<br /> oReport:<span style="color: #000000;">lJoin</span> := .T.<br /><br /><br /> oReport:<span style="color: #000000;">nTotalLine</span> := <span style="color: #000000;">0</span><br /> oReport:<span style="color: #000000;">nTitleUpLine</span> := <span style="color: #000000;">0</span><br /> oReport:<span style="color: #000000;">nTitleDnLine</span> := <span style="color: #000000;">0</span><br /> oReport:<span style="color: #000000;">nGroupLine</span> := <span style="color: #000000;">1</span><br /> oReport:<span style="color: #000000;">nTitleBox</span> := <span style="color: #000000;">4</span><br /> oReport:<span style="color: #000000;">lTitleBoxJoin</span> := .T.<br /> oReport:<span style="color: #000000;">nTotalBox</span> := <span style="color: #000000;">0</span><br /> oReport:<span style="color: #000000;">lTotalBoxJoin</span> := .F.<br /> oReport:<span style="color: #000000;">nGrpHdBox</span> := <span style="color: #000000;">0</span><br /> oReport:<span style="color: #000000;">nGrpFtBox</span> := <span style="color: #000000;">3</span><br /> oReport:<span style="color: #000000;">lGrpFtBoxJoin</span> := .F.<br /> oReport:<span style="color: #000000;">nHeaderBox</span> := <span style="color: #000000;">2</span><br /> oReport:<span style="color: #000000;">nFooterBox</span> := <span style="color: #000000;">3</span><br /> oReport:<span style="color: #000000;">lShdwTtEmpty</span> := .F.<br /> oReport:<span style="color: #000000;">nClrTitle</span> := <span style="color: #000000;">12632256</span><br /> oReport:<span style="color: #000000;">nClrTotal</span> := <span style="color: #000000;">12632256</span><br /> oReport:<span style="color: #000000;">nClrGrp</span> := <span style="color: #000000;">12632256</span><br /> oReport:<span style="color: #000000;">nClrHeader</span> := <span style="color: #000000;">12632256</span><br /> oReport:<span style="color: #000000;">nClrFooter</span> := <span style="color: #000000;">12632256</span><br /> oReport:<span style="color: #000000;">nCurve</span> := <span style="color: #000000;">30</span><br /> oReport:<span style="color: #000000;">nBodyBox</span> := <span style="color: #000000;">1</span></div>[/code:2a28zzur] |
Cambios en tReport y Preview | Marcelo,
Me ha gustado mucho tu implementación, muy bien diseñada, gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
La he implementado en FWH, he quitado el splitter porque no lo considero necesario (en caso de que no quepa la hoja del metafile?) y ya se ve asi:
[img:wb3cwgoy]http://img35.imageshack.us/img35/6177/2mcu.png[/img:wb3cwgoy] |
Cambios en tReport y Preview | Hola,
¿Y la pérdida de recursos?. ¿Se ha verificado?.
Muy buen trabajo.
Una duda, la función de exportar en PDF nativamente de Fivewin, ¿necesita Word?.
Actualmente usamos image2pdf.dll
Un saludito |
Cambios en tReport y Preview | Antonio,
me alegra que te guste.
también esta una opción que no se si viste, si oprimes el botón derecho de mouse sobre el metafile te aparece un recuadro con una vista magnificada del reporte (puedes recorrer con el botón oprimido y se mantendrá el recuadro).
[img:4v4e49jh]http://img812.imageshack.us/img812/2231/qj1n.jpg[/img:4v4e49jh]
Por otra parte también aumente entre los botones de navegación el número de página, el cual es un get, y allí directamente puedes poner el número de página
Se cambio pero no se si esta bien, en lugar de factor del zoom por un porcentaje
Podría ser también interesante cambiar el orden de los botones de la barra y poner la navegación a la derecha, y el botón de salir, siempre al extremo mas a la derecha, algo así
[code=fw:4v4e49jh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">{</span>|| ::<span style="color: #000000;">oBtnExit</span>:<span style="color: #0000ff;">Move</span><span style="color: #000000;">(</span> <span style="color: #000000;">-1</span>, ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">102</span>, ::<span style="color: #000000;">oBtnExit</span>:<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">oBtnExit</span>:<span style="color: #000000;">nHeight</span>, .T.<span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:4v4e49jh]
Son solo ideas que puedes o no tomar en cuenta, pero como siempre gracias por tu atención
saludos
Marcelo |
Cambios en tReport y Preview | Marcelo, Elvira,
De momento solo he implementado la vista de páginas en pequeño, y ese código es el único que he revisado. Efectivamente existian un par de detalles que consumían recursos y los he corregido al implementarlo en FWH:
1. En vez de llamar a TBitmap():New( ... ) llamar a TBitmap():Define() (cuando no se crea un control bitmap).
2. En la función Create_minipage() al final falta ReleaseDC( hDC1 )
La exportación a PDF no necesita tener Word instalado <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambios en tReport y Preview | Marcelo,
No me había fijado en esa capacidad de hacer zoom de una zona y me parece muy interesante tambien, muchas gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambios en tReport y Preview | Antonio,
Para rematar los grandes cambios que has incorporado a rpreview.prg, quizás podrías implementar el look en la barra de botones como el de Visual Studio 2013, ya que el azul es de 2007!.
Dejo una imagen:
[img:2flhn3fx]http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-52-metablogapi/6740.image_5F00_3C8ACC92.png[/img:2flhn3fx]
Muy agradecida. |
Cambios en tReport y Preview | [quote="Antonio Linares":1ku6hchx]Marcelo, Elvira,
De momento solo he implementado la vista de páginas en pequeño, y ese código es el único que he revisado.
[/quote:1ku6hchx]
Antonio, podrias implementar la opción de poner la vista de miniaturas a la derecha o a la izquierda de la pantalla?
Saludos |
Cambios en tReport y Preview | Antonio
Al crear el preview en MDI, y salir a otro proceso y volver al preview, la ventana aparece en modo "NORMAL" y no "MAXIMIZADA" como estaba
No se si es mi version, o está solucionado con la modificacion que se hizo en la version 13.04 sobre las MDI
[url:3abds8f8]http://forums.fivetechsupport.com/viewtopic.php?f=16&t=26208&start=0&hilit=FTDN[/url:3abds8f8]
Me lo puedes confirmar?
De momento lo he solucionado asi:
[code=fw:3abds8f8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">if</span> !::<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">lPrvModal</span> .and. ::<span style="color: #000000;">oWndMain</span> != <span style="color: #00C800;">nil</span> .and. ;<br /> Upper<span style="color: #000000;">(</span> ::<span style="color: #000000;">oWndMain</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"TMDIFRAME"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> ::<span style="color: #000000;">oWnd</span> ; <br /> <span style="color: #0000ff;">TITLE</span> cTitle ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_LIGHTGRAY ; <span style="color: #B900B9;">// ICON oIcon ;</span><br /> <span style="color: #0000ff;">VSCROLL</span> <span style="color: #0000ff;">HSCROLL</span> <span style="color: #0000ff;">MDICHILD</span><br /><br /> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">Self</span>:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">Maximize</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">//Añadido</span><br /><br /> <span style="color: #00C800;">else</span><br /><br /> ...<br /> </div>[/code:3abds8f8]
Gracias |
Cambios en tReport y Preview | Cristobal,
En la versión que vamos a publicar 13.07 no aparece ese efecto, es decir, se comporta correctamente. Pero no sabría decirte con exactitud cuando se corrigió lo que comentas.
Y es que en la versión 13.07 hasta se ha modificado el procedimiento por defecto en languaje C que usan las MDI. Lo comenté recientemente aqui en los foros. |
Cambios en tReport y Preview | Implementada la opción de mostrar la vista de páginas en miniatura a la izquierda ó derecha en FWH 13.07
solo hay que hacer click derecho en la vista de páginas, para que cambie de lugar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambios en tReport y Preview | Elvira,
El Print Preview usa el estilo 2010 en FWH 13.07 si detecta que esta siendo usado en la barra de botones principal de la aplicación, ó en la RibbonBar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Cambios en xBrowse | Antonio / Daniel
He realizado cambios en la función DolphinSeek del método SetDolphin porque no funcionaba correctamente.
Aquí los cambios
[code=fw:vix01tnd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">FUNCTION</span> DolphinSeek<span style="color: #000000;">(</span> c, oBrw, cQryWhere <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oQry := oBrw:<span style="color: #000000;">oMySql</span><br /> <span style="color: #00C800;">local</span> nStart<br /> <span style="color: #00C800;">local</span> uData, nNum, lRet<br /> <span style="color: #00C800;">local</span> cSortOrder<br /><br /> <span style="color: #00C800;">static</span> aLastRec := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">lIncrFilter</span><br /> <span style="color: #B900B9;">// DEFAULT oBrw:cFilterFld := TOken( oQry:cOrder, , 1 )</span><br /> oBrw:<span style="color: #000000;">cFilterFld</span> := TOken<span style="color: #000000;">(</span> oQry:<span style="color: #000000;">cOrder</span>, , <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//Le quite el DEFAULT porque no cambiaba orden al dar cllick en otra columna</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">cFilterFld</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .f.<br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #B900B9;">// if Empty( c ) </span><br /> <span style="color: #00C800;">If</span> Len<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>=<span style="color: #000000;">1</span> <span style="color: #B900B9;">//Al usar BACK SPACE no colocaba el puntero en el primer registro</span><br /> c := cQryWhere<br /> <span style="color: #00C800;">else</span><br /> c := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Empty<span style="color: #000000;">(</span> cQryWhere <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"("</span> + cQryWhere + <span style="color: #ff0000;">") and "</span> <span style="color: #000000;">)</span> + ;<br /> Lower<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">cFilterFld</span> <span style="color: #000000;">)</span> + <span style="color: #ff0000;">" like '"</span> + ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">lSeekWild</span>, <span style="color: #ff0000;">"%"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> + ;<br /> c + <span style="color: #ff0000;">"%'"</span><br /> <span style="color: #00C800;">endif</span><br /> oQry:<span style="color: #000000;">SetWhere</span><span style="color: #000000;">(</span> c, .t. <span style="color: #000000;">)</span><br /> oQry:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> <span style="color: #000000;">(</span> oQry:<span style="color: #000000;">LastRec</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .t.<br /> <span style="color: #00C800;">endif</span><br /><br /> nNum = AScan<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">{</span>| o | !Empty<span style="color: #000000;">(</span> o:<span style="color: #000000;">cOrder</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> nNum < <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">RETURN</span> .f.<br /> <span style="color: #00C800;">endif</span><br /><br /> cSortOrder = oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> nNum <span style="color: #000000;">]</span>:<span style="color: #000000;">cSortOrder</span><br /><br /> <span style="color: #00C800;">if</span> Len<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> == <span style="color: #000000;">1</span><br /> aLastRec := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">(</span> aLastRec <span style="color: #000000;">)</span> < Len<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">(</span> aLastRec <span style="color: #000000;">)</span> == <span style="color: #000000;">0</span><br /> nStart = <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">ELSE</span><br /> nStart = oQry:<span style="color: #000000;">RecNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> AAdd<span style="color: #000000;">(</span> aLastRec, nStart <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /><span style="color: #B900B9;">// ADel( aLastRec, Len( aLastRec ) )</span><br /><span style="color: #B900B9;">// ASize( aLastRec, Len( aLastRec ) - 1 )</span><br /> ASize<span style="color: #000000;">(</span> aLastRec, Len<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">(</span> aLastRec <span style="color: #000000;">)</span> == <span style="color: #000000;">0</span><br /> nStart = <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">ELSE</span><br /> nStart = ATail<span style="color: #000000;">(</span> aLastRec <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #B900B9;">// lRet := ( oQry:Seek( c, cSortOrder, nStart - 1, oQry:LastRec(), .T., .T. ) != 0 )</span><br /> lRet := <span style="color: #000000;">(</span> oQry:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> c, cSortOrder, nStart, oQry:<span style="color: #000000;">LastRec</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T., .T. <span style="color: #000000;">)</span> != <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//con el -1 al pulsar un caracter no nro. en orden numérico, se cuelga.</span><br /><br /><span style="color: #00C800;">return</span> lRet<br /> </div>[/code:vix01tnd]
Tengo FWH1501 no se si ya lo han corregido.
[code=fw:vix01tnd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> @<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">xBrowse</span> oBrw <span style="color: #0000ff;">Of</span> oDlg AUTOSORT DATASOURCE oQry COLUMNS <span style="color: #ff0000;">"IDEMPL"</span> <span style="color: #B900B9;">//Si no coloco COLUMNS me carga todos los campos</span><br /> <span style="color: #B900B9;">//oBrw:setdolphin(oQry,.F.) de esta manera no funciona la búsqueda</span><br /> oBrw.... <br /> oBrw:<span style="color: #000000;">lIncrFilter</span>:= .t.<br /> oBrw:<span style="color: #000000;">lSeekWild</span>:= .t.<br /><br /> oCol:=oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> || oEMPL:<span style="color: #000000;">CODIGO</span> <span style="color: #000000;">}</span><br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oCol:<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"COD."</span><br /> oCol:<span style="color: #000000;">nWidth</span>:=<span style="color: #000000;">30</span><br /> oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">"CODIGO"</span><br /> oCol:<span style="color: #000000;">bLClickHeader</span>:= <span style="color: #000000;">{</span>|| oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <br /> oCol:=oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oCol:<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> || oEMPL:<span style="color: #000000;">NOMBRE</span> <span style="color: #000000;">}</span> <br /> oCol:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oCol:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"NOMBRE Y APELLIDOS"</span><br /> oCol:<span style="color: #000000;">nWidth</span>:=<span style="color: #000000;">223</span><br /> oCol:<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">"NOMBRE"</span><br /> oCol:<span style="color: #000000;">bLClickHeader</span>:= <span style="color: #000000;">{</span>|| oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//Obligado a ocultarlo </span><br /><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">114</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span><br /><br /> </div>[/code:vix01tnd]
Existe otra manera de evitar el COLUMNS ó oBrw:setdolphin(oQry,.T.,.T.,{"IDEMPL"})
Saludos,
Adhemar |
Cambios en xBrowse | Suggestion-1
[code=fw:14w2dxbu]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #B900B9;">// DEFAULT oBrw:cFilterFld := TOken( oQry:cOrder, , 1 )</span><br /> oBrw:<span style="color: #000000;">cFilterFld</span> := TOken<span style="color: #000000;">(</span> oQry:<span style="color: #000000;">cOrder</span>, , <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//Le quite el DEFAULT porque no cambiaba orden al dar cllick en otra columna</span><br /> </div>[/code:14w2dxbu]
We retain DEFAULT. This is intentional, not a mistake and is consistent with incremental filter behavior of all other sources like dbf, array, ado, etc.
Normally, cFilterFld is to be provided by the programmer initially. DEFAULT is provided in case of omission of this. It is intended that re-sorting of the data by the user should not disturb the filter.
If and when the programmer wants to change the filter field, he may do it by oBrw:Seek( "" ), oBrw:cFilterFld := <newfld>.
Suggestion-2
[code=fw:14w2dxbu]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #B900B9;">// if Empty( c ) </span><br /> <span style="color: #00C800;">If</span> Len<span style="color: #000000;">(</span>c<span style="color: #000000;">)</span>=<span style="color: #000000;">1</span> <span style="color: #B900B9;">//Al usar BACK SPACE no colocaba el puntero en el primer registro</span><br /> </div>[/code:14w2dxbu]
Please reconsider.
Our code "if Empty( c )" works properly.
Suggestion-3:
[code=fw:14w2dxbu]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// lRet := ( oQry:Seek( c, cSortOrder, nStart - 1, oQry:LastRec(), .T., .T. ) != 0 )</span><br /> lRet := <span style="color: #000000;">(</span> oQry:<span style="color: #000000;">Seek</span><span style="color: #000000;">(</span> c, cSortOrder, nStart, oQry:<span style="color: #000000;">LastRec</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, .T., .T. <span style="color: #000000;">)</span> != <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">//con el -1 al pulsar un caracter </span><br /> </div>[/code:14w2dxbu]
Original code by Mr Daniel was to use nStart only but not nStart-1. I saw his post sometime back that Mr Daniel prefers nStart but not nStart-1.
Years back we noticed that the the binary search logic of oQry:Seek was ignoring the first record (i.e, record number nstart). I did not see the recent sources of dolphin. As a result, oQry:Seek was returning false when only the 1st record was containing the search term.
Probably Max( 1, nStart - 1 ) is better.
Anyway we test this again and make necessary changes. |
Cambios en xBrowse | Thanks Mr. Rao
Regards,
Adhemar |
Cambios requeridos para image.prg en FWH 64 bits | Solo para FWH 64 bits en source/classes/image.prg:
[code=fw:15ocuhfj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//------------------------------------------------------------------//</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FISAVE<span style="color: #000000;">(</span> nFormat AS LONG, hDib AS LONG, cFileName AS LPSTR, nFlags AS LONG <span style="color: #000000;">)</span> AS BOOL ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_Save"</span>, <span style="color: #ff0000;">"_FreeImage_Save@16"</span> <span style="color: #000000;">)</span> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIGETWIDTH<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_GetWidth"</span>, <span style="color: #ff0000;">"_FreeImage_GetWidth@4"</span> <span style="color: #000000;">)</span> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FICONVTO32<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_ConvertTo32Bits"</span>, <span style="color: #ff0000;">"_FreeImage_ConvertTo32Bits@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FISETTRANSPARENT<span style="color: #000000;">(</span> hDib AS LONG, lOnOff AS BOOL <span style="color: #000000;">)</span> AS VOID ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_SetTransparent"</span>, <span style="color: #ff0000;">"_FreeImage_SetTransparent@8"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIISTRANSPARENT<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS BOOL ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_IsTransparent"</span>, <span style="color: #ff0000;">"_FreeImage_IsTransparent@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FICNV24<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_ConvertTo24Bits"</span>, <span style="color: #ff0000;">"_FreeImage_ConvertTo24Bits@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIGETFILETYPE<span style="color: #000000;">(</span> cFileName AS LPSTR, nSize AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_GetFileType"</span>, <span style="color: #ff0000;">"_FreeImage_GetFileType@8"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FILOAD<span style="color: #000000;">(</span> nFormat AS LONG, cFileName AS LPSTR, nFlags AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_Load"</span>, <span style="color: #ff0000;">"_FreeImage_Load@12"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIGETINFOHEADER<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_GetInfoHeader"</span>, <span style="color: #ff0000;">"_FreeImage_GetInfoHeader@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIGETINFO<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_GetInfo"</span>, <span style="color: #ff0000;">"_FreeImage_GetInfo@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIGETBITS<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_GetBits"</span>, <span style="color: #ff0000;">"_FreeImage_GetBits@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FIUNLOAD<span style="color: #000000;">(</span> hDib AS LONG <span style="color: #000000;">)</span> AS VOID ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_Unload"</span>, <span style="color: #ff0000;">"_FreeImage_Unload@4"</span> <span style="color: #000000;">)</span> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FI_OpenMemory<span style="color: #000000;">(</span> cData AS LPSTR, nSize AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_OpenMemory"</span>, <span style="color: #ff0000;">"_FreeImage_OpenMemory@8"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FI_LoadFromMemory<span style="color: #000000;">(</span> nFormat AS LONG, nStream AS LONG, nFlags AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_LoadFromMemory"</span>, <span style="color: #ff0000;">"_FreeImage_LoadFromMemory@12"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FI_CloseMemory<span style="color: #000000;">(</span> nStream AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_CloseMemory"</span>, <span style="color: #ff0000;">"_FreeImage_CloseMemory@4"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FI_GetFileTypeFromMemory<span style="color: #000000;">(</span> nStream AS LONG, nSize AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_GetFileTypeFromMemory"</span>, <span style="color: #ff0000;">"_FreeImage_GetFileTypeFromMemory@8"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> FI_SaveToMemory<span style="color: #000000;">(</span> nFormat AS LONG, hDib AS LONG, cStream AS LPSTR, nFlags AS LONG <span style="color: #000000;">)</span> AS LONG ;<br /> PASCAL <span style="color: #0000ff;">FROM</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsExe64<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"FreeImage_SaveToMemory"</span>, <span style="color: #ff0000;">"_FreeImage_SaveToMemory@12"</span> <span style="color: #000000;">)</span> ;<br /> LIB hLib<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:15ocuhfj] |
Camera Control needed for Tablet | A camera control to go along with the touch features added to FWH would be very helpful.
It would be nice to simply press a button to activate the tablet camera, and when the picture is taken, it can be saved to a location defined within our program.
Right now, I could leave a program, activate the camera, take the picture, and then move it to the location. However it would be nice to have a control button within my program to take the photo, and then to have it auto save to my desired location.
Thanks for considering this. |
Camera Control needed for Tablet | Yes, I have been working on this also.
The twebcam class doesn't work for most tablets. It seems that some tablets only have DirectShow built in.
I tried finding twain driver for webcam but most of them are .net now.
If we could adapt twebcam class or create new one to use DirectShow that would be great.
I found a workaround using 2 different methods.
Method 1 was to use the builtin camera app. I would start the camera app (or bring to top if already running) and place "Press here when done" button on screen. They take the pictures and then press my done button. Then it collects the images and I moves them where I want.
This has been working pretty well but you lose some control over the process.
If you need it I have more information on using Windows 8/10 camera app.
Here is how I call it with Windows 10 and 8
[code=fw:6e9kj8v3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">case</span> ::<span style="color: #000000;">oMain</span>:<span style="color: #000000;">cWinVer</span> == <span style="color: #ff0000;">'10'</span> <span style="color: #B900B9;">// GDF Mod Windows 10 8/24/2015</span><br /> cPathInfo := <span style="color: #ff0000;">'shell:AppsFolder<span style="color: #000000;">\M</span>icrosoft.WindowsCamera_8wekyb3d8bbwe!App'</span><br /> lMetro := .t.<br /> <span style="color: #00C800;">case</span> ::<span style="color: #000000;">oMain</span>:<span style="color: #000000;">cWinVer</span> == <span style="color: #ff0000;">'8'</span><br /> cPathInfo := <span style="color: #ff0000;">'shell:AppsFolder<span style="color: #000000;">\M</span>icrosoft.MoCamera_cw5n1h2txyewy!Microsoft.Camera'</span><br /> lMetro := .t.<br /><br /><span style="color: #B900B9;">// Then do something like</span><br /><span style="color: #00C800;">if</span> lMetro<br /> WinExec<span style="color: #000000;">(</span> <span style="color: #ff0000;">'C:<span style="color: #000000;">\W</span>indows<span style="color: #000000;">\e</span>xplorer.exe '</span>+cPathInfo, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">else</span><br />..<br /><span style="color: #00C800;">endif</span><br /> </div>[/code:6e9kj8v3]
Method 2 is using a little program CommandCam.exe. This app can capture images from webcam from command line. It has command line options you can use.
Users did not like this approach as much. You could put a delay before capture but still hard to sync image position before capture. |
Camera Control needed for Tablet | FYI CommandCam provides source code to use Microsoft’s DirectShow API. It would have to be converted from .net
[url:3w2x7kn9]https://batchloaf.wordpress.com/commandcam/[/url:3w2x7kn9]
The program is very small only 66k |
Camera Control needed for Tablet | First steps using Borland (some changes are required for MSVC)
[code=fw:38s8nz8k]<div class="fw" id="{CB}" style="font-family: monospace;"><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;">(</span><span style="color: #000000;">)</span><br /><br /> DShowCamera<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <dshow.h><br /><span style="color: #00D7D7;">#include</span> <uuids.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> DSHOWCAMERA <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HRESULT hr;<br /> ICreateDevEnum *pDevEnum = <span style="color: #00C800;">NULL</span>;<br /> IEnumMoniker *pEnum = <span style="color: #00C800;">NULL</span>;<br /> IMoniker *pMoniker = <span style="color: #00C800;">NULL</span>;<br /> IPropertyBag *pPropBag = <span style="color: #00C800;">NULL</span>;<br /> IGraphBuilder *pGraph = <span style="color: #00C800;">NULL</span>;<br /> ICaptureGraphBuilder2 *pBuilder = <span style="color: #00C800;">NULL</span>;<br /> IBaseFilter *pCap = <span style="color: #00C800;">NULL</span>;<br /> IBaseFilter *pSampleGrabberFilter = <span style="color: #00C800;">NULL</span>;<br /> IBaseFilter *pNullRenderer = <span style="color: #00C800;">NULL</span>;<br /> IMediaControl *pMediaControl = <span style="color: #00C800;">NULL</span>;<br /> char *pBuffer = <span style="color: #00C800;">NULL</span>;<br /><br /> hr = CoInitializeEx<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span>, COINIT_MULTITHREADED <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"CoInitializeEx error"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> hr = CoCreateInstance<span style="color: #000000;">(</span> &CLSID_FilterGraph, <span style="color: #00C800;">NULL</span>,<br /> CLSCTX_INPROC_SERVER, &IID_IGraphBuilder,<br /> <span style="color: #000000;">(</span> void ** <span style="color: #000000;">)</span> &pGraph <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"CoCreateInstance error"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pGraph != <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"pGraph seems ok"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <br /> hr = CoCreateInstance<span style="color: #000000;">(</span> &CLSID_CaptureGraphBuilder2, <span style="color: #00C800;">NULL</span>,<br /> CLSCTX_INPROC_SERVER, &IID_ICaptureGraphBuilder2,<br /> <span style="color: #000000;">(</span> void ** <span style="color: #000000;">)</span> &pBuilder <span style="color: #000000;">)</span>; <br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"CoCreateInstance 2 error"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pBuilder != <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"pBuilder seems ok"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:38s8nz8k] |
Camera Control needed for Tablet | Next step:
[code=fw:18fcj6ga]<div class="fw" id="{CB}" style="font-family: monospace;"><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;">(</span><span style="color: #000000;">)</span><br /><br /> DShowCamera<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <dshow.h><br /><span style="color: #00D7D7;">#include</span> <uuids.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">(</span> DSHOWCAMERA <span style="color: #000000;">)</span><br /><span style="color: #000000;">{</span><br /> HRESULT hr;<br /> ICreateDevEnum *pDevEnum = <span style="color: #00C800;">NULL</span>;<br /> IEnumMoniker *pEnum = <span style="color: #00C800;">NULL</span>;<br /> IMoniker *pMoniker = <span style="color: #00C800;">NULL</span>;<br /> IPropertyBag *pPropBag = <span style="color: #00C800;">NULL</span>;<br /> IGraphBuilder *pGraph = <span style="color: #00C800;">NULL</span>;<br /> ICaptureGraphBuilder2 *pBuilder = <span style="color: #00C800;">NULL</span>;<br /> IBaseFilter *pCap = <span style="color: #00C800;">NULL</span>;<br /> IBaseFilter *pSampleGrabberFilter = <span style="color: #00C800;">NULL</span>;<br /> IBaseFilter *pNullRenderer = <span style="color: #00C800;">NULL</span>;<br /> IMediaControl *pMediaControl = <span style="color: #00C800;">NULL</span>;<br /> char *pBuffer = <span style="color: #00C800;">NULL</span>;<br /><br /> hr = CoInitializeEx<span style="color: #000000;">(</span> <span style="color: #00C800;">NULL</span>, COINIT_MULTITHREADED <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"CoInitializeEx error"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> hr = CoCreateInstance<span style="color: #000000;">(</span> &CLSID_FilterGraph, <span style="color: #00C800;">NULL</span>,<br /> CLSCTX_INPROC_SERVER, &IID_IGraphBuilder,<br /> <span style="color: #000000;">(</span> void ** <span style="color: #000000;">)</span> &pGraph <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"CoCreateInstance error"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pGraph != <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"pGraph seems ok"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <br /> hr = CoCreateInstance<span style="color: #000000;">(</span> &CLSID_CaptureGraphBuilder2, <span style="color: #00C800;">NULL</span>,<br /> CLSCTX_INPROC_SERVER, &IID_ICaptureGraphBuilder2,<br /> <span style="color: #000000;">(</span> void ** <span style="color: #000000;">)</span> &pBuilder <span style="color: #000000;">)</span>; <br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"CoCreateInstance 2 error"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /><br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> pBuilder != <span style="color: #00C800;">NULL</span> <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"pBuilder seems ok"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>;<br /> <br /> hr = <span style="color: #000000;">(</span> <span style="color: #000000;">(</span> ICaptureGraphBuilder * <span style="color: #000000;">)</span> pBuilder <span style="color: #000000;">)</span>->lpVtbl->SetFiltergraph<span style="color: #000000;">(</span> pBuilder, pGraph <span style="color: #000000;">)</span>;<br /> <br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> hr != S_OK <span style="color: #000000;">)</span><br /> MessageBox<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"Could not attach capture graph builder to graph"</span>, <span style="color: #ff0000;">"ok"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>; <br /><span style="color: #000000;">}</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:18fcj6ga] |
Camera Control needed for Tablet | I use xHarbour ( .com ) and MSVC, not Borland ... |
Camera Control needed for Tablet | Tim,
Yes, I know it
First we need to make it work, then we may be able to port it to MSVC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.