topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
tprogress y windows vista | Antonio,
la unica manera de hacerlo funcionar ha sido metiendole un inkey para que vaya más despacito la cosa. Algo así:
[code:2bpjg4zh]
index on upper(LiCodigo);
tag CODIGO;
for ! deleted();
eval ( inkey(0.01), oMeter:SetPos( nMeter+=5 ), oMeter:Refresh(), .t. );
every 5
[/code:2bpjg4zh]
Ahora lo que me pasa es que el meter no llega hasta el final, se queda como en la mitad, y eso que cuando termina oMeter:nPos vale lo mismo que oMeter:nMax.
Saludos, |
tprogress y windows vista | José Luis,
Has probado a usar SysRefresh() en vez de Inkey() ? Es más aconsejable |
tprogress y windows vista | Si, antes lo tenía con sysrefresh pero no iba bien. Acabo de volverlo a probar y sin inkey no hay tutia. ¿ Cual es la cantidad menor de tiempo que le puedo poner a un inkey ?
Sobre lo de que el meter llegue a la mitad, al estar en un dialogo... ¿ el valor de oMeter:nMax tiene que ser la mitad que si estuviera en una ventana ? Lo digo por el lio de las coordenadas en dialogos que son la mitad y todo eso.
Saludos, |
tprogress y windows vista | No tendría porque ser la mitad. Cosas de Windows <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
tprogress y windows vista | Lo que no entiendo es que pase con Vista, porque con XP iba de coña.
Saludos, |
tprogress y windows vista | Cuando haces oMeter:setRange( 0, LI->(LastRec()) ) el meter ya tiene un handle de control válido ? Es decir, tendrías que hacerlo desde la claúsula ON INIT del diálogo.
Existen algunas diferencias entre XP y Vista. Son pocas, pero las hay. |
tprogress y windows vista | Antonio,
yo defino el meter en una función, de esta manera:
[code:1c5rri5d]
DEFINE DIALOG oDlg OF oApp():oWndMain RESOURCE "UT_INDEXAR" TITLE oApp():cAppName
oDlg:oFont:= oApp():oFont
REDEFINE BITMAP oBmp ID 111 OF oDlg RESOURCE "BB_INDEX" TRANSPARENT
REDEFINE SAY aSay[01] ID 99 OF oDlg PROMPT i18n( "Generando índices..." )
REDEFINE SAY aSay[02] ID 100 OF oDlg PROMPT ""
oMeter := TProgress():Redefine( 101, oDlg )
oDlg:bStart := { || SysRefresh(), Ut_CrearCdx( aSay[02], oMeter, lMsg ), oDlg:End() }
ACTIVATE DIALOG oDlg ;
ON INIT DlgCenter(oDlg,oApp():oWndMain)
[/code:1c5rri5d]
y en Ut_CrearCdx está el código del reindexado. Asi es como lo he hecho siempre y ha funcionado en 95, 98, Me y XP. Dime que hago para que vaya en Vista, y siga funcionando en XP.
Gracias, |
tprogress y windows vista | Jose Luis,
El rango del meter, lo defines en Ut_CrearCdx() ? |
tprogress y windows vista | Antonio,
el rango del meter lo defino en Ut_CrearCdx y varía para cada dbf que indexo. Cada vez que abro un dbf modifico el rango del meter. Esto me ha funcionado siempre bien.
Saludos, |
tprogress y windows vista | Jose Luis,
Revisa samples\ProgTime.prg |
tprogress y windows vista | Jose Luis,
yo uso una pc con vista home basic para desarrollar y he notado que el meter con Progress no llega al 100% o no arranca como tu dices...
¿Puede ser por que el PC es muy rápido?.
Duo core, 1 Giga en Ram.
La verdad no le he dado más importancia... pero lo que si me ha gustado es que antes usaba el METER y al cambiarme a Progress he notado una super velocidad al momento de indexar.
De 1:08 minutos a 8 segundos es un tiempo super rápido al indexar las mismas dbfs.
Saludos
Fernando
México DF |
tprogress y windows vista | Yo creo que la cosa va por ahi, o que la clausula every no se evalua bien en un PC rápido. Si al every le pones un WaitSeconds a la clausula every el meter se actualiza, pero no llega al final. He probado también a modificar el valor del meter con oMeter:DeltaPos y hace lo mismo que con SetPos.
Yo tengo un iMac Core2 duo a 2GHz y 2MB de RAM. El bicho vuela, pero los meter no despegan. Algo pasa, pero no se que. El ejemplo de Antonio si que funciona, pero ahi el intervalo de movimiento es mayor. Tampoco se si en versiones recientes de FWH la clase meter se ha modifcado, yo tengo una de hace más de un año, y me ha ido siempre bien hasta ahora. Con XP iba divinamente.
Saludos, |
tprogress y windows vista | Jose Luis,
Yo lo estoy usando en un Core Quad y funciona bien. Por lo que no creo que sea cuestion de velocidad, sino tal vez de tiempo de refresco para Windows, de ahí que el WaitSeconds() ayude.
Estas usando Vista en modo nativo ó desde vmware/Parallels ? |
tprogress y windows vista | Jose Luis,
Curiosidad "geek" <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> :
Estas usando ya Leopard ? Que "geekbench" te da tu máquina ? <!-- m --><a class="postlink" href="http://www.primatelabs.ca/geekbench">http://www.primatelabs.ca/geekbench</a><!-- m -->
Y Xbench ?
<!-- m --><a class="postlink" href="http://www.xbench.com/">http://www.xbench.com/</a><!-- m --> |
tprogress y windows vista | Lo uso nativo, instalado con BootCamp. Probé Parallels pero el refresco del teclado era muy lento, asi que lo dejé estar.
Al final la solución pasará por el WaitSeconds, pero tengo que ver también lo del tamaño del meter, que parece que no funciona igual que en XP.
Saludos, |
tprogress y windows vista | Antonio, uso Tiger. Todavía me queda mucha tela que aprender ahi como para pasar a Leopard. Y también está lo de los 129 euros, que también hay que pagarlos y la cosa se amontona.
Desconocía lo del GeekBench, cuando vuelva a arrancar en OS X te cuento.
Saludos, |
tprogress y windows vista | Antonio,
el geekbench de 32 bits en mi equipo con Windows Vista es de 2076.
Saludos, |
tprogress y windows vista | <!-- m --><a class="postlink" href="http://browse.geekbench.ca/geekbench2/view/27962">http://browse.geekbench.ca/geekbench2/view/27962</a><!-- m --> |
tprogress y windows vista | gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
tprogress y windows vista | Antonio, insisto en lo de los meter. Mira el siguiente ejemplo:
[code:3yi163u1]// FiveWin Win32 common controls sample
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oDlg, oTabs, oSay, oProgress, oAnimate ,oSay1,oSay2 , nAVI := 1
DEFINE DIALOG oDlg RESOURCE "Main"
REDEFINE SAY oSay ID 100 OF oDlg
oProgress = TProgress():Redefine( 120, oDlg )
oDlg:bStart := { || SysRefresh(), Ut_CrearNTX(oSay, oProgress),;
oDlg:End() }
ACTIVATE DIALOG oDlg CENTERED
return nil
//-----------------------------------------------------------------------------//
function Ut_CrearNTX(oSay, oProgress)
local nProgress:= 0
field first, last
if File("CUSTOMER.NTX")
delete file "customer.ntx")
endif
USE Customer NEW
MsgAlert(LastRec())
oProgress:SetRange(0, RecCount())
oProgress:SetPos( 0 )
nProgress:= 0
sysrefresh()
INDEX ON first+last TO "CUST01" FOR ! Deleted();
EVAL (oProgress:SetPos(nProgress++), oSay:SetText(nProgress), Sysrefresh()) EVERY 1
Msginfo(nProgress)
DbCloseAll()
return nil[/code:3yi163u1]
con este RC
[code:3yi163u1]
1 24 "WinXP/WindowsXP.Manifest"
#include "..\include\WinApi.ch"
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
MAIN DIALOG DISCARDABLE 110, 41, 262, 71
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Vista Progressbar"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "", 120, "msctls_progress32", 0x00000000, 12, 20, 240, 20
CONTROL "Text", 100, "Static", WS_GROUP, 12, 48, 240, 8
END[/code:3yi163u1]
En XP funciona perfecto. En Vista, si le quitas la linea del RC donde carga el .manifest funciona bien, pero si le pones en .manifest ya no llega al final, se queda como al 25% del control. El ejemplo usa la dbf que hay en fivewin/samples.
Saludos, |
tprogress y windows vista | José Luis,
Parece una cuestión de pintado de Windows, porque asi se rellena la barra completamente:
[code:5wnx763g]
INDEX ON first+last TO "CUST01" FOR ! Deleted();
EVAL (oProgress:SetPos(nProgress++), MsgInfo( nProgress ), oSay:SetText(nProgress), Sysrefresh()) EVERY 1
[/code:5wnx763g] |
tprogress y windows vista | José Luis,
Hay que usar los métodos SetStep() y StepIt() y asi sí completa:
[code:2w47tgpa]
oProgress:SetRange( 0, RecCount() )
oProgress:SetStep( 2 )
nProgress:= 0
sysrefresh()
INDEX ON first+last TO "CUST01" FOR ! Deleted();
EVAL ( oProgress:SetPos( nProgress++ ),;
If( nProgress < RecCount(), oProgress:StepIt(),),;
oSay:SetText( nProgress ), SysRefresh()) EVERY 1
[/code:2w47tgpa] |
tprogress y windows vista | Antonio,
en XP funciona bien así. Esta noche lo pruebo en Vista.
Gracias, |
tprogress y windows vista | [quote="José Luis Sánchez":72ti2iqm]Antonio,
en XP funciona bien así. Esta noche lo pruebo en Vista.
Gracias,[/quote:72ti2iqm]
Estou com este problema tambem!
Isto foi solucionado? |
tprogress y windows vista | Anderson,
No, aún no hemos dado con la solución.
De hecho lo estamos comentando estos dias en el foro en inglés:
<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=10194">http://fivetechsoft.com/forums/viewtopic.php?t=10194</a><!-- m --> |
tproxy | Colegas,
Deseo saber cual es la funcionalidad de TPROXY y como aplicarlo. Necesito restrigir el acceso a FaceBook, Messenger, otras aplcaciones para los usuarios. |
trabajar con otro tipo de bd via odbc | se pueden en fivewin trabajar otro tipo de bases de datos via odbc? como? especificamente necesito trabajar con archivos DBisam
gracias
alejandro |
trabajar con otro tipo de bd via odbc | Alejandro.
Si tiene conector ODBC .. puedes con tOdbc o ADO, sin mayores problemas.
Saludos |
track user input | Hello,
Does anyone know of a way to track all user input like button presses, entries etc...
I want to be able to have an optional user debug mode that they can turn on if they are having problems.
The reason I wold like this is that I have the odd customer that will have more problems then other users.
They would be running the same version as other users but generate some errors that I am unable to track down.
I know it's not a permissions issue on their system.
I am never able to reproduce the errors on my test systems. |
track user input | Jeff,
The method HandleEvent() is probably one of the most called modules in FWH, so if you modify it, then it may be a good place to track the user activity.
Anyhow, please keep in mind that this may slow down your app. |
track user input | Thanks Antonio.
I haven't tried changing any methods before ... Can you point me in the right direction? What file(s) would I need to look at changing? |
track user input | Jeff,
is your main window MDI ? |
track user input | No |
track user input | Jeff,
Is it a window or a dialog ? thanks |
track user input | The main screen is a standard window. The area I really would like to track is a dialog.
Thanks. |
track user input | Jeff,
This may be a good start point:
jeff.prg
[code=fw:23yozrv2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xhbcls.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> oDlg<br /><br /> EXTEND <span style="color: #00C800;">CLASS</span> TDialog WITH <span style="color: #00C800;">Method</span> HandleEvent<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> WinExec<span style="color: #000000;">(</span> <span style="color: #ff0000;">"notepad events.txt"</span> <span style="color: #000000;">)</span><br /> FErase<span style="color: #000000;">(</span> <span style="color: #ff0000;">"events.txt"</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: #00C800;">static</span> <span style="color: #00C800;">function</span> HandleEvent<span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> <span style="color: #00C800;">Self</span> := HB_QSelf<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> LogFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"events.txt"</span>, <span style="color: #000000;">{</span> ProcName<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>, nMsg, nWParam, nLParam <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> nMsg == WM_INITDIALOG<br /> <span style="color: #00C800;">return</span> ::<span style="color: #000000;">Initiate</span><span style="color: #000000;">(</span> nWParam, nLParam <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: #000000;">HandleEvent</span><span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span></div>[/code:23yozrv2] |
track user input | You could greatly reduce the size of the log file, filtering the messages that you get from Windows and selecting the most important ones.
In example, WM_COMMAND is sent when a button is pressed, and on other situations. Also you could track WM_KEYDOWN, WM_LBUTTONDOWN, etc.
[code=fw:fe1uzd62]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /> <span style="color: #00C800;">if</span> AScan<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> WM_COMMAND, WM_KEYDOWN, WM_LBUTTONDOWN <span style="color: #000000;">}</span>, nMsg <span style="color: #000000;">)</span> != <span style="color: #000000;">0</span> <br /> LogFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"events.txt"</span>, <span style="color: #000000;">{</span> ProcName<span style="color: #000000;">(</span> <span style="color: #000000;">3</span> <span style="color: #000000;">)</span>, nMsg, nWParam, nLParam <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:fe1uzd62]
Keep in mind that such code will be executed lots of times, so the more time you consume there, the slower the app will get |
track user input | Thanks Antonio,
where can I get xhbcls.ch ?? |
track user input | Also, is it possible to get the button assignment (ie: oBtnStart ) to show up in events.txt ? |
track user input | [quote="Jeff Barnes":x1kfipha]
where can I get xhbcls.ch ??[/quote:x1kfipha]
[url:x1kfipha]https://github.com/harbour/core/blob/master/contrib/xhb/xhbcls.ch[/url:x1kfipha] |
track user input | [quote="Jeff Barnes":17u63avg]Also, is it possible to get the button assignment (ie: oBtnStart ) to show up in events.txt ?[/quote:17u63avg]
I am not sure what you mean.
Do you mean when a variable is assigned ? |
track user input | I am looking to see exactly what button was clicked. A have about 10 buttons on my dialog.
REDEFINE BUTTON oBtnStart ...
REDEFINE BUTTON oBtnEnd...
etc...
I was wondering how I know which button they actually pressed. In the events.txt file there are a bunch of numbers but it would be very helpful if, when a button was clicked, it could show that button object name (line oBtnStart or oBtnEnd etc....)
I hope I am explaining this right <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> |
track user input | Jeff,
Try this one, closer to what you may want <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
[code=fw:3t88loj0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xhbcls.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> oDlg<br /><br /> EXTEND <span style="color: #00C800;">CLASS</span> TDialog WITH <span style="color: #00C800;">Method</span> HandleEvent<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Press"</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> WinExec<span style="color: #000000;">(</span> <span style="color: #ff0000;">"notepad events.txt"</span> <span style="color: #000000;">)</span><br /> FErase<span style="color: #000000;">(</span> <span style="color: #ff0000;">"events.txt"</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: #00C800;">static</span> <span style="color: #00C800;">function</span> HandleEvent<span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> <span style="color: #00C800;">Self</span> := HB_QSelf<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> nMsg == WM_COMMAND<br /> LogFile<span style="color: #000000;">(</span> <span style="color: #ff0000;">"events.txt"</span>, <span style="color: #000000;">{</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> IsWindow<span style="color: #000000;">(</span> nLParam <span style="color: #000000;">)</span>,;<br /> oWndFromHwnd<span style="color: #000000;">(</span> nLParam <span style="color: #000000;">)</span>:<span style="color: #000000;">cVarName</span>,<span style="color: #000000;">)</span> <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> nMsg == WM_INITDIALOG<br /> <span style="color: #00C800;">return</span> ::<span style="color: #000000;">Initiate</span><span style="color: #000000;">(</span> nWParam, nLParam <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: #000000;">HandleEvent</span><span style="color: #000000;">(</span> nMsg, nWParam, nLParam <span style="color: #000000;">)</span></div>[/code:3t88loj0]
EXTEND CLASS example |
track user input | This is all I see in events.txt with the new code:
09/24/13 10:57:51:
09/24/13 10:57:54:
09/24/13 10:57:55:
09/24/13 10:57:57: |
track user input | Jeff,
1. Make a safe copy of FiveWin.ch <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
2. Edit FiveWin.ch here:
[code=fw:4e408ldr]<div class="fw" id="{CB}" style="font-family: monospace;">#xcommand <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #000000;">[</span> <oBtn> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ID</span> <nId> <span style="color: #000000;">[</span> <of:<span style="color: #0000ff;">OF</span>, <span style="color: #0000ff;">WINDOW</span>, DIALOG> <oDlg> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ACTION</span> <uAction,...> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <help:<span style="color: #0000ff;">HELP</span>, HELPID, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <update: <span style="color: #000000;">UPDATE</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <WhenFunc> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <uValid> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">PROMPT</span> <cPrompt> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lCancel: <span style="color: #000000;">CANCEL</span>> <span style="color: #000000;">]</span> ;<br /> => ;<br /> <span style="color: #000000;">[</span> <oBtn> := <span style="color: #000000;">]</span> TButton<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> <nId>, <span style="color: #000000;">[</span>\<span style="color: #000000;">{</span>||<uAction>\<span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <oDlg>,;<br /> <nHelpId>, <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>WhenFunc<span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span>uValid<span style="color: #000000;">}</span>>,;<br /> <cPrompt>, <.lCancel.> <span style="color: #000000;">)</span>; <oBtn>:<span style="color: #000000;">cVarName</span> := <<span style="color: #000000;">(</span>oBtn<span style="color: #000000;">)</span>></div>[/code:4e408ldr]
This is just what I added:
; <oBtn>:cVarName := <(oBtn)>
3. Recompile your PRG and check the log test again. |
track user input | With your sample program I get the following in the events.txt:
09/24/13 11:21:32:
09/24/13 11:21:33:
09/24/13 11:21:33:
09/24/13 11:21:34:
If I try in my program I get an error in one of my dialogs (but not all of them):
Error description: Error BASE/1004 Class: 'NIL' has no exported method: CVARNAME |
traer ventana al primer plano | Vengo con una pregunta seguro que facil , pero no encuentro una solucion rápida..
en un boton tengo el siguiente codigo :
oBrw:report(,,.f.)
para que me genere un reporte en una ventana no modal . Funciona perfecto salvo que la ventana generada se coloca en segundo plano. Como la traigo al frente ? |
traer ventana al primer plano | [code=fw:rhut904o]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oReport:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">lPrvModal</span> := .T.<br /> oReport:<span style="color: #000000;">oDevice</span>:<span style="color: #000000;">SetPage</span><span style="color: #000000;">(</span><span style="color: #000000;">9</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//-> A4 //9</span><br /> </div>[/code:rhut904o] |
traer ventana al primer plano | Gracias por responder <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> pero requiero que la ventana sea NO modal <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
saludos. |
traer ventana al primer plano | Mastintin, intenta BringWindo( hWnd ), en teoría trae el window hWnd al prmer plano.
Saludos |
traer ventana al primer plano | También puedes intentar SetWindowPos(hWnd,-1,,,,,8)
Debería funcionar.
Aqui tienes unos enlaces: <!-- m --><a class="postlink" href="http://winapi.freetechsecrets.com/win32/WIN32SetWindowPos.htm">http://winapi.freetechsecrets.com/win32 ... dowPos.htm</a><!-- m -->
y <!-- m --><a class="postlink" href="http://www.pinvoke.net/default.aspx/coredll/SetWindowPos.html">http://www.pinvoke.net/default.aspx/cor ... owPos.html</a><!-- m --> aunque no son de FiveWin, esa funcion trabaja igual en FW. |
traer ventana al primer plano | Gracias Antolin. Solucionado .
por si a alguien le interesa.
en xbrowse:report() al final del methodo :
[code=fw:ec6m5t9m]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bGoTop</span> <span style="color: #000000;">)</span><br /> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bBookMark</span>, UBookMark <span style="color: #000000;">)</span><br /><br /> <br /> nWnd := GetActiveWindow<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//---------añadido -------------</span><br /> ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> !lmodal <span style="color: #B900B9;">//---------añadido</span><br /> BringWindowToTop<span style="color: #000000;">(</span> hWnd <span style="color: #000000;">)</span> <span style="color: #B900B9;">//------añadido</span><br /> <span style="color: #00C800;">endif</span> <span style="color: #B900B9;">//----- añadido </span><br /><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oBold<br /><br /><br /> </div>[/code:ec6m5t9m] |
transacciones con ads | Hola foro,
Uso Ads en modo servidor con transacciones, lógicamente. Además no permito, por ejemplo, que se repita el mismo número de albarán a través de un indice unique
El problema es que a veces se bloquea la aplicación, por problemas ajenos al programa, y hay que cerrar la aplicación a lo bruto (con el administrador de tareas). Esto produce que ads no desconecte directamente el usuario, tarda un tiempo en desconectarlo.
Si cuando se bloqueó estaba realizando una transacción queda esa transación abierta y al seguir trabajando los demás usuarios no localizan el albarán de la transacción, dé como número siguiente el mismo número que el de la transacción abierta y al grabar si me dice que el número esta abierto. |
transacciones con ads | Efectivamente, cuando manejas transacciones y las terminales pierden la conexion con el server, la transaccion permanece abierta 4 minutos (ese parametro lo configuras en el ADS) pasados los 4 minutos desaparece la transaccion, mientras lo demas usuarios no pueden hacer uso de esa inforamcion, porque el archivo permanece bloqueado, por eso no se recomienda hacer bloqueos dentro de transacciones.
Lo que nosotros hicimos para agilizar el proceso y evitar el problema que tu tienes, fue asignar los numeros consecutivos de documento AL FINAL de la operacion, por ejemplo si se esta dando de alta una factura o un albaran, el numero no aparece al principio, es decir, el usuario comienza a capturar el documento, pero no sabe que numero tiene este, hasta que le da la boton de guardar, en ese momento se realiza un bloqueo de archivo al consecutivo de albaranes, se calcula el numero siguiente y luego con ese numero se procede a registrar todo el albaran dentro de una transaccion. Al final al usuairo se le informa... Albaran registrado con el numero: 12354324. De esta forma impides que se queden archivos bloqueados y que tengas que esperar los 4 minutos respectivos para poder continuar operando el aplicativo. |
transacciones con ads | Hola rene,
Muchas gracias por tu respuesta
Tal y como me cuentas que lo haces es como hago yo las transacciones. Sólo al final asigno nuevo número (cuando da al botón guardar), antes ni siquiera esta abierta una transacción.
El problema es que una vez perdí la conexión del terminal durante la transacción. Ya se sabe, la ley de murphy.
Lo que quería saber es si hay alguna posibilidad de detectar a usuarios dentro del diccionario sin estar conectados (colgados) para poder cerrar sus transacciones. |
transaction security | Does someone know a link about transaction security?
Thanks in advance
Otto |
transaction security | Otto,
Have you googled for it ? There are many references about it. |
transaction security | Hello Antonio,
There are many but too much to start.
If someone could refer one Iwould be glad.
Thanks in advance
Otto |
transfer data from-to a Pocket Pc | There is a way to map a directory on a Pocket Pc from a desktop PC (or map a directory of the Desktop PC for use it from the Pocket) to transfer data without use Copy & Paste with ActiveSync ?
Thanks.
Franz |
transfer data from-to a Pocket Pc | I use cecopy. I saw a reference in this news group days ago. |
transfer data from-to a Pocket Pc | When you install ActiveSync on the desktop computer, it creates a folder in your My Documents folder called "Pocket_PC My Documents". This folder automatically synchs with the My Documents folder on the Pocket PC. So, if you create a sub-folder for your app in one of these folders (either on the Pocket PC or desktop) the contents will be automatically synched when docked. |
transfer data from-to a Pocket Pc | There are two modes with ActiveSync, standar and guest. I always use guestand mode because standar mode is only for 2 pdas (I think?) |
transfer data from-to a Pocket Pc | I agree with Bill, i thing is the easy way, and is authomatic. About standard mode is only for 2 pdas, this is not true. I have more than 5 pdas. If I'm not wrong I belive one PDA can only have 2 desktop computers to sincronize, but no limitation on the other way. |
transfer data from-to a Pocket Pc | Hello,
I use a small program called "Card Export".
It resides on the pocket PC, nothing on the desktop.
When installed, it gives you the choice between Card Export or Active Synch.
If you choose Card Export, it will emulate a USB drive.
The limitation is that you can access only the SD Card or the Pocket PC file store directory.
This is not a problem to me as I put everything on the SD Card. It is much bigger and secure then the Pocket PC RAM.
The advantage is the speed ... far much faster then Active Synch and the simplicity to use it ... from your desktop, a simple copy will work. |
transfer var type Hexadecimal | Hello all,
I need make one function in FWH that transfer one data of type Hexadecimal to one function in xHarbour,
I traid it:
[code:3igudgir]HB_FUNC ( COMANDOCEM ){
char *mensaje = hb_parcx( 01 ); [/code:3igudgir]
then... COMANDOCEM("65")
My question is: "65" when i send to function COMANDOCEM is type string?
what i do to send "65" like Hexadecimal? |
transfer var type Hexadecimal | Comandocem( nHex( cHex ) )
and from Comandocem():
LONG lValue = hb_parnl( 1 ); |
transfer var type Hexadecimal | Antonio,
Entonces: hb_parnl( 1 ) devuelve un valor de tipo LONG?
Seria entonces que un Hexadecimal se lo puede almacenar en un dato de tipo LONG?
Como ser:
ComandoCEm(nhex( 101 ) )
...
Al hacer esto:
LONG lValue = hb_parnl( 1 );
lValue guardaria el 65 ( que es el valor hexadecimal del decimal 101 )
Es asi? |
transfer var type Hexadecimal | Gustavo,
ComandoCEm( nhex( "101" ) ) |
transform records into dbf | I have a dbf with a field "etnombre"
[img:ajgk2j17]http://www.iispascalcomiforti.it/wp-content/uploads/2017/01/nn1.jpg[/img:ajgk2j17]
with capitalized record. Is there a function to convert all records in lower case? except of course the first letter which must remain in uppercase
[code=fw:ajgk2j17]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">Function</span> Test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />cDesc:= <span style="color: #ff0000;">""</span><br />use soggetti <span style="color: #0000ff;">alias</span> so<br /><br />GO TOP <br /><br /><span style="color: #00C800;">Do</span> <span style="color: #00C800;">while</span> ! so-><span style="color: #000000;">(</span>eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <br /><br /> cDesc := Stringlower<span style="color: #000000;">(</span> so->etnombre, <span style="color: #ff0000;">" "</span><span style="color: #000000;">)</span><br /><br />replace so->etnombre with cDesc<br /><br />so-><span style="color: #000000;">(</span>Dbskip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Enddo</span><br /> <span style="color: #0000ff;">xbrowse</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 /><br /><span style="color: #B900B9;">//------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Stringlower<span style="color: #000000;">(</span> string, parser <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> cStr:= <span style="color: #ff0000;">""</span>, nLenPar:= Len<span style="color: #000000;">(</span> parser <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> commapos := <span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">If</span> parser == <span style="color: #00C800;">NIL</span> .OR. parser == <span style="color: #ff0000;">"e"</span><br /> parser := <span style="color: #ff0000;">" "</span><br /> <span style="color: #00C800;">EndIf</span><br /><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> Len<span style="color: #000000;">(</span> string <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> commapos := <span style="color: #00C800;">at</span><span style="color: #000000;">(</span> parser, string <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> commapos > <span style="color: #000000;">0</span><br /> cStr+= Lower<span style="color: #000000;">(</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> string, commapos - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">" "</span><br /> string := Lower<span style="color: #000000;">(</span><span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> string, commapos + Len<span style="color: #000000;">(</span> parser <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> cStr+= string<br /> string := <span style="color: #ff0000;">''</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> cStr <span style="color: #000000;">)</span><br /> </div>[/code:ajgk2j17]
But I hae all record on lower case as you can see on this picture
[img:ajgk2j17]http://www.iispascalcomiforti.it/wp-content/uploads/2017/01/nn.jpg[/img:ajgk2j17]
I wish Have the first letter on uppercase |
transform records into dbf | [b:1q55pcl8]resolved [/b:1q55pcl8]
[code=fw:1q55pcl8]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">Function</span> Test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cDesc:= <span style="color: #ff0000;">""</span><br /> cDesc2:= <span style="color: #ff0000;">""</span><br /> cFirst :=<span style="color: #ff0000;">""</span><br /> cStringa := <span style="color: #ff0000;">""</span><br />use soggetti <span style="color: #0000ff;">alias</span> so<br /><br />GO TOP <br /><br /><span style="color: #00C800;">Do</span> <span style="color: #00C800;">while</span> ! so-><span style="color: #000000;">(</span>eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <br /> cDesc := so->etnombre<br /> nLen:=Len<span style="color: #000000;">(</span>cDesc<span style="color: #000000;">)</span><br /> cFirst := Upper<span style="color: #000000;">(</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span>cDesc,<span style="color: #000000;">1</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> cDesc2 := <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span>Stringlower<span style="color: #000000;">(</span> cDesc, <span style="color: #ff0000;">" "</span><span style="color: #000000;">)</span>,nLen<span style="color: #000000;">-1</span><span style="color: #000000;">)</span><br /><br /><br /> cStringa:= cFirst+cDesc2<br /><br />replace so->etnombre with cStringa<br /><br />so-><span style="color: #000000;">(</span>Dbskip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Enddo</span><br /> <span style="color: #0000ff;">xbrowse</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 /><br /><span style="color: #B900B9;">//------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> Stringlower<span style="color: #000000;">(</span> string, parser <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> cStr:= <span style="color: #ff0000;">""</span>, nLenPar:= Len<span style="color: #000000;">(</span> parser <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> commapos := <span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">If</span> parser == <span style="color: #00C800;">NIL</span> .OR. parser == <span style="color: #ff0000;">"e"</span><br /> parser := <span style="color: #ff0000;">" "</span><br /> <span style="color: #00C800;">EndIf</span><br /><br /> <span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> Len<span style="color: #000000;">(</span> string <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> commapos := <span style="color: #00C800;">at</span><span style="color: #000000;">(</span> parser, string <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> commapos > <span style="color: #000000;">0</span><br /> cStr+= Lower<span style="color: #000000;">(</span><span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> string, commapos - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">" "</span><br /> string := Lower<span style="color: #000000;">(</span><span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> string, commapos + Len<span style="color: #000000;">(</span> parser <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> cStr+= string<br /> string := <span style="color: #ff0000;">''</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> cStr <span style="color: #000000;">)</span><br /><br /><br /> </div>[/code:1q55pcl8] |
transform records into dbf | Same thing can be done with one line of program
[code=fw:5m6iwy1n]<div class="fw" id="{CB}" style="font-family: monospace;"> GO TOP<br /> DBEVAL<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || FIELD->ETNOMBRE := TokenUpper<span style="color: #000000;">(</span> Lower<span style="color: #000000;">(</span> FIELD->ETNOMBRE <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> </div>[/code:5m6iwy1n] |
transform records into dbf | [quote="nageswaragunupudi":311mheyf]Same thing can be done with one line of program
[code=fw:311mheyf]<div class="fw" id="{CB}" style="font-family: monospace;"> GO TOP<br /> DBEVAL<span style="color: #000000;">(</span> <span style="color: #000000;">{</span> || FIELD->ETNOMBRE := TokenUpper<span style="color: #000000;">(</span> Lower<span style="color: #000000;">(</span> FIELD->ETNOMBRE <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> </div>[/code:311mheyf][/quote:311mheyf]
I've seen you using this kind of functions many time
DBEVAL()
AEVAL()
On the FW Wiki they are not listed
On Harbour I only see AEVAL()
TokenUpper() I'v also not found.
Where is the right location of finding ALL RECENT functions of FW? |
transform records into dbf | All these functions are from (x)Harbour. Not FWH.
These functions have been there from the times of 16-bit Clipper days. |
transform records into dbf | thanks I allready resolved |
transform records into dbf | [quote="Marc Venken":27n0ovwt]Where is the right location of finding ALL RECENT functions of FW?[/quote:27n0ovwt]
Have a look at: [url:27n0ovwt]https://harbour.github.io/doc/[/url:27n0ovwt] |
transform records into dbf | Ok. Thanks. |
transform Png to Bmp | to converte a png I use FW_transformBitmap and then save with fw_saveImage
but it createa bmp with black background
I see the bitmap image with black outlines which makes the image look a little grainy and unclear
how can I change the background of the image? |
transform Png to Bmp | I try to save the file to Jpg and then to Bmp and now seem run ok |
transform Png to Bmp | Where is the function FW_transformBitmap() ?
I would do it this way:
FW_SaveImage( "name.png", "name.bmp" )
Did you try this? How is the quality? |
transform Png to Bmp | Rao,
FW_transformBitmap is in [url:3n1k4d55]http://forums.fivetechsupport.com/viewtopic.php?f=3&t=35547&start=0&hilit=FW_transformBitmap[/url:3n1k4d55]
I used this because I wanted have a small image but
my test code to save from png to Bmp
[code=fw:3n1k4d55]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /> <span style="color: #00C800;">Local</span> aElementi:=CaricaElementi<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> cFoldertemp:=<span style="color: #ff0000;">".<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\m</span>ini<span style="color: #000000;">\t</span>emp<span style="color: #000000;">\"</span><br /> Local aElementiBmp:= {}<br /> Local cFileBmp_Elementi:= "</span>TempEl_<span style="color: #ff0000;">"<br /><br /> aElementiBmp:= CreaMiniatureElementi(aElementi,cFoldertemp,cFileBmp_Elementi)<br /> <br />//-----------------------------------------------------------------------------------------//<br />Function CreaMiniatureElementi(aElementi,cFoldertemp,cFileBmp_Elementi)<br /> Local n<br /> Local k<br /> Local atempBmp := {}<br /> Local cFile,cfileNew<br /><br /> For n= 1 to Len(aElementi)<br /><br />// from Png to Jpg<br /> cfile:= Converti_Immagine_Bmp(alltrim(aElementi [n][8]),;<br /> cFolderTemp,;<br /> cFileBmp_Elementi+alltrim(str(n)),0.80)<br /><br />// from Jog to Bmp <br /> cFileNew:= savetobmp(cfile)<br /><br /> //aadd(atempBmp ,cFolderTemp+cFileBmp_Elementi+alltrim(str(n))+"</span>.bmp<span style="color: #ff0000;">")<br /><br /> aadd(atempBmp ,cFileNew+"</span>.bmp<span style="color: #ff0000;">")<br /><br /> next<br /><br /><br /> //xbrowser atempBmp<br /> return atempBmp<br />//-------------------------------------------------------------------------------------------//<br /><br />Function Converti_Immagine_Bmp(cFile,cFolderTemp,cNewName,nResize,ntipo)<br /> Local aext :={"</span>.Bmp<span style="color: #ff0000;">","</span>.Jpg<span style="color: #ff0000;">"}<br /> Local hBmp<br /> Local hNew<br /><br /> DEFAULT ntipo:= 2<br /> DEFAULT nResize:=0.30<br /><br /> //hBmp := FW_ReadImage( nil, cFile )[ 1 ]<br /> //hNew := FW_TransformBitmap( hBmp, NIL, nResize )<br /> //hNew := FW_TransformBitmap( hBmp, {0.2,0.2,-0.2,-0.2}, 0.75, 45 )<br /> //hNew := FW_TransformBitmap( hBmp, nil, 0.75, 45 )<br /><br /> ext:= aExt[ntipo]<br /><br /> //FW_SaveImage( [uImage], [cFile], [nJpgQuality] )<br /> // FW_SaveImage( hNew, cFolderTemp+cNewName+ext,40 )<br /><br /><br /><br /> FW_SaveImage( cFile, cFolderTemp+cNewName+ext,40 )<br /><br /> Return cFolderTemp+cNewName+ext<br /><br /><br /> Function savetobmp(cfile)<br /> Local hBmp := FW_ReadImage( nil, cfile )[ 1 ]<br /> FW_SaveImage( hBmp, cfile+"</span>.Bmp<span style="color: #ff0000;">",40 )<br /><br /> Return cfile<br /><br /></span></div>[/code:3n1k4d55]
Before I save from Png to Bmp but it saved with black outlines and before it was no good for me
bow I converte before to Jpg and then to Bmp |
transform Png to Bmp | [quote="nageswaragunupudi":2xfnset4]Where is the function FW_transformBitmap() ?
I would do it this way:
FW_SaveImage( "name.png", "name.bmp" )
Did you try this? How is the quality?[/quote:2xfnset4]
Now I try with your command
[code=fw:2xfnset4]<div class="fw" id="{CB}" style="font-family: monospace;">aElementiBmp:= ConvertImage<span style="color: #000000;">(</span>aElementi,cFoldertemp,cFileBmp_Elementi<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Function</span> ConvertImage<span style="color: #000000;">(</span>aElementi,cFoldertemp,cFileBmp_Elementi<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> atempBmp := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><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> Len<span style="color: #000000;">(</span>aElementi<span style="color: #000000;">)</span><br /><br /> FW_SaveImage<span style="color: #000000;">(</span> alltrim<span style="color: #000000;">(</span>aElementi <span style="color: #000000;">[</span>n<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>, cFolderTemp+cFileBmp_Elementi+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>n<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">".bmp"</span> <span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span>atempBmp ,cFolderTemp+cFileBmp_Elementi+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>n<span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">".bmp"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /> <br /> <span style="color: #00C800;">return</span> atempBmp<br /> </div>[/code:2xfnset4]
[img:2xfnset4]https://i.postimg.cc/FKYVbzb9/bb.png[/img:2xfnset4]
and you can see the Image with Black outlines , the quality is no good |
transform Png to Bmp | yes, not good. |
transform Png to Bmp | May I know why do you want to convert them as bmp?
Can you not use the png directly in your application? |
transform Png to Bmp | Be[quote="nageswaragunupudi":17mb73c1]May I know why do you want to convert them as bmp?
Can you not use the png directly in your application?[/quote:17mb73c1]
Because I wish use a Combobox and the Combobox not support Png as You told me and I must use Pngs
[b:17mb73c1]But I found a solution[/b:17mb73c1] ( Png->Jpg->Bmp)
[img:17mb73c1]https://i.postimg.cc/PJJq8TkV/good.png[/img:17mb73c1]
[code=fw:17mb73c1]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">Function</span> CreaMiniatureElementi<span style="color: #000000;">(</span>aElementi,cFoldertemp,cFileBmp_Elementi<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> n<br /> <span style="color: #00C800;">Local</span> k<br /> <span style="color: #00C800;">Local</span> atempBmp := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> cFile,cfileNew<br /><br /> <span style="color: #00C800;">For</span> n= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span>aElementi<span style="color: #000000;">)</span><br /> cfile:= Converti_Immagine_Bmp<span style="color: #000000;">(</span>alltrim<span style="color: #000000;">(</span>aElementi <span style="color: #000000;">[</span>n<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>,;<br /> cFolderTemp,;<br /> cFileBmp_Elementi+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>n<span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">0.80</span><span style="color: #000000;">)</span><br /><br /> cFileNew:= savetobmp<span style="color: #000000;">(</span>cfile<span style="color: #000000;">)</span><br /> <br /> aadd<span style="color: #000000;">(</span>atempBmp ,cFileNew+<span style="color: #ff0000;">".bmp"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <br /> <span style="color: #00C800;">return</span> atempBmp<br /><br /> <span style="color: #00C800;">Function</span> Converti_Immagine_Bmp<span style="color: #000000;">(</span>cFile,cFolderTemp,cNewName,nResize,ntipo<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> aext :=<span style="color: #000000;">{</span><span style="color: #ff0000;">".Bmp"</span>,<span style="color: #ff0000;">".Jpg"</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> hBmp<br /> <span style="color: #00C800;">Local</span> hNew<br /><br /> <span style="color: #00C800;">DEFAULT</span> ntipo:= <span style="color: #000000;">2</span><br /> <span style="color: #00C800;">DEFAULT</span> nResize:=<span style="color: #000000;">0.30</span><br /> ext:= aExt<span style="color: #000000;">[</span>ntipo<span style="color: #000000;">]</span><br /><br /> FW_SaveImage<span style="color: #000000;">(</span> cFile, cFolderTemp+cNewName+ext,<span style="color: #000000;">40</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Return</span> cFolderTemp+cNewName+ext<br /><span style="color: #B900B9;">//------------------------------------------------------------------------//</span><br /> <span style="color: #00C800;">Function</span> savetobmp<span style="color: #000000;">(</span>cfile<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> hBmp := FW_ReadImage<span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, cfile <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> FW_SaveImage<span style="color: #000000;">(</span> hBmp, cfile+<span style="color: #ff0000;">".Bmp"</span>,<span style="color: #000000;">40</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Return</span> cfile<br /><br /><br /> </div>[/code:17mb73c1]
[b:17mb73c1]I must resize it on first passage [/b:17mb73c1]
Local aElementi:=CaricaElementi()
Local cFoldertemp:=".\bitmaps\mini\temp\"
Local aElementiBmp:= {}
Local cFileBmp_Elementi:= "TempEl_"
aElementiBmp:= CreaMiniatureElementi(aElementi,cFoldertemp,cFileBmp_Elementi)
[code=fw:17mb73c1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">Function</span> CreaMiniatureElementi<span style="color: #000000;">(</span>aElementi,cFoldertemp,cFileBmp_Elementi<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> n<br /> <span style="color: #00C800;">Local</span> k<br /> <span style="color: #00C800;">Local</span> atempBmp := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> cFile,cfileNew<br /><br /> <span style="color: #00C800;">For</span> n= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span>aElementi<span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//toJpg and resize </span><br /> cfile:= Converti_Immagine_Bmp<span style="color: #000000;">(</span>alltrim<span style="color: #000000;">(</span>aElementi <span style="color: #000000;">[</span>n<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">8</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span>,;<br /> cFolderTemp,;<br /> cFileBmp_Elementi+alltrim<span style="color: #000000;">(</span>str<span style="color: #000000;">(</span>n<span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">0.80</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// save to Bmp</span><br /> cFileNew:= savetobmp<span style="color: #000000;">(</span>cfile<span style="color: #000000;">)</span><br /><br /> aadd<span style="color: #000000;">(</span>atempBmp ,cFileNew+<span style="color: #ff0000;">".bmp"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <br /> <span style="color: #00C800;">return</span> atempBmp<br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------------------------//</span><br /> <span style="color: #00C800;">Function</span> Converti_Immagine_Bmp<span style="color: #000000;">(</span>cFile,cFolderTemp,cNewName,nResize,ntipo<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> aext :=<span style="color: #000000;">{</span><span style="color: #ff0000;">".Bmp"</span>,<span style="color: #ff0000;">".Jpg"</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Local</span> hBmp<br /> <span style="color: #00C800;">Local</span> hNew<br /><br /> <span style="color: #00C800;">DEFAULT</span> ntipo:= <span style="color: #000000;">2</span><br /> <span style="color: #00C800;">DEFAULT</span> nResize:=<span style="color: #000000;">0.30</span><br /><br /> hBmp := FW_ReadImage<span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, cFile <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> hNew := FW_TransformBitmap<span style="color: #000000;">(</span> hBmp, <span style="color: #00C800;">NIL</span>, nResize <span style="color: #000000;">)</span><br /> ext:= aExt<span style="color: #000000;">[</span>ntipo<span style="color: #000000;">]</span><br /><br /> <span style="color: #B900B9;">//FW_SaveImage( [uImage], [cFile], [nJpgQuality] )</span><br /> FW_SaveImage<span style="color: #000000;">(</span> hNew, cFolderTemp+cNewName+ext,<span style="color: #000000;">40</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Return</span> cFolderTemp+cNewName+ext<br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------//</span><br /> <span style="color: #00C800;">Function</span> savetobmp<span style="color: #000000;">(</span>cfile<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> hBmp := FW_ReadImage<span style="color: #000000;">(</span> <span style="color: #00C800;">nil</span>, cfile <span style="color: #000000;">)</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> FW_SaveImage<span style="color: #000000;">(</span> hBmp, cfile+<span style="color: #ff0000;">".Bmp"</span>,<span style="color: #000000;">40</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Return</span> cfile<br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------//</span><br /><br /> </div>[/code:17mb73c1] |
transform String | Hello,
I have a string such as 000000001720.
I need that last two digts are decimals, so the number should be 17.20.
Is there a function to do it?.
Thank you, |
transform String | MsgInfo( Transform( 000000001720, "99,99" ) ) |
transform String | You want to check the string so its last two characters are digits?
EMG |
transform String | [quote="Antonio Linares":3unqh30a]MsgInfo( Transform( 000000001720, "99,99" ) )[/quote:3unqh30a]
Or
[code=fw:3unqh30a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><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> cVal := <span style="color: #ff0000;">"000000001720"</span><br /> <span style="color: #00C800;">LOCAL</span> nVal := VAL<span style="color: #000000;">(</span> cVal <span style="color: #000000;">)</span> / <span style="color: #000000;">100</span><br /><br /> ? nVal<br /><br /> <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3unqh30a]
EMG |
transform String | Thank you Antonio.
No, just transform it.
But previousy I forgot val, so that´s why it did not work |
translate code to fivewin : internet IP | Hi all,
plz help to translate this piece of code into Fivewin,
FUNCTION MyWanIP
LOCAL oHTTP as "winhttp.winhttprequest.5.1"
LOCAL cHTML
oHTTP=NEWOBJECT("winhttp.winhttprequest.5.1")
oHTTP.Open("GET","http://www.ip-adress.com/",.f.)
oHTTP.Send()
cHTML = ohTTP.ResponseText
RELEASE oHTTP
RETURN STREXTRACT(cHTML,"My IP address: ","</h2>")
Thanks.
Regards
Hoe |
translate code to fivewin : internet IP | [code=fw:2nh8dx3g]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> MyWanIP<br /><br /> <span style="color: #00C800;">local</span> oHttp, cHtml<br /><br /> oHttp := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">"winhttp.winhttprequest.5.1"</span> <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"GET"</span>, <span style="color: #ff0000;">"http://www.ip-adress.com/"</span>, .f. <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">Send</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cHtml := oHttp:<span style="color: #000000;">ResponseText</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> cHtml := StrExtract<span style="color: #000000;">(</span> cHtml, <span style="color: #ff0000;">"My IP address: "</span>, <span style="color: #ff0000;">"</h2>"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span> cHtml <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> cHtml<br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> StrExtract<span style="color: #000000;">(</span> cText, cAfter, cBefore <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cRet := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cText, <span style="color: #00C800;">At</span><span style="color: #000000;">(</span> cAfter, cText <span style="color: #000000;">)</span> + Len<span style="color: #000000;">(</span> cAfter <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> n<br /><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> n := <span style="color: #00C800;">At</span><span style="color: #000000;">(</span> cBefore, cRet <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> cRet := <span style="color: #0000ff;">Left</span><span style="color: #000000;">(</span> cRet, n - <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> cRet<br /><br /> </div>[/code:2nh8dx3g] |
translate code to fivewin : internet IP | ok, thanks a lot. |
translation to..Tdatabase | I have these lines how I can to converte it into tdatabase ?
[code=fw:10xjh39t]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> USE LOTTO2.DBF <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> DST<br /> DST-><span style="color: #000000;">(</span> FW_ArrayToDBF<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> DST-><span style="color: #000000;">(</span> DBGOTOP<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span></div>[/code:10xjh39t]
I try with
olotto2:= TDatabase():Open( , "LOTTO2", "DBFCDX", .T. )
olotto2:setorder(1)
olotto2:gotop()
oLotto2:ArraytoDbf(aData)
but not run ok
I tried also with
Local cFieldList:="data,ruota,n1,n2,n3,n4,n5"
oLotto2:ArrayToDBF( aData, cFieldList,nil , .t., .t. )
but make errors
[code=fw:10xjh39t]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Errori\lotto_tdatabase\test.Exe <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">821</span>,<span style="color: #000000;">056</span> bytes<br /> Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">(</span>SimpLex<span style="color: #000000;">)</span> <span style="color: #000000;">(</span>Build <span style="color: #000000;">20180217</span><span style="color: #000000;">)</span><br /> FiveWin version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">19.05</span><br /> C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.3</span> <span style="color: #000000;">(</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">)</span><br /> Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">23</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">03</span><span style="color: #000000;">-09</span><span style="color: #000000;">-2019</span>, <span style="color: #000000;">17</span>:<span style="color: #000000;">21</span>:<span style="color: #000000;">55</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1001</span> Undefined <span style="color: #00C800;">function</span>: <span style="color: #000000;">ARRAYTODBF</span><br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = A <span style="color: #000000;">{</span> ... <span style="color: #000000;">}</span> length: <span style="color: #000000;">63349</span><br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = C <span style="color: #00C800;">data</span>,ruota,n1,n2,n3,n4,n5<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">3</span><span style="color: #000000;">]</span> = U <br /> <span style="color: #000000;">[</span> <span style="color: #000000;">4</span><span style="color: #000000;">]</span> = L .T.<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">5</span><span style="color: #000000;">]</span> = L .T.<br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => ARRAYTODBF<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: => HB_EXECFROMARRAY<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => TDATABASE:<span style="color: #000000;">ARRAYTODBF</span><span style="color: #000000;">(</span> <span style="color: #000000;">1427</span> <span style="color: #000000;">)</span></div>[/code:10xjh39t] |
translation to..Tdatabase | Silvio,
a sample-code
maybe there is something included You can need.
1. creating the dbf
2. appending data from a array
[code=fw:1utofyfp]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//USE LOTTO2.DBF NEW ALIAS DST</span><br /><span style="color: #B900B9;">//DST->( FW_ArrayToDBF( aData ) )</span><br /><span style="color: #B900B9;">//DST->( DBGOTOP() )</span><br /><br /><span style="color: #B900B9;">//olotto2:= TDatabase():Open( , "LOTTO2", "DBFCDX", .T. )</span><br /><span style="color: #B900B9;">//olotto2:setorder(1)</span><br /><span style="color: #B900B9;">//olotto2:gotop()</span><br /><span style="color: #B900B9;">//oLotto2:ArraytoDbf(aData)</span><br /><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> I, X<br /><span style="color: #00C800;">LOCAL</span> aCols := <span style="color: #000000;">{</span> ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"MONTH"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"USAS"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"EUROS"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ASIAS"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"USAC"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"EUROC"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ASIAC"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aData := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"JAN"</span>, <span style="color: #000000;">1000</span>, <span style="color: #000000;">1200</span>, <span style="color: #000000;">900</span>, <span style="color: #000000;">400</span>, <span style="color: #000000;">700</span>, <span style="color: #000000;">400</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FEB"</span>, <span style="color: #000000;">1100</span>, <span style="color: #000000;">1300</span>, <span style="color: #000000;">1000</span>, <span style="color: #000000;">500</span>, <span style="color: #000000;">800</span>, <span style="color: #000000;">500</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"MAR"</span>, <span style="color: #000000;">1050</span>, <span style="color: #000000;">1800</span>, <span style="color: #000000;">1900</span>, <span style="color: #000000;">700</span>, <span style="color: #000000;">1400</span>, <span style="color: #000000;">1600</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"APR"</span>, <span style="color: #000000;">1200</span>, <span style="color: #000000;">1600</span>, <span style="color: #000000;">1200</span>, <span style="color: #000000;">500</span>, <span style="color: #000000;">1000</span>, <span style="color: #000000;">800</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br />DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"LOTTO2.DBF"</span>, aCols, <span style="color: #ff0000;">"DBFCDX"</span>, .t., <span style="color: #ff0000;">"DST"</span> <span style="color: #000000;">)</span><br />FW_ArrayToDBF<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span><br />CLOSE DST<br /><br />oLotto2 := TDatabase<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> , <span style="color: #ff0000;">"LOTTO2"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, .T. <span style="color: #000000;">)</span><br /><span style="color: #B900B9;">// CreateIndex( cFile, cTag, cKey, lUnique, lDescend, lMemory )</span><br />oLotto2:<span style="color: #000000;">CreateIndex</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"LOTTO2"</span>, <span style="color: #ff0000;">"LOTTO2"</span>, <span style="color: #ff0000;">"MONTH"</span>, .F. <span style="color: #000000;">)</span> <br />oLotto2:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Test appending the array once again to the existing data</span><br /><br />I := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> aData <span style="color: #000000;">)</span><br /> oLotto2:<span style="color: #000000;">Append</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> X := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">FOR</span> X := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> oLotto2:<span style="color: #000000;">FCount</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /> Y := aData<span style="color: #000000;">[</span>I<span style="color: #000000;">]</span><span style="color: #000000;">[</span>x<span style="color: #000000;">]</span><br /> oLotto2:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">(</span> x, y <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /> oLotto2:<span style="color: #000000;">Save</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">NEXT</span><br /><span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">(</span> oLotto2 <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:1utofyfp]
regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
transparencia de tree en dialogos | Estimados compañeros buenas tardes
Una Consulta
Tengo el siguiente codigo, se me pone transparente todo menos el tree existe una solucion ?
[code=fw:25xsbb2z]<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;">"WColors.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> SISTEMA <span style="color: #ff0000;">'Sistema de Gestión Integrado JoseNet Versión 2.3'</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> oDlg, oTree<br /> <span style="color: #00C800;">local</span> oMenuTree<br /> <span style="color: #00C800;">local</span> oItem<br /> <span style="color: #00C800;">local</span> oLbx<br /> <span style="color: #00C800;">local</span> aEmpresas := <span style="color: #000000;">{</span><span style="color: #ff0000;">'empresa001'</span>,<span style="color: #ff0000;">'empresa002'</span>,<span style="color: #ff0000;">'empresa003'</span>,<span style="color: #ff0000;">'empresa004'</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> cEmpresa := aEmpresas<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span><br /> <span style="color: #00C800;">local</span> oFont<br /> <span style="color: #00C800;">local</span> oBtn<br /> <span style="color: #00C800;">local</span> lVisuales := .t.<br /> <span style="color: #00C800;">local</span> lYaEmpre := .f.<br /> <span style="color: #00C800;">local</span> oChk<br /> <span style="color: #00C800;">local</span> oBrush<br /> <span style="color: #00C800;">local</span> oSay<br /> <span style="color: #00C800;">local</span> cMsg := <span style="color: #ff0000;">'aca lo que escogimos '</span><br /> <span style="color: #00C800;">local</span> cMsg1 := <span style="color: #ff0000;">'empresa que es la que se escoge con el mouse'</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE <span style="color: #ff0000;">"degrade.bmp"</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Verdana"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> SISTEMA <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">(</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION<span style="color: #000000;">)</span> <span style="color: #0000ff;">font</span> oFont <span style="color: #0000ff;">BRUSH</span> oBrush TRANSPARENT<br /><br /> @ <span style="color: #000000;">005</span>, <span style="color: #000000;">005</span> TREEVIEW oTree <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">0</span>, GetSysColor<span style="color: #000000;">(</span> COLOR_WINDOW <span style="color: #000000;">)</span> <span style="color: #0000ff;">PIXEL</span><br /> oTree:<span style="color: #000000;">lTransparent</span> = .t.<br /><br /> @ <span style="color: #000000;">005</span>, <span style="color: #000000;">140</span> <span style="color: #0000ff;">LISTBOX</span> oLbx <span style="color: #0000ff;">VAR</span> cEmpresa <span style="color: #0000ff;">ITEMS</span> aEmpresas <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">145</span>, <span style="color: #000000;">140</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br /> oLbx:<span style="color: #000000;">lTransparent</span> = .t.<br /><br /> @ <span style="color: #000000;">170</span>, <span style="color: #000000;">130</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>w2<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\n</span>o.bmp"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>, <span style="color: #000000;">25</span> ;<br /> <span style="color: #0000ff;">LEFT</span> NOBORDER <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">160</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">CHECKBOX</span> oChk <span style="color: #0000ff;">VAR</span> lVisuales <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Visuales"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">155</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> cMsg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /> @ <span style="color: #000000;">145</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> oSay1 <span style="color: #0000ff;">VAR</span> cMsg1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">290</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> AddItems<span style="color: #000000;">(</span> oTree <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00C800;">function</span> AddItems<span style="color: #000000;">(</span> oTree <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oItem1<br /> <span style="color: #00C800;">local</span> oItem2<br /> <span style="color: #00C800;">local</span> oItem3<br /> <span style="color: #00C800;">local</span> oItem4<br /> <span style="color: #00C800;">local</span> oItem5<br /> <span style="color: #00C800;">local</span> oItem6<br /> <span style="color: #00C800;">local</span> oItem7<br /> <span style="color: #00C800;">local</span> oItem8<br /> <span style="color: #00C800;">local</span> oItem9<br /><br /> oItem1 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Ventas"</span> <span style="color: #000000;">)</span><br /><br /> oTree:<span style="color: #000000;">bLDblClick</span> = <span style="color: #000000;">{</span> | nRow, nCol | veam<span style="color: #000000;">(</span> nRow, nCol <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oItem2 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Auxiliares"</span> <span style="color: #000000;">)</span><br /> oItem3 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"VentasOff"</span> <span style="color: #000000;">)</span><br /> oItem4 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Roles de Pago"</span> <span style="color: #000000;">)</span><br /> oItem5 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Contabilidad"</span> <span style="color: #000000;">)</span><br /> oItem6 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Importaciones"</span> <span style="color: #000000;">)</span><br /> oItem7 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Anexo Transaccional"</span> <span style="color: #000000;">)</span><br /> oItem8 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Contabilidades Anteriores"</span> <span style="color: #000000;">)</span><br /> oItem9 = oTree:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Manual"</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> veam<span style="color: #000000;">(</span> nRow, nCol <span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">0</span> .and. nRow <= <span style="color: #000000;">20</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'1'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">21</span> .and. nRow <= <span style="color: #000000;">40</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'2'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">41</span> .and. nRow <= <span style="color: #000000;">60</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'3'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">61</span> .and. nRow <= <span style="color: #000000;">80</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'4'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">81</span> .and. nRow <= <span style="color: #000000;">100</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'5'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">101</span> .and. nRow <= <span style="color: #000000;">120</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'6'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">121</span> .and. nRow <= <span style="color: #000000;">140</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'7'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">141</span> .and. nRow <= <span style="color: #000000;">160</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'8'</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">case</span> nRow >= <span style="color: #000000;">161</span> .and. nRow <= <span style="color: #000000;">180</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span><span style="color: #ff0000;">'9'</span><span style="color: #000000;">)</span><br /> end<br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:25xsbb2z]
gracias por su ayuda
Wilson
PD: Utilizo ultimo Fwh 14.11 de 32 bits y bcc582 |
transparencia de tree en dialogos | [code=fw:3sl7fa9g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//#Define CLR_WINDOW RGB( 130, 130, 130 )</span><br /><span style="color: #00D7D7;">#Define</span> CLR_WINDOW <span style="color: #000000;">315</span><br /><br /> oTree:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> CLR_WINDOW, CLR_WHITE <span style="color: #000000;">)</span><br /> </div>[/code:3sl7fa9g]
Saludos. |
transparencia de tree en dialogos | Muchas gracias, probe y sigue sin funcionar
saludos
Wilson |
transparencia de tree en dialogos | Wilson,
Prueba esto:
oTree:bEraseBkGnd = { || nil } |
transparencia de tree en dialogos | Antonio gracias por responder
esto obtengo con tu sugerencia
[img:5pg04hhj]http://imageshack.com/a/img537/5125/HJToFV.jpg[/img:5pg04hhj]
aun no es lo que espero
gracias
Wilson |
transparencia de tree en dialogos | Wilson,
Lo que deseas es que el fondo de Tree se vea transparente ?
No se si ese control lo permite... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.