topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Alias in index expression
|
Is there an advantage of using an ALIAS in the index-expression:
index on kasse->beleg tag k_beleg
or
index on beleg tag k_beleg
Thanks in advance
Otto
|
Alias in index expression
|
[quote="Otto":3b6hjxg3]Is there an advantage of using an ALIAS in the index-expression:
index on kasse->beleg tag k_beleg
or
index on beleg tag k_beleg
Thanks in advance
Otto[/quote:3b6hjxg3]
None at all, in fact, you should avoid the use of use of alias in index expressions, specially if you are using Advantage Database Server, or if you are working with dynamic aliases.
|
Alias in index expression
|
I use
index on field->beleg tag k_beleg
so I not declare the FIELD
Maurizio
|
Alias in index expression
|
Rene, thank you for your answer. Advantage is my problem therefore I have to change. I couldn't remember why I used the Alias.
Hello Maurizio,
I was very happy to see you and your family here in Sillian.
The evening was too short.
Greetings from all of us
Otto
|
Alignement in Excel (solved)
|
Hello,
I want to make an Excel-document from my FWH-application.
I need to align the cells in my Excel document.
To achieve tha, I try this :[code=fw:18bc708l]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/* Explanation cPos :<br /> cPos = 0 -> Standaad alignement<br /> cPos = 1 -> Left alignement<br /> cPos = 2 -> Centered<br /> cPos = 3 -> Right alignement<br /> cPos = 4 -> Left + right alignement<br />*/</span><br />oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"A1"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">HorizontalAlignment</span> := cPos</div>[/code:18bc708l]Unfortunately, nothing is changing.
What do I do wrong?
Does anyone have another suggestion?
Thanks a lot in advance for any help.
|
Alignement in Excel (solved)
|
Not valid this?
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32228&p=188814&hilit=HorizontalAlignment#p188814">viewtopic.php?f=3&t=32228&p=188814&hilit=HorizontalAlignment#p188814</a><!-- l -->
|
Alignement in Excel (solved)
|
Thanks a lot for your help. It works just fine.
Sorry I couldn't remember my previous topic about this subject.
|
Alignment of column CHAR in Xbrowse
|
Hi all
Why when xBrowse display a column of type char (ALIG LEFT) are trimmed left spaces ?
Is it possible fix this ?
Es.: cStr := " Test" align is "Test"
TIA
|
Alignment of column CHAR in Xbrowse
|
Mauri,
I don't understand what you are asking for.
Left trimming is what ALIGN LEFT means, so it would seem that it is not in need of fixing.
If you don't want left trimming then just leave off ALIGN LEFT.
Perhaps you want something else?
Regards,
James
|
Alignment of column CHAR in Xbrowse
|
Hi James
I post an image to explain better the problem
[img]
<!-- m --><a class="postlink" href="https://imageshack.com/i/po8DfT0Kp">https://imageshack.com/i/po8DfT0Kp</a><!-- m -->
[/img]
Regard,
Mauri
|
Alignment of column CHAR in Xbrowse
|
Mauri,
The xbrowse appears to be working correctly.
You could use ALIGN RIGHT, which is what one usually uses with numbers. That is what I would do.
Or, you could use something like strtran([fieldname]," ", chr(160)). This will replace spaces with an invisible character that looks like a space. I don't know if XBrowse can handle that character.
I just noticed that it appears that this is an item number. I always start item numbers with "1" plus however many zeros it takes to fill the field. Or, you could always make item numbers the same length by left padding them with zeros when needed. Either of these would solve your xbrowse problem.
Or, you could solve this without changes to the data file, you could define the column with [b:25p1ub54]strtran([fieldname]," ","0")[/b:25p1ub54] . However, if this is an existing system this could cause problems if users try to type in leading zeros when searching for item numbers.
Or, with an existing system you could just replace all the item numbers in the file with strtran([fieldname]," ","0"). However, for awhile there would be a lot of confusion by users. Pre-existing documents would have no leading zeros, and new documents would. It could also create problems with existing item numbers in other files, like invoices etc. You would have to find and change all them too.
These are reasons why I always use item numbers of equal lengths.
The simplest thing to do is just ALIGN RIGHT.
Regards,
James
|
Alineacion de campos en fastreport (solucionado)
|
Buenos dias.
Estoy haciendo algunas pruebas con la version demo de fastreport para la impresion de facturas electronicas, me encontre con un problema que no se como resolver. En la impresion de la cadena orignal fastreport siempre da una alineacion automatica y la cadena queda de la siguiente forma;
[img:26l1h1w0]http://www.lanominamasfacil.com.mx/cadori.JPG[/img:26l1h1w0]
Como pueden ver fastreport, al hacer la alineacion automatica, corta las lineas cuando encuentra un espacio, sucede algo similar cuando se cambia la justificacion a right o center o block. No encuentro la forma de hacer que el campo se imprima sin alineacion automatica. Esto es importante para la impresion de facturas electronicas en mexico puesto que la cadena original debe de imprimirse sin alineacion automatica.
Saludos.
|
Alineacion de campos en fastreport (solucionado)
|
Hola
Encontre una solucion cambiando los espacios por espacios sin separacion [i:387kgnqa]chr(255)[/i:387kgnqa] en la cadena original que se va a imprimir con fastreport. De esta forma fastreport no realiza alineacion automatica
cCadOriParaImprimir := strTran(cCadOri,' ',oemToAnsi(chr(255)))
Saludos.
|
Alineación en treport Solucionado
|
Quisiera saber de qué manera puedo alinear el título de una columna y una alineación diferente para la data de la misma. Gracias por la ayuda
|
Alineación en treport Solucionado
|
Puedes experimentar esto
[code=fw:3ex77rxo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oRpt:<span style="color: #000000;">bStartPage</span> := <span style="color: #000000;">{</span>|| oCol:<span style="color: #000000;">nPad</span> := RPT_CENTER <span style="color: #000000;">}</span> <br />oRpt:<span style="color: #000000;">bStartRecord</span> := <span style="color: #000000;">{</span>|| oCol:<span style="color: #000000;">nPad</span> := RPT_RIGHT <span style="color: #000000;">}</span><br /> </div>[/code:3ex77rxo]
|
Alineación en treport Solucionado
|
Gracias RenOmas, lo que no entiendo es de donde sale el objeto oCol. No me doy cuenta. Gracias por la respuesta. SOLUCIONADO. Muchisimas Gracias
|
Alineación en treport Solucionado
|
[quote="horacio":1xjysv37]Gracias RenOmas, lo que no entiendo es de donde sale el objeto oCol. No me doy cuenta. Gracias por la respuesta. SOLUCIONADO. Muchisimas Gracias[/quote:1xjysv37]
A mi me pasa lo mismo. ¿Podrias poner un ejemplo esquematico de como lo has hecho?
Muchas gracias
|
Alineación en treport Solucionado
|
Manuel. aqui el ejemplo
[code=fw:22selpig]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">Function</span> ImpPadron<span style="color: #000000;">(</span> aArray <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Local</span> oReporte<br /><span style="color: #00C800;">Local</span> oFnt1<br /><span style="color: #00C800;">Local</span> oFnt2<br /><span style="color: #00C800;">Local</span> oFnt3<br /><span style="color: #00C800;">Local</span> oFnt4<br /><span style="color: #00C800;">Local</span> oPen1<br /><span style="color: #00C800;">Local</span> oPen2<br /><span style="color: #00C800;">Local</span> i, j<br /><span style="color: #00C800;">Local</span> nAt := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">Local</span> oEspera<br /><span style="color: #00C800;">LocaL</span> dFecha<br /><br /><span style="color: #0000ff;">Define</span> Pen oPen1 Width <span style="color: #000000;">1</span> <span style="color: #0000ff;">COLOR</span> RGB<span style="color: #000000;">(</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span><br /><span style="color: #0000ff;">Define</span> Pen oPen2 Width <span style="color: #000000;">1</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK<br /><br /><span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Font</span> oFnt1 <span style="color: #0000ff;">Name</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">8</span><br /><span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Font</span> oFnt2 <span style="color: #0000ff;">Name</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">8</span> Bold<br /><span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Font</span> oFnt3 <span style="color: #0000ff;">Name</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span> Bold<br /><span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Font</span> oFnt4 <span style="color: #0000ff;">Name</span> <span style="color: #ff0000;">"Tahoma"</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">8</span> Bold<br /><br /><span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oVarGlobales : <span style="color: #000000;">lPrevisualiza</span> <span style="color: #000000;">)</span><br /> Report oReporte <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"**LISTADO DEL PADRON**"</span>, <span style="color: #ff0000;">""</span> ;<br /> Preview <span style="color: #0000ff;">Font</span> oFnt2, oFnt3, oFnt1, oFnt4 ;<br /> Header Alltrim<span style="color: #000000;">(</span> oVarGlobales : <span style="color: #000000;">cColegio</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Fecha "</span> + DToC<span style="color: #000000;">(</span> Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Hora "</span> + Time<span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> Footer OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Página Nro "</span> <span style="color: #000000;">)</span> + StrZero<span style="color: #000000;">(</span> oReporte : <span style="color: #000000;">nPage</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">Center</span> Pen oPen2, oPen1 ;<br /> Caption <span style="color: #ff0000;">"Listado del padron"</span><br /><span style="color: #00C800;">Else</span><br /> oEspera := TEspera<span style="color: #000000;">(</span><span style="color: #000000;">)</span> : <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Imprimiendo. Espere por favor"</span> <span style="color: #000000;">)</span><br /> Report oReporte <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"Listado de Padron"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span> ;<br /> <span style="color: #0000ff;">Font</span> oFnt2, oFnt3, oFnt1, oFnt4 ;<br /> Header Alltrim<span style="color: #000000;">(</span> oVarGlobales : <span style="color: #000000;">cColegio</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Fecha "</span> + DToC<span style="color: #000000;">(</span> Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Hora "</span> + Time<span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> Footer OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Página Nro "</span> <span style="color: #000000;">)</span> + StrZero<span style="color: #000000;">(</span> oReporte : <span style="color: #000000;">nPage</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">Center</span> Pen oPen2, oPen1 ;<br /> Caption <span style="color: #ff0000;">"Listado del padron"</span><br />End<br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">''</span>, <span style="color: #ff0000;">"DOC."</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> Alltrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">10</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">'EMPLEADO'</span>,<span style="color: #ff0000;">"OBRA SOCIAL"</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>, aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">4</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">35</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">''</span>, <span style="color: #ff0000;">"CUIL"</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">12</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">''</span>, <span style="color: #ff0000;">"ALTA"</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> dFecha <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">8</span> <span style="color: #0000ff;">Center</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"COD."</span>, <span style="color: #ff0000;">"ACT."</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">Center</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"MOD."</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">7</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">Center</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"COND."</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">8</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">Center</span> <span style="color: #B900B9;">//Grid 2</span><br /> Column <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"COD."</span>, <span style="color: #ff0000;">"ZONA"</span>, <span style="color: #ff0000;">" "</span> <span style="color: #00C800;">Data</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">9</span> <span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> <span style="color: #000000;">3</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">Center</span> <span style="color: #B900B9;">//Grid 2</span><br /><br /> oReporte : <span style="color: #000000;">nTitleUpLine</span> := RPT_NOLINE<br /> oReporte : <span style="color: #000000;">nTitleDnLine</span> := RPT_NOLINE<br /> oReporte : <span style="color: #000000;">nTotalLine</span> := RPT_NOLINE<br /> oReporte : <span style="color: #000000;">nDataLine</span> := RPT_DOUBLELINE<br /> <span style="color: #B900B9;">//Aeval(oReporte : aColumns, {|v| v:Separator(100)})</span><br />End Report<br /><br /><span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oReporte : <span style="color: #000000;">lCreated</span> <span style="color: #000000;">)</span><br /> With Object oReporte<br /> :<span style="color: #000000;">nTitleBox</span> := <span style="color: #000000;">3</span><br /> :<span style="color: #000000;">lTitleBoxJoin</span> := .t.<br /> :<span style="color: #000000;">nHeaderBox</span> := <span style="color: #000000;">3</span><br /> :<span style="color: #000000;">nBodyBox</span> := <span style="color: #000000;">2</span><br /> :<span style="color: #000000;">nCurve</span> := <span style="color: #000000;">0</span><br /> :<span style="color: #000000;">SetPenColor</span><span style="color: #000000;">(</span> CLR_WHITE <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">bSkip</span> := <span style="color: #000000;">{</span> || nAt++ <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">oTitle</span> : <span style="color: #000000;">aFont</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">2</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">oHeader</span> : <span style="color: #000000;">aFont</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">2</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">oTitle</span> : <span style="color: #000000;">aPad</span><span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> := RPT_LEFT<br /> :<span style="color: #000000;">oTitle</span> : <span style="color: #000000;">aPad</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> := RPT_CENTER<br /> :<span style="color: #000000;">oTitle</span> : <span style="color: #000000;">aPad</span><span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> := RPT_LEFT<br /> :<span style="color: #000000;">oDevice</span> : <span style="color: #000000;">SetPortrait</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">oDevice</span> : <span style="color: #000000;">lPrvModal</span> := .t.<br /> End<br />End<br /><br />oReporte : <span style="color: #000000;">bStartPage</span> := <span style="color: #000000;">{</span> || CambiaAlineacion<span style="color: #000000;">(</span> oReporte, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br />oReporte : <span style="color: #000000;">bStartRecord</span> := <span style="color: #000000;">{</span> || CambiaAlineacion<span style="color: #000000;">(</span> oReporte, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">Activate</span> Report oReporte <span style="color: #0000ff;">On</span> <span style="color: #0000ff;">Init</span> <span style="color: #000000;">(</span> oReporte : <span style="color: #000000;">lSeparator</span> := .t. <span style="color: #000000;">)</span> ;<br /> <span style="color: #00C800;">While</span> nAt <= Len<span style="color: #000000;">(</span> aArray <span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">On</span> StartLine<span style="color: #000000;">(</span> dFecha := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Valtype<span style="color: #000000;">(</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"U"</span>, DToc<span style="color: #000000;">(</span> CToD<span style="color: #000000;">(</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, DToc<span style="color: #000000;">(</span> aArray<span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span><span style="color: #000000;">[</span> <span style="color: #000000;">5</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br />oPen1 : <span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oPen2 : <span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oFnt1 : <span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oFnt2 : <span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oFnt3 : <span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oFnt4 : <span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />oVarGlobales : <span style="color: #000000;">oWndMain</span> : <span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">If</span><span style="color: #000000;">(</span> !oVarGlobales : <span style="color: #000000;">lPrevisualiza</span> <span style="color: #000000;">)</span><br /> oEspera : <span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />End<br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">Function</span> CambiaAlineacion<span style="color: #000000;">(</span> oReporte, nOpcion <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Local</span> i<br /><br /><span style="color: #00C800;">Switch</span> nOpcion<br /> <span style="color: #00C800;">Case</span> <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> oReporte : <span style="color: #000000;">aColumns</span> <span style="color: #000000;">)</span><br /> oReporte : <span style="color: #000000;">aColumns</span><span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> : <span style="color: #000000;">nPad</span> := RPT_LEFT<br /> oReporte : <span style="color: #000000;">aColumns</span><span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> : <span style="color: #000000;">bTitleFont</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">4</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Next</span> i<br /> Exit<br /> <span style="color: #00C800;">Case</span> <span style="color: #000000;">2</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> oReporte : <span style="color: #000000;">aColumns</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> i == <span style="color: #000000;">2</span> <span style="color: #000000;">)</span><br /> oReporte : <span style="color: #000000;">aColumns</span><span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> : <span style="color: #000000;">nPad</span> := RPT_LEFT<br /> <span style="color: #00C800;">Else</span><br /> oReporte : <span style="color: #000000;">aColumns</span><span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> : <span style="color: #000000;">nPad</span> := RPT_CENTER<br /> End<br /> oReporte : <span style="color: #000000;">aColumns</span><span style="color: #000000;">[</span> i <span style="color: #000000;">]</span> : <span style="color: #000000;">bDataFont</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">3</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">Next</span> i<br /> Exit<br />End<br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">0</span><br /> </div>[/code:22selpig]
Salu2
|
Alineación en treport Solucionado
|
Horacio, muchas gracias.
|
Alineameniento de Controles...
|
Hola,
quiero preguntar si alguien sabe como cambiar la alineación (izquierda,derecha o centrado) de un control creado desde recursos (workShop), especificamente un Get ("Edit text style") desde tiempo de ejecución.
El problema es que tengo un dialogo con un get, que dependiendo un parametro puede ser númerico o texto, por lo que me gustaría poder cambiar su alineacion derecha o izquierda, ya que desde workshop solo puedo poner una de estas dos.
Espero me puedan ayuda con esto. Saludos.
Carlos Sincuir
|
Alineameniento de Controles...
|
Carlos, yo tuve ese mismo problema y obté por lo siguiente:
Redefino el dialogo con todos los controles salvo los Gets en cuestión. (lo que no recuerdo es si lo creéen el resource o no, creo que no, pues estoy cambiando el sistema y aún no he instalado el WorkShop, intentalo sin crearlos)
DEFINE DIALOG oDlg ....
...
...
REDEFINE BITMAP oBit[1] ID 600 NAME "IZQ1" OF oDlg CURSOR oCurH ;
ON CLICK QueMarg(oDlg,oFont,oBit,oGet,.T.,0) // [b:rf5fvjyi]BOTON ALINEAR A LA IZQUIERDA[/b:rf5fvjyi]
REDEFINE BITMAP oBit[2] ID 601 NAME "CNT1" OF oDlg CURSOR oCurH ;
ON CLICK QueMarg(oDlg,oFont,oBit,oGet,.T.,2) // [b:rf5fvjyi]BOTON ALINEAR AL CENTRO[/b:rf5fvjyi]
REDEFINE BITMAP oBit[3] ID 602 NAME "DCH1" OF oDlg CURSOR oCurH ;
ON CLICK QueMarg(oDlg,oFont,oBit,oGet,.T.,1) // [b:rf5fvjyi]BOTON ALINEAR A LA DERECHA[/b:rf5fvjyi]
...
REDEFINE mas Controles...
...
...
ACTIVATE DIALOG oDlg ON INIT QueMarg(oDlg,oFont,oBit,oGet,.F.,0)
FUNCTION QueMarg(oDlg,oFont,oBt,Gt,lCtrl,nJust)
IF !lCtrl
oGt[1]:Destroy() // [b:rf5fvjyi]DESTRUYO LOS GETs SI ESTABAN CREADOS CON ANTERIORIDAD[/b:rf5fvjyi] (LA PRIMERA VEZ NO LO ESTABAN)
oGt[2]:Destroy()
oGt[3]:Destroy()
oGt[1]:End()
oGt[2]:End()
oGt[3]:End()
oGt[1] := NIL
oGt[2] := NIL
oGt[3] := NIL
SysRefresh()
ENDIF
aVr[1] := ALLTRIM( aVr[1] ) // [b:rf5fvjyi]LE QUITO LOS ESPACIOS SOBRANTES A LAS VARIABLES DE LOS GETs [/b:rf5fvjyi]DE CUANDO ESTAN JUSTIFICADAS A LA DERECHA O AL CENTRO
aVr[2] := ALLTRIM( aVr[2] )
aVr[3] := ALLTRIM( aVr[3] )
IF nJust = 0 // [b:rf5fvjyi]SE CREAN LOS GET's JUSTIFICADOS A LA IZQUIERDA[/b:rf5fvjyi]
oBt[1]:SetBmp( "IZQ2" ) ; oBt[1]:Disable()
oBt[2]:SetBmp( "CNT1" ) ; oBt[2]:Enable() // [b:rf5fvjyi]BOTON JUSTIFICAR A LA IZQUIERDA PRESIONADO Y DESHABILITADO[/b:rf5fvjyi]
oBt[3]:SetBmp( "DCH1" ) ; oBt[3]:Enable()
aVr[1]:= PADR(aVr[1],45)
aVr[2]:= PADR(aVr[2],45)
aVr[3]:= PADR(aVr[3],45)
@ 60,228 GET oGt[1] VAR aVr[1] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
COLOR CLR_OBLUE FONT oFnt
@ 83,228 GET oGt[2] VAR aVr[2] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
COLOR CLR_OBLUE FONT oFnt
@ 106,228 GET oGt[3] VAR aVr[3] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
COLOR CLR_OBLUE FONT oFnt
ELSEIF nJust = 2 // [b:rf5fvjyi]SE CREAN LOS GET's JUSTIFICADOS AL CENTRO[/b:rf5fvjyi]
oBt[1]:SetBmp( "IZQ1" ) ; oBt[1]:Enable()
oBt[2]:SetBmp( "CNT2" ) ; oBt[2]:Disable() // [b:rf5fvjyi]BOTON JUSTIFICAR AL CENTRO PRESIONADO Y DESHABILITADO[/b:rf5fvjyi]
oBt[3]:SetBmp( "DCH1" ) ; oBt[3]:Enable()
aVr[1]:= PADR(aVr[1],45)
aVr[2]:= PADR(aVr[2],45)
aVr[3]:= PADR(aVr[3],45)
@ 60,228 GET oGt[1] VAR aVr[1] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
COLOR CLR_OBLUE FONT oFnt CENTER
@ 83,228 GET oGt[2] VAR aVr[2] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
COLOR CLR_OBLUE FONT oFnt CENTER
@ 106,228 GET oGt[3] VAR aVr[3] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
COLOR CLR_OBLUE FONT oFnt CENTER
ELSE // [b:rf5fvjyi]SE CREAN LOS GET's JUSTIFICADOS A LA DERECHA[/b:rf5fvjyi]
oBt[1]:SetBmp( "IZQ1" ) ; oBt[1]:Enable()
oBt[2]:SetBmp( "CNT1" ) ; oBt[2]:Enable()
oBt[3]:SetBmp( "DCH2" ) ; oBt[3]:Disable()[b:rf5fvjyi]BOTON JUSTIFICAR A DERECHA PRESIONADO Y DESHABILITADO[/b:rf5fvjyi]
aVr[1]:= PADL(aVr[1],45)
aVr[2]:= PADL(aVr[2],45)
aVr[3]:= PADL(aVr[3],45)
@ 60,228 GET oGt[1] VAR aVr[1] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
VALID(aVr[1] := PADL(ALLTRIM(aVr[1]),45),oGt[1]:cText(aVr[1]),.T.) ;
COLOR CLR_OBLUE FONT oFnt RIGHT
@ 83,228 GET oGt[2] VAR aVr[2] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
VALID(aVr[2] := PADL(ALLTRIM(aVr[2]),45),oGt[2]:cText(aVr[2]),.T.) ;
COLOR CLR_OBLUE FONT oFnt RIGHT
@ 106,228 GET oGt[3] VAR aVr[3] OF oDlg PIXEL SIZE 350,20 PICTURE "@S45" ;
VALID(aVr[3] := PADL(ALLTRIM(aVr[3]),45),oGt[3]:cText(aVr[3]),.T.) ;
COLOR CLR_OBLUE FONT oFnt RIGHT
ENDIF
Ctl3dLook(oGt[1]:hWnd)
Ctl3dLook(oGt[2]:hWnd)
Ctl3dLook(oGt[3]:hWnd)
SysRefresh()
RETURN NIL
*
Como ves, a cada vez que pulso sobre el boton un boton de justificacion destruyo los GET's y los vuelvo a crear. Es la única solución que encontré, y me va de maravilla.
Espero que te sirva la ayuda.
Un saludo.
|
Alineameniento de Controles...
|
Si usas Pelles C o Visual C, lo puedes hacer directo en el recurso y es mas rapido y seguro...
|
Alineameniento de Controles...
|
Gracias Manuramos, no se me había ocurrido de esa manera, voy hacer la prueba de esa manera.
Saludos.
Carlos Sincuir
|
Alinear Aceleradores en el Menu
|
Saludos a todos:Tengo una duda sobre la alineación de los Aceleradores en los menus, ya que he buscado en el foro como vizualizarlos, pero se ven desalineados, me pregunto si habrá alguna forma de hacer que todos los aceleradores se vean en columna como lo hacen las otras aplicaciones:[url=http://img170.imageshack.us/my.php?image=menudd8.jpg:vyqixctg][img:vyqixctg]http://img170.imageshack.us/img170/2331/menudd8.th.jpg[/img:vyqixctg][/url:vyqixctg]He intentado esto:[code:vyqixctg]#Define TAB Chr(9) // <TABS>
MENUITEM "Productos " ;
+ TAB + "Alt+P" ;
RESOURCE "Prod" ;
ACCELERATOR ACC_ALT, ASC( "P" ) ;
ACTION( Productos() )
SEPARATOR
MENUITEM "Clientes " ;
+ TAB + "Shift+C" ;
ACCELERATOR ACC_SHIFT, ASC( "C" ) ;
RESOURCE "Clien" ;
ACTION( Clientes() )[/code:vyqixctg]
y tambien he probado asignandole espacios de tal manera que la longitud de los textos sean iguales pero tampoco funciona:
[code:vyqixctg]
MENUITEM "Productos ALT+P" ;
RESOURCE "Prod" ;
ACCELERATOR ACC_ALT, ASC( "P" ) ;
ACTION( Productos() )
SEPARATOR
MENUITEM "Clientes Shift+C" ;
ACCELERATOR ACC_SHIFT, ASC( "C" ) ;
RESOURCE "Clien" ;
ACTION( Clientes() )[/code:vyqixctg]Oja ay alguien me pueda hechar una manita con esto. gracias anticipadas..
|
Alinear Aceleradores en el Menu
|
Prueba así MenuItem aoSub[ 14 ] Prompt '&Cambio de Empresa' + Chr( 9 ) + 'Ctrl-F2' Action Seleccionalo() Saludos
|
Alinear Aceleradores en el Menu
|
Horacio:Gracias por responder, volví a retomar el mismo procedimiento, solo que agregue un pequeño truco, que la verdad no pense que funcionara pero lo logre, concistio en agregar espacios en blanco, con lo cual quedo solucionado.Les dejo como quedo, por si alguien mas le sirve:[code:1bofc2pb]MENUITEM "&Archivo"
MENU
MENUITEM '&Almacénes' +SPACE(20)+CHR(9)+'F12' ACCELERATOR 0, VK_F12
SEPARATOR
MENUITEM 'Pr&oveedores'
MENUITEM '&Familias'
MENUITEM '&Productos' +SPACE(15)+CHR(9)+'Ctrl+P' ACCELERATOR ACC_CONTROL, ASC("P")
SEPARATOR
MENUITEM '&Inventario Inicial'
SEPARATOR
MENUITEM '&Clientes' +SPACE(18)+CHR(9)+'Shift+C' ACCELERATOR ACC_SHIFT, ASC("C")
SEPARATOR
MENUITEM '&Usuarios' +SPACE(18)+CHR(9)+'Ctrl+U' ACCELERATOR ACC_CONTROL, ASC("U")
SEPARATOR
MENUITEM '&Salir' +SPACE(25)+CHR(9)+'Alt+F4' ACCELERATOR ACC_ALT, VK_F4
ENDMENU
ENDMENU[/code:1bofc2pb]Es muy raro este procedimiento, pero funciono... <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Saludos..
|
Alinear Say
|
Hola amigos
Como puedo alinear el texto un say verticalmente desde recursos ?
un saludo
|
Alinear Say
|
Ola.
Veja se é isto que vc. tá querendo..
[code=fw:2o21n74n]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Font</span> Ofont3 <span style="color: #0000ff;">Name</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-25</span> NESCAPEMENT <span style="color: #000000;">90</span>*<span style="color: #000000;">10</span><br /><br /><span style="color: #0000ff;">Redefine</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">Var</span> cTexto <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4035</span> <span style="color: #0000ff;">of</span> oPag:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">Font</span> oFont3<br /><br /> </div>[/code:2o21n74n]
Abraços..
|
Alinear celdas en Excel
|
Foreros:
Cómo puedo alienar las celdas en una hoja de Excel usando TOle ?
Saludos
|
Alinear celdas en Excel
|
Armando
¿Para que lado de la celda?
Puedes probar a hacer esto
oHoja:Cells(1, 3 ):NumberFormat := "@"
oHoja:Cells(3, 3 ):Value := HSBC->REFERENCIA
El contenido del campo REFERENCIA es de tipo numérico y en lo hoja excel me lo pega a la izquierda como cualquier texto
Fernando Leal
México, DF
|
Alinear celdas en Excel
|
Hola Armando>
[quote="Armando":3gv7lx7y]Cómo puedo alienar las celdas en una hoja de Excel usando TOle ?[/quote:3gv7lx7y]
Para una celda:
oSheet:Cells( 1, 1 ):Set( "HorizontalAlignment", nAlig )
Para un rango de celdas:
oSheet:Range( A1:A200 ):Set( "HorizontalAlignment", nAlig )
nAlig podría ser:
Derecha: -4152
Izquierda: -4131
Centrado: -4108
Justificado: -4130
Combinar y Centrar: 7
Saludos.
Manuel Mercado
|
Alinear celdas en Excel
|
Manuel y Fer:
Muchas gracias por las respuestas, todo bajo control !.
Un abrazo
|
Alinear títulos de columnas
|
Amigos del foro:
En la clase TReport es posible alinear los títulos de las columnas ?, no los títulos o encabezados del reporte. me explico:
En el siguiente trozo de código:
COLUMN oCol3 TITLE "Cliente","Modelo" DATA "" SIZE 8 RIGHT
Es posible alinear el título "MODELO" a la izquierda dejando el título "CLIENTE" alineado a la derecha ???
Saludos y gracias por sus respuestas, Armando
|
Alinear y formato en ToleAuto
|
Saludos.
Creo un objeto
oREPORTE:=TOleAuto():New("Excel.Application")
oREPORTE:WorkBooks:Add()
oBook:=oREPORTE:Get("ActiveWorkBook")
oSheet:=oREPORTE:Get("ActiveSheet" )
voy formando mi cadena de texto para en su momento con el portapapeles pegar
oClip:=TClipBoard():New()
oClip:Clear()
oClip:SetText(cTxtXls)
oRange:=oSheet:Range(cRangoXls)
oRange:Select()
oSheet:Paste()
oClip:End()
con
oRange:Set("HorizontalAlignment",xlHAlignCenterAcrossSelection) // valor de 7
le indico al rango que lo centre
MI DUDA:
1. que valor debo darle al rango para que la alineación sea a la izquierda y a la derecha?
2. como doy formato de fecha y de numero al rango?
Esto lo tome de la clase TSbrowse 9.0
Gracias.
|
Alinear y formato en ToleAuto
|
Noé,
No se si es seguro lo que buscas, pero encontré esto:
[quote:11cfog5b]xlHAlignCenter -4108
xlHAlignDistributed -4117
xlHAlignJustify -4130
xlHAlignLeft -4131
xlHAlignRight -4152
xlHAlignCenterAcrossSelection 7
xlHAlignFill 5
xlHAlignGeneral 1 [/quote:11cfog5b]
[url:11cfog5b]http://www.office-archive.com/2-excel/b5f82d9d0f21ceb4.htm[/url:11cfog5b]
|
Alinear y formato en ToleAuto
|
Gracias, lo voy a probar.
|
Alinhamento pelo GET
|
Gostaria de colocar os GET em uma posição e os SAY assumindo da direita para esquerda
alinhamento pelo Centro .. que o GET fique alinhado e o say se mova para esquerda se ajustando
Ari
[code=fw:2fxwmt51]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/* Retirei PICTURE do SAY causa conflito com GET<br /> RIGHT do SAY mudei para padrao .T. Alinhamento<br /> TRANSPARENT do SAY mudei para .T.<br /> */</span><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">[</span> <oSay> <label: <span style="color: #000000;">PROMPT</span>> <span style="color: #000000;">]</span> <cText> ; <span style="color: #B900B9;">// SAY</span><br /> <span style="color: #0000ff;">GET</span> <span style="color: #000000;">[</span> <oGet> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <uVar> ; <span style="color: #B900B9;">// GET</span><br /> <span style="color: #000000;">[</span> <pict: <span style="color: #000000;">PICT</span>, PICTURE> <cPict> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <dlg: <span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,<span style="color: #0000ff;">DIALOG</span> > <oWnd> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lCenter: <span style="color: #0000ff;">CENTERED</span>, <span style="color: #0000ff;">CENTER</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lRight: <span style="color: #0000ff;">RIGHT</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lBorder: <span style="color: #000000;">BORDER</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lPixel: <span style="color: #0000ff;">PIXEL</span>, PIXELS > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS > <nClrText> <span style="color: #000000;">[</span>,<nClrBack> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <update: <span style="color: #0000ff;">UPDATE</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lShaded: <span style="color: #000000;">SHADED</span>, SHADOW > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lBox: BOX > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lRaised: <span style="color: #000000;">RAISED</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <adj: <span style="color: #000000;">ADJUST</span>> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lTrans: <span style="color: #000000;">TRANSPARENT</span>><span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <ValidFunc> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">CURSOR</span> <oCursor> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <readonly: <span style="color: #000000;">READONLY</span>, NO MODIFY> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <spin: <span style="color: #000000;">SPINNER</span>> <span style="color: #000000;">[</span><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">UP</span> <SpnUp><span style="color: #000000;">]</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">DOWN</span> <SpnDn><span style="color: #000000;">]</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">MIN</span> <Min><span style="color: #000000;">]</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">MAX</span> <Max><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> CUEBANNER <cCueText> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> => ;<br /> <span style="color: #000000;">[</span> <oGet> := <span style="color: #000000;">]</span> TGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, bSETGET<span style="color: #000000;">(</span><uVar><span style="color: #000000;">)</span>,; <span style="color: #B900B9;">// GET</span><br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>, <nWidth>, <nHeight>, <cPict>, <<span style="color: #000000;">{</span>ValidFunc<span style="color: #000000;">}</span>>,;<br /> <nClrText>, <nClrBack>, <oFont>, <.design.>,;<br /> <oCursor>, .T., <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>,;<br /> <.lCenter.>, <.lRight.>,;<br /> <span style="color: #000000;">[</span>\<span style="color: #000000;">{</span>|nKey, nFlags, Self| <uChange>\<span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <.readonly.>,;<br /> .f., .f., <nHelpId>,;<br /> <.spin.>, <<span style="color: #000000;">{</span>SpnUp<span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span>SpnDn<span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span><span style="color: #0000ff;">Min</span><span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span><span style="color: #0000ff;">Max</span><span style="color: #000000;">}</span>>,,, <<span style="color: #ff0000;">"uVar"</span>>, <span style="color: #000000;">[</span><cCueText><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> ;<br /> <span style="color: #000000;">[</span> ;<oSay> := <span style="color: #000000;">]</span> TSay<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, <<span style="color: #000000;">{</span>cText<span style="color: #000000;">}</span>>,; <span style="color: #B900B9;">// SAY</span><br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>,, <oFont>, <.lCenter.>, .T., <.lBorder.>,;<br /> .T., <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;<br /> <.design.>, <.<span style="color: #0000ff;">update</span>.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.>, .T. <span style="color: #000000;">)</span> ;<br /> <br /><br /><span style="color: #00C800;">function</span> testeGET<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oSay<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, oGet<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, nVal := <span style="color: #000000;">0.00</span><br /> <span style="color: #00C800;">local</span> cNome := space<span style="color: #000000;">(</span><span style="color: #000000;">40</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cEnd := space<span style="color: #000000;">(</span><span style="color: #000000;">20</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">5</span><br /> <span style="color: #00C800;">local</span> nCol := <span style="color: #000000;">3</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Teste comando SAY e GET"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">480</span>,<span style="color: #000000;">480</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Valor:"</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> nVal <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@E 999,999.99"</span> <span style="color: #0000ff;">UPDATE</span> <br /> nRow+=<span style="color: #000000;">14</span><br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Nome:"</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNome <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> <br /> nRow+=<span style="color: #000000;">14</span><br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Endereço:"</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cEnd <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2fxwmt51]
|
Alinhamento pelo GET
|
este é o exemplo
[code=fw:1j03jcg3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/* Retirei PICTURE do SAY causa conflito com GET<br /> RIGHT do SAY mudei para padrao .T. Alinhamento<br /> TRANSPARENT do SAY mudei para .T.<br /> */</span><br />#xcommand @ <nRow>, <nCol> <span style="color: #0000ff;">SAY</span> <span style="color: #000000;">[</span> <oSay> <label: <span style="color: #000000;">PROMPT</span>> <span style="color: #000000;">]</span> <cText> ; <span style="color: #B900B9;">// SAY</span><br /> <span style="color: #0000ff;">GET</span> <span style="color: #000000;">[</span> <oGet> <span style="color: #0000ff;">VAR</span> <span style="color: #000000;">]</span> <uVar> ; <span style="color: #B900B9;">// GET</span><br /> <span style="color: #000000;">[</span> <pict: <span style="color: #000000;">PICT</span>, PICTURE> <cPict> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <dlg: <span style="color: #0000ff;">OF</span>,<span style="color: #0000ff;">WINDOW</span>,<span style="color: #0000ff;">DIALOG</span> > <oWnd> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lCenter: <span style="color: #0000ff;">CENTERED</span>, <span style="color: #0000ff;">CENTER</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lRight: <span style="color: #0000ff;">RIGHT</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lBorder: <span style="color: #000000;">BORDER</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lPixel: <span style="color: #0000ff;">PIXEL</span>, PIXELS > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <color: <span style="color: #0000ff;">COLOR</span>,COLORS > <nClrText> <span style="color: #000000;">[</span>,<nClrBack> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">SIZE</span> <nWidth>, <nHeight> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <design: <span style="color: #000000;">DESIGN</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <update: <span style="color: #0000ff;">UPDATE</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get e say</span><br /> <span style="color: #000000;">[</span> <lShaded: <span style="color: #000000;">SHADED</span>, SHADOW > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lBox: BOX > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lRaised: <span style="color: #000000;">RAISED</span> > <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <adj: <span style="color: #000000;">ADJUST</span>> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <lTrans: <span style="color: #000000;">TRANSPARENT</span>><span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// say</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">VALID</span> <ValidFunc> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">CURSOR</span> <oCursor> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">MESSAGE</span> <cMsg> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">WHEN</span> <uWhen> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <uChange> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <readonly: <span style="color: #000000;">READONLY</span>, NO MODIFY> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <help:<span style="color: #000000;">HELPID</span>, <span style="color: #0000ff;">HELP</span> ID> <nHelpId> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> <spin: <span style="color: #000000;">SPINNER</span>> <span style="color: #000000;">[</span><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">UP</span> <SpnUp><span style="color: #000000;">]</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">DOWN</span> <SpnDn><span style="color: #000000;">]</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">MIN</span> <Min><span style="color: #000000;">]</span> <span style="color: #000000;">[</span><span style="color: #0000ff;">MAX</span> <Max><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> <span style="color: #000000;">[</span> CUEBANNER <cCueText> <span style="color: #000000;">]</span> ; <span style="color: #B900B9;">// get</span><br /> => ;<br /> <span style="color: #000000;">[</span> <oSay> := <span style="color: #000000;">]</span> TSay<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <nCol>, <<span style="color: #000000;">{</span>cText<span style="color: #000000;">}</span>>,; <span style="color: #B900B9;">// SAY</span><br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>,, <oFont>, <.lCenter.>, <.lRight.>, <.lBorder.>,;<br /> .T., <nClrText>, <nClrBack>, <nWidth>, <nHeight>,;<br /> <.design.>, <.<span style="color: #0000ff;">update</span>.>, <.lShaded.>, <.lBox.>, <.lRaised.>, <.adj.>, .T. <span style="color: #000000;">)</span> ;<br /> <span style="color: #000000;">[</span> ;<oGet> := <span style="color: #000000;">]</span> TGet<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nRow>, <oSay>:<span style="color: #000000;">nRight</span><span style="color: #000000;">+3</span>, bSETGET<span style="color: #000000;">(</span><uVar><span style="color: #000000;">)</span>,; <span style="color: #B900B9;">// GET</span><br /> <span style="color: #000000;">[</span><oWnd><span style="color: #000000;">]</span>, <nWidth>, <nHeight>, <cPict>, <<span style="color: #000000;">{</span>ValidFunc<span style="color: #000000;">}</span>>,;<br /> <nClrText>, <nClrBack>, <oFont>, <.design.>,;<br /> <oCursor>, .T., <cMsg>, <.<span style="color: #0000ff;">update</span>.>, <<span style="color: #000000;">{</span>uWhen<span style="color: #000000;">}</span>>,;<br /> <.lCenter.>, <.lRight.>,;<br /> <span style="color: #000000;">[</span>\<span style="color: #000000;">{</span>|nKey, nFlags, Self| <uChange>\<span style="color: #000000;">}</span><span style="color: #000000;">]</span>, <.readonly.>,;<br /> .f., .f., <nHelpId>,;<br /> <.spin.>, <<span style="color: #000000;">{</span>SpnUp<span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span>SpnDn<span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span><span style="color: #0000ff;">Min</span><span style="color: #000000;">}</span>>, <<span style="color: #000000;">{</span><span style="color: #0000ff;">Max</span><span style="color: #000000;">}</span>>,,, <<span style="color: #ff0000;">"uVar"</span>>, <span style="color: #000000;">[</span><cCueText><span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <br /> <br /> <br /><br /><span style="color: #00C800;">function</span> testeGET<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oSay<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, oGet<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, nVal := <span style="color: #000000;">0.00</span><br /> <span style="color: #00C800;">local</span> cNome := space<span style="color: #000000;">(</span><span style="color: #000000;">40</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cEnd := space<span style="color: #000000;">(</span><span style="color: #000000;">20</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">5</span><br /> <span style="color: #00C800;">local</span> nCol := <span style="color: #000000;">3</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Teste comando SAY e GET"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">480</span>,<span style="color: #000000;">480</span> <span style="color: #0000ff;">PIXEL</span><br /> <br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Valor:"</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> nVal <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@E 999,999.99"</span> <span style="color: #0000ff;">UPDATE</span> <br /> nRow+=<span style="color: #000000;">14</span><br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Nome:"</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNome <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> <br /> nRow+=<span style="color: #000000;">14</span><br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Endereço:"</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cEnd <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> <br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span> </div>[/code:1j03jcg3]
|
Alinhamento pelo GET
|
[code=fw:zrn2bd3k]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> testeGET<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oSay<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, oGet<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>, nVal := <span style="color: #000000;">0.00</span><br /> <span style="color: #00C800;">local</span> cNome := space<span style="color: #000000;">(</span><span style="color: #000000;">40</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cEnd := space<span style="color: #000000;">(</span><span style="color: #000000;">20</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">50</span> <span style="color: #B900B9;">//5 // usando PIXEL</span><br /> <span style="color: #00C800;">local</span> nCol := <span style="color: #000000;">5</span><br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Teste comando SAY e GET com PIXEL"</span> ;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">480</span>,<span style="color: #000000;">480</span> <span style="color: #0000ff;">PIXEL</span> COLORS CLR_BLACK, CLR_WHITE<br /> <br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Valor:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RIGHT</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span><br /><br /> <span style="color: #B900B9;">// Incrementa a linha e a coluna para ajustar</span><br /> nRow := nRow + .<span style="color: #000000;">25</span><br /> nCol := nCol + <span style="color: #000000;">39</span><br /><br /> @ nRow, nCol <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> nVal <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@E 999,999.99"</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> <span style="color: #B900B9;">// Incrementa/decrementa a linha e a coluna para ajustar</span><br /> nRow := nRow + <span style="color: #000000;">30</span><br /> nCol := nCol - <span style="color: #000000;">44</span><br /><br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Nome:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RIGHT</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span><br /><br /> <span style="color: #B900B9;">// Incrementa a coluna para ajustar</span><br /> nCol := nCol + <span style="color: #000000;">44</span><br /><br /> @ nRow, nCol <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cNome <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #B900B9;">// esquerda(LEFT)</span><br /><br /> <span style="color: #B900B9;">// Incrementa/decrementa a linha e a coluna para ajustar</span><br /> nRow := nRow + <span style="color: #000000;">30</span><br /> nCol := nCol - <span style="color: #000000;">67</span><br /><br /> @ nRow, nCol <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Endereço:"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RIGHT</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span><br /><br /> <span style="color: #B900B9;">// Incrementa a coluna para ajustar</span><br /> nCol := nCol + <span style="color: #000000;">68</span><br /><br /> @ nRow, nCol <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> cEnd <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #B900B9;">// esquerda(LEFT)</span><br /><br /> <span style="color: #B900B9;">// buttons(botoes) Idem, calcule as coordenadas... abs.</span><br /><br /> <br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:zrn2bd3k]
|
Alinhamento pelo GET
|
Obrigado !
Ari
|
All DrDobbs Journal C/C++ user magazines since 1988 !!!
|
[url:2u1j641q]http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/start.htm[/url:2u1j641q]
|
All Var-Def's switching Outl2003Child<>Office2007Bar
|
Hello from Germany,
During my work on the new DB-Tool,
i needed var-informations in the Office2007-Bar
from a Outlook-Child after changes.
Here are all Values you need :
RECEIVE Values from a Outlook2003-Child
in a Office2007-ButtonBar
---------------------------------------------------------
GET = oGet:Value(), oGet:Refresh()
SAY = oSay:Varget(), oSay:Refresh()
RADIO = oRadio:nOption, oRadio:Refresh()
CHECKBOX = oCheck:Varget(), oCheck::Refresh()
SEND new Values from Office2007-ButtonBar
to a Outlook2003-Child
-----------------------------------------------------
RADIO = aScope:nOption(2), aScope:Refresh()
for .T.
CHECK = oCheck:Check(), oCheck:Refresh()
for .F.
CHECK = oCheck:UnCheck(), oCheck:Refresh()
GET = oGet:VarPut("NewValue"), oGet:Refresh()
SAY = oSay:VarPut("NewValue"), oSay:Refresh()
Uwe
|
All Var-Def's switching Outl2003Child<>Office2007Bar
|
oGet:value() just calls oGet:VarGet() so you can use either one.
METHOD Value() INLINE ::VarGet()
VarGet() may be easier to remember since SAYs, GETs, Comoboxes, and RadioMenus all have a VarGet() method. This is polymorphism (same names in different objects) which is a very important feature of OOP. This allows you to do thing like:
uValue:= oDlg:aControls[i]:varGet()
Where aControls is an array of control objects.
Regards,
James
|
All resources consumed in W8.1
|
Hello FiveWinners.
I have an application developed in xHarbour 1.23 and FW13.08, SQLRDD, which prints about 7000 pages in PDF using Image2PDF; Windows Vista and W7 on the same application runs without additional memory consumption, however, run the same application in W8.1 and consume all memory resources pc memory which is 8MB.
It is very difficult to show the code ...
But if anyone has advice or experience of how to release resources and prevent the application in W8.1, freezing due to lack of resources, we'll be very grateful.
regards
|
All resources consumed in W8.1
|
I assume you meant 8GB not 8MB.
I don't know the answer to your question, but why would anyone want a 7000 page document? Does somebody actually read it?
I have always questioned clients that wanted what I call a "data dump." When questioned they always can narrow it down to something like they wanted to know the 25 items that are selling the best (or worst), etc.
Also, users can always look up what they need right in the program rather than printing anything. Soon after they print something they often loose track of it anyway.
Still it would be nice to know why the memory is not being released.
Regards,
James
|
All resources consumed in W8.1
|
Gustavo,
Could you provide a small and self contained example to run it here ?
|
All resources consumed in W8.1
|
Hi Antonio
Hi James
Thanks for responding.
The problem of resource consumption in W8.1 was due to a MySQL table to open and not closed, ie to be opened 7500 times, interestingly this same process in W. Vista, NO has the same problem.
Case closed.
I must confess that once corrected this bug, the application performs very well and very fast in W8.1
thanks for the support.
regards
|
All resources consumed in W8.1
|
Thanks for reporting your solution.
James
|
All resources consumed in W8.1
|
Very good! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Thanks for sharing it
|
All sort of sounds / Todo tipo de sonidos
|
[url:3e3nd82i]http://www.freesound.org[/url:3e3nd82i]
|
Alle gestorben ??
|
Oder arbeitet noch einer mit FW
|
Alle gestorben ??
|
ja ich, zumindest mit FWH und xHarbour.
aber ansonsten ist hier ziemlich wenig los in der Gruppe <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Gruß und Guten Rutsch
Stefan
|
Allow a write in Get in a Combobox
|
To All
Is there a way to be able to manually over-ride a Combobox to allow a Write in Get ? .. I have a login screen and I am populating a combobox array with Employee UserId's ..
I have a back-door user named 'Admin' and I do not want to populate the UserId array with that login .. and would like to be able to over-ride the combobox at runtime to accept a write in get ... I can not think of a way to do that ...
Any Ideas ?
Thanks
Rick Lipkin
[img:3ci11m0i]http://i65.tinypic.com/245ge89.jpg[/img:3ci11m0i]
|
Allow a write in Get in a Combobox
|
Give style CBS_DROPDOWN to the combobox.
EMG
|
Allow a write in Get in a Combobox
|
Enrico
Worked Great ... Many Thanks!
Rick Lipkin
|
Allow a write in Get in a Combobox
|
Algun sample pero de busqueda secuencial pero con DBCOMBO.? asi como en este combobox que cuando vaya escribiendo, ubique la coincidencia, saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Some sample but sequential search but with DBCOMBO? as in this combobox that when you write, locate the match, greetings ... thanks ... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
|
Allow a write in Get in a Combobox
|
Jose,
You must set oDB:incSearch := .t.
The default is .f.
|
Allow a write in Get in a Combobox
|
[quote="James Bott":10cyshb4]Jose,
You must set oDB:incSearch := .t.
The default is .f.[/quote:10cyshb4]
James, gracias por tu respuesta, pero parece esa data no pertenece a DBCOMBO, no confundir con COMBOBOX, la use como me dijistes y obtengo el siguiente error...alguna idea.? saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
James, thanks for your reply, but it seems that data does not belong to DBCOMBO, do not confuse with COMBOBOX, use it as you told me and I get the following error ... any ideas.? greetings thank you... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
[code=fw:10cyshb4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> DBCOMBO aGet<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4020</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ;<br /> <span style="color: #0000ff;">ITEMS</span> aProvee1 ;<br /> LIST aProvee2<br /> aGet<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">incSearch</span> := .t.<br /><br /><span style="color: #B900B9;">// aGet[2]:lIncSearch := .t. // TRY WITH THIS AND DOES NOT ERROR BUT DOES NOT GIVE SEQUENTIAL SEARCH .. - INTENTE CON ESTE Y NO DA ERROR PERO NO DA LA BUSQUEDA SECUENCIAL..</span><br /><br /> </div>[/code:10cyshb4]
Time from start: 0 hours 5 mins 54 secs
Error occurred at: 04/09/2017, 19:33:29
Error description: Error BASE/1005 Message not found: TDBCOMBO:_INCSEARCH
Args:
[ 1] = O TDBCOMBO
Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TDBCOMBO:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TDBCOMBO:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TDBCOMBO:_INCSEARCH( 0 )
Called from: ma_compras.prg => DAT_LIBCOM( 132 )
|
Allow a write in Get in a Combobox
|
Jose,
Sorry, Jose, yes it should have been oDBC:lIncSearch.
I have not use a DBCombo in some time. I wrote the original incremental search code for the TDBCombo class but it was since moved into the parent class, TCombobox. I have in my notes that moving the code to TComobox broke it for DBCombo but I don't know if that was ever fixed. It is late now, but I will try to look at it tomorrow.
James
|
Allow a write in Get in a Combobox
|
[quote="James Bott":39y64gc7]Jose,
Sorry, Jose, yes it should have been oDBC:lIncSearch.
I have not use a DBCombo in some time. I wrote the original incremental search code for the TDBCombo class but it was since moved into the parent class, TCombobox. I have in my notes that moving the code to TComobox broke it for DBCombo but I don't know if that was ever fixed. It is late now, but I will try to look at it tomorrow.
James[/quote:39y64gc7]
James, no problem, thanks same for replying...greetings...thank you... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
|
Allow a write in Get in a Combobox
|
Mr Jose,
Incremental search works by default in DbCombo. No additional settings are necessary.
This is a working sample
[code=fw:11fx4s9q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> field CODE,<span style="color: #0000ff;">NAME</span><br /> <span style="color: #00C800;">local</span> oDlg, oCbx<br /> <span style="color: #00C800;">local</span> cCode<br /><br /> USE STATES<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> CODE TAG CODE<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">NAME</span> TAG <span style="color: #0000ff;">NAME</span><br /> SET ORDER <span style="color: #0000ff;">TO</span> TAG <span style="color: #0000ff;">NAME</span><br /> GO TOP<br /> cCode := STATES->CODE<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br /> @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> DBCOMBO oCbx <span style="color: #0000ff;">VAR</span> ccODE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"STATES"</span> ;<br /> ITEMFIELD <span style="color: #ff0000;">"CODE"</span> ;<br /> LISTFIELD <span style="color: #ff0000;">"NAME"</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:11fx4s9q]
Note: Though the documentation at the top of the source code of the dbcombo.prg says that the list needs to ordered, incremental search works even with unordered lists.
|
Allow a write in Get in a Combobox
|
Mr James
[quote:663mfhce]
but it was since moved into the parent class, TCombobox. I have in my notes that moving the code to TComobox broke it for DBCombo but I don't know if that was ever fixed.
[/quote:663mfhce]
Incremental search is implemented in KeyChar() method. It is the same original method I see in all versions (from 12.04). So, there is no movement of the code or break of code. You may verify the source code of FWH you are using.
|
Allow a write in Get in a Combobox
|
[quote="nageswaragunupudi":1707fv73]Mr Jose,
Incremental search works by default in DbCombo. No additional settings are necessary.
This is a working sample
[code=fw:1707fv73]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> field CODE,<span style="color: #0000ff;">NAME</span><br /> <span style="color: #00C800;">local</span> oDlg, oCbx<br /> <span style="color: #00C800;">local</span> cCode<br /><br /> USE STATES<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> CODE TAG CODE<br /> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">NAME</span> TAG <span style="color: #0000ff;">NAME</span><br /> SET ORDER <span style="color: #0000ff;">TO</span> TAG <span style="color: #0000ff;">NAME</span><br /> GO TOP<br /> cCode := STATES->CODE<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br /> @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> DBCOMBO oCbx <span style="color: #0000ff;">VAR</span> ccODE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"STATES"</span> ;<br /> ITEMFIELD <span style="color: #ff0000;">"CODE"</span> ;<br /> LISTFIELD <span style="color: #ff0000;">"NAME"</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1707fv73]
Note: Though the documentation at the top of the source code of the dbcombo.prg says that the list needs to ordered, incremental search works even with unordered lists.[/quote:1707fv73]
Mr.NAGE, in your sample it works but only with the first 2 letters of the word to search, I imagine that it is the field value in the DBF, in my case I use ARRAY to feed the DBCOMBO from a QUERY with mysql, which change dynamically ... with different created querys, and in resource mode defined as DROPDOWN and the sequential search does not work ... I am doing wrong or how should I do it? greetings...thank you... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
DEFINICION DEL DBCOMBO
[code=fw:1707fv73]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">REDEFINE</span> DBCOMBO aGet<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">VAR</span> aVar<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> ; <span style="color: #B900B9;">// OPCIONES BUSQUEDA</span><br /> <span style="color: #0000ff;">ITEMS</span> aBuscar1 ;<br /> LIST aBuscar2 ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> IIF<span style="color: #000000;">(</span> aVar<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> == <span style="color: #ff0000;">"3"</span> .or. aVar<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> == <span style="color: #ff0000;">"4"</span> ,; <span style="color: #B900B9;">// SELECTORES</span><br /> <span style="color: #000000;">(</span> sel_pax<span style="color: #000000;">(</span> aVar, aGet <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> , aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">Disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> ,;<br /> refresget<span style="color: #000000;">(</span> aGet <span style="color: #000000;">)</span>, aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</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><br /> </div>[/code:1707fv73]
CAMBIO DINAMICO DEL CONTENIDO DEL DBCOMBO
[code=fw:1707fv73]<div class="fw" id="{CB}" style="font-family: monospace;"><br />PROCEDURE sel_pax<span style="color: #000000;">(</span> aVar, aGet <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> aNuevo1 := <span style="color: #000000;">{</span><span style="color: #000000;">}</span>, aNuevo2 := <span style="color: #000000;">{</span><span style="color: #000000;">}</span>, cSelec, aArray0<br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> aVar<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> == <span style="color: #ff0000;">"3"</span> <span style="color: #B900B9;">// ESTADO CLI.</span><br /> cSelec := <span style="color: #ff0000;">"- Seleccione Estado -"</span><br /><br /> aArray0 := array_tablas<span style="color: #000000;">(</span> <span style="color: #ff0000;">"id_estatus, estatus"</span> ,;<br /> <span style="color: #ff0000;">"tbl_eststus"</span>, <span style="color: #ff0000;">"id_estatus"</span> <span style="color: #000000;">)</span><br /><br /> aNuevo1 := aArray0<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>; aNuevo2 := aArray0<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /><br /> <span style="color: #00C800;">CASE</span> aVar<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span> == <span style="color: #ff0000;">"4"</span> <span style="color: #B900B9;">// VENDEDOR</span><br /> cSelec := <span style="color: #ff0000;">"- Seleccione Vendedor -"</span><br /><br /> aArray0 := array_tablas2<span style="color: #000000;">(</span> <span style="color: #000000;">{</span><span style="color: #ff0000;">"id_usuario"</span>, <span style="color: #ff0000;">"apellidos"</span>, <span style="color: #ff0000;">"nombres"</span><span style="color: #000000;">}</span> ,;<br /> <span style="color: #ff0000;">"tbl_usuarios"</span> <span style="color: #000000;">)</span><br /><br /> aNuevo1 := aArray0<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>; aNuevo2 := aArray0<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /> END <span style="color: #00C800;">CASE</span><br /><br /> AAdd<span style="color: #000000;">(</span> aNuevo1, <span style="color: #ff0000;">"0"</span> <span style="color: #000000;">)</span>; AAdd<span style="color: #000000;">(</span> aNuevo2, cSelec <span style="color: #000000;">)</span><br /><br /> aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">aItems</span> := aNuevo1<br /> aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">aList</span> := aNuevo2<br /> aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">SetItems</span><span style="color: #000000;">(</span> aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">aItems</span>, aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #000000;">aList</span>, .t. <span style="color: #000000;">)</span><br /><br /> aVar<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span> := <span style="color: #ff0000;">"0"</span><br /><br /> aGet<span style="color: #000000;">[</span><span style="color: #000000;">5</span><span style="color: #000000;">]</span>:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">RETURN</span><br /> </div>[/code:1707fv73]
|
Allow a write in Get in a Combobox
|
[quote:35uguyx1]in your sample it works but only with the first 2 letters of the word to search,[/quote:35uguyx1]
Please test again. It works for more than 2 characters also, provided it finds a match.
I shall soon give you an example of dynamically changing the items
|
Allow for formatted raw HTML to be included in DOCX
|
Hello,
in case someone needs formatted raw HTML to be included in DOCX.
Best regards,
Otto
Steps
Docx- file rename to Zip and unzip
Copy your MHT file to the word directory of the zip
Search for placeholder in document.xml and replace with
<w:altChunk r:id="htmlDoc" />
word/document.xml - main XML document containing reference to imported file ("w:altChunk" element)
altChunk (Anchor for Imported External Content)
This element specifies a location within a document for the insertion of the contents of a specified file containing external content to be imported into the main WordprocessingML document.
The altChunk element specifies that the external content targeted by the relationship with an ID of altChunk1 must be imported at the beginning of the document.
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" Target="/word/htmlDoc.html" Id="htmlDoc" />
The corresponding relationship part item shows that the file to be imported is located next to the main document and is named import.htm. end example]
[Content_Types].xml - contains declaration of "altChunk" content type (mime type - "text/html"; mime type for MHTML is "message/rfc822"):
<Override PartName="/word/htmlDoc.html" ContentType="text/html"/>
[img:os3plcps]http://www.atzwanger-software.com/fw/htmlandword.jpg[/img:os3plcps]
|
Allow for formatted raw HTML to be included in DOCX
|
Dear Otto/Dad <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
this sounds very interesting...please be so kind as to share an example before and after of the document.xml?
by "placeholder" you mean a spot, that you chose, where the raw html should be put?
i am very interested in this...also i want to check what happens to the format...a client uses black background for his docx...now i want to see if I can leave this info blank in the mht so that it get the background from the docx...
kind regards
ruth
|
Allow for formatted raw HTML to be included in DOCX
|
Dear Otto,
I admire your energy and passion <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
a big hug
|
Alltrim() help
|
Hi guys,
I have this line code:
fwrite(marq,'<xLgr>'+Alltrim(oArqCli:ENDERECO)+'</xLgr>'+mfim)
Just fine but in some cases a blank caracter apears in xml (end of oArqCli:ENDERECO field) like this:
<xLgr>RUA 2 QD 13 LT 15 </xLgr>
Shouldn't Alltrim() remove whites at the beginning and end?
Thanks!
|
Alltrim() help
|
Yes, AllTrim is used for remove blank spaces at end and at begining
Please, put this code
[code=fw:2tboxubx]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> Alltrim<span style="color: #000000;">(</span>oArqCli:<span style="color: #000000;">ENDERECO</span><span style="color: #000000;">)</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #000000;">32</span><br />? <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> Alltrim<span style="color: #000000;">(</span>oArqCli:<span style="color: #000000;">ENDERECO</span><span style="color: #000000;">)</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:2tboxubx]
|
Alltrim() help
|
[quote="cnavarro":athqrvj1]Yes, AllTrim is used for remove blank spaces at end and at begining
Please, put this code
[code=fw:athqrvj1]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> Alltrim<span style="color: #000000;">(</span>oArqCli:<span style="color: #000000;">ENDERECO</span><span style="color: #000000;">)</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #000000;">32</span><br />? <span style="color: #0000ff;">Asc</span><span style="color: #000000;">(</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> Alltrim<span style="color: #000000;">(</span>oArqCli:<span style="color: #000000;">ENDERECO</span><span style="color: #000000;">)</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:athqrvj1][/quote:athqrvj1]
Hi cnavarro,
The result:
.F.
160
In asc table 160 = á
How this is possible? I don't see á but a space. How I can avoid this?
Thanks in advance.
|
Alltrim() help
|
Use
[code=fw:1i821hxe]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cStr := StrTran<span style="color: #000000;">(</span> cStr, Chr<span style="color: #000000;">(</span> <span style="color: #000000;">160</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">" "</span> <span style="color: #000000;">)</span><br /> </div>[/code:1i821hxe]
<!-- m --><a class="postlink" href="https://stackoverflow.com/questions/27925182/sql-server-how-to-replace-whitespacesnbsp-ascii-in-a-string-with-numbers">https://stackoverflow.com/questions/279 ... th-numbers</a><!-- m -->
|
Alltrim() help
|
[url:2l7ss1tf]http://fivewin.com.br/index.php?/topic/28336-pequisa-aven%C3%A7ada/[/url:2l7ss1tf]
[code=fw:2l7ss1tf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">// Endereco/Calle/Direccion</span><br /> cDocXml = TIRA_ACENTUACAO<span style="color: #000000;">(</span> oArqCli:<span style="color: #000000;">ENDERECO</span> <span style="color: #000000;">)</span><br /><br /> ? cDocXml<br /><br /><span style="color: #00C800;">FUNCTION</span> TIRA_ACENTUACAO<span style="color: #000000;">(</span> cStr <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> cStrNew := <span style="color: #ff0000;">""</span>, nX<br /><br /> cAcentos := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"‡"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"—"</span>, <span style="color: #ff0000;">"ƒ"</span>, <span style="color: #ff0000;">"Æ"</span>, <span style="color: #ff0000;">"Ç"</span>, <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"µ"</span>, <span style="color: #ff0000;">"…"</span>, <span style="color: #ff0000;">"·"</span>, <span style="color: #ff0000;">"‚"</span>, <span style="color: #ff0000;">"É"</span>, <span style="color: #ff0000;">"ê"</span>, <span style="color: #ff0000;">"ˆ"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"Ò"</span>, <span style="color: #ff0000;">"í"</span>, <span style="color: #ff0000;">"Í"</span>, <span style="color: #ff0000;">"ó"</span>, <span style="color: #ff0000;">"¢"</span>, <span style="color: #ff0000;">"à"</span>, <span style="color: #ff0000;">"ä"</span>, <span style="color: #ff0000;">"å"</span>, <span style="color: #ff0000;">"“"</span>, <span style="color: #ff0000;">"â"</span>, <span style="color: #ff0000;">"ú"</span>, <span style="color: #ff0000;">"é"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"š"</span>, <span style="color: #ff0000;">"ç"</span>, <span style="color: #ff0000;">"€"</span>, <span style="color: #ff0000;">"ã"</span>, <span style="color: #ff0000;">"Ã"</span>, <span style="color: #ff0000;">"á"</span>, <span style="color: #ff0000;">"Á"</span>, <span style="color: #ff0000;">"à"</span>, <span style="color: #ff0000;">"À"</span>, <span style="color: #ff0000;">"é"</span>, <span style="color: #ff0000;">"É"</span>, <span style="color: #ff0000;">"ê"</span>, <span style="color: #ff0000;">"Ê"</span>, <span style="color: #ff0000;">"í"</span>, <span style="color: #ff0000;">"Í"</span>, <span style="color: #ff0000;">"ó"</span>, <span style="color: #ff0000;">"Ó"</span>, <span style="color: #ff0000;">"õ"</span>, <span style="color: #ff0000;">"Õ"</span>, <span style="color: #ff0000;">"ô"</span>, <span style="color: #ff0000;">"Ô"</span>, <span style="color: #ff0000;">"ú"</span>, <span style="color: #ff0000;">"Ú"</span>, <span style="color: #ff0000;">"ü"</span>, <span style="color: #ff0000;">"Ü"</span>, <span style="color: #ff0000;">"ç"</span>, <span style="color: #ff0000;">"ù"</span>, <span style="color: #ff0000;">"AAO"</span>, <span style="color: #ff0000;">"§"</span>, <span style="color: #ff0000;">"¦"</span>, <span style="color: #ff0000;">"º"</span>, <span style="color: #ff0000;">"ª"</span>, <span style="color: #ff0000;">"€"</span>, <span style="color: #ff0000;">"‡"</span>, <span style="color: #ff0000;">"Ç"</span>, <span style="color: #ff0000;">"ç"</span>, <span style="color: #ff0000;">"'"</span>, <span style="color: #ff0000;">"`"</span>, <span style="color: #ff0000;">"ø"</span>, <span style="color: #ff0000;">"¡"</span>, <span style="color: #ff0000;">"Þ"</span>, <span style="color: #ff0000;">"×"</span>, <span style="color: #ff0000;">"Ø"</span>, <span style="color: #ff0000;">"ÿ"</span>, <span style="color: #ff0000;">"Ö"</span>, CHR<span style="color: #000000;">(</span><span style="color: #000000;">160</span><span style="color: #000000;">)</span>, CHR<span style="color: #000000;">(</span><span style="color: #000000;">239</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> cLetras := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"AAO"</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">""</span> , <span style="color: #ff0000;">""</span> , <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">FOR</span> nX := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> cAcentos <span style="color: #000000;">)</span><br /><br /> cStrNew := StrTran<span style="color: #000000;">(</span> cStr, cAcentos<span style="color: #000000;">[</span>nX<span style="color: #000000;">]</span>, cLetras<span style="color: #000000;">[</span>nX<span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /> cStr := cStrNew<br /><br /> <span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> cStrNew <span style="color: #000000;">)</span><br /> </div>[/code:2l7ss1tf]
|
Alltrim() help
|
[quote="karinha":3gnb75ja][url:3gnb75ja]http://fivewin.com.br/index.php?/topic/28336-pequisa-aven%C3%A7ada/[/url:3gnb75ja]
[code=fw:3gnb75ja]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #B900B9;">// Endereco/Calle/Direccion</span><br /> cDocXml = TIRA_ACENTUACAO<span style="color: #000000;">(</span> oArqCli:<span style="color: #000000;">ENDERECO</span> <span style="color: #000000;">)</span><br /><br /> ? cDocXml<br /><br /><span style="color: #00C800;">FUNCTION</span> TIRA_ACENTUACAO<span style="color: #000000;">(</span> cStr <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> cStrNew := <span style="color: #ff0000;">""</span>, nX<br /><br /> cAcentos := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"‡"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"—"</span>, <span style="color: #ff0000;">"ƒ"</span>, <span style="color: #ff0000;">"Æ"</span>, <span style="color: #ff0000;">"Ç"</span>, <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"µ"</span>, <span style="color: #ff0000;">"…"</span>, <span style="color: #ff0000;">"·"</span>, <span style="color: #ff0000;">"‚"</span>, <span style="color: #ff0000;">"É"</span>, <span style="color: #ff0000;">"ê"</span>, <span style="color: #ff0000;">"ˆ"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"Ò"</span>, <span style="color: #ff0000;">"í"</span>, <span style="color: #ff0000;">"Í"</span>, <span style="color: #ff0000;">"ó"</span>, <span style="color: #ff0000;">"¢"</span>, <span style="color: #ff0000;">"à"</span>, <span style="color: #ff0000;">"ä"</span>, <span style="color: #ff0000;">"å"</span>, <span style="color: #ff0000;">"“"</span>, <span style="color: #ff0000;">"â"</span>, <span style="color: #ff0000;">"ú"</span>, <span style="color: #ff0000;">"é"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"š"</span>, <span style="color: #ff0000;">"ç"</span>, <span style="color: #ff0000;">"€"</span>, <span style="color: #ff0000;">"ã"</span>, <span style="color: #ff0000;">"Ã"</span>, <span style="color: #ff0000;">"á"</span>, <span style="color: #ff0000;">"Á"</span>, <span style="color: #ff0000;">"à"</span>, <span style="color: #ff0000;">"À"</span>, <span style="color: #ff0000;">"é"</span>, <span style="color: #ff0000;">"É"</span>, <span style="color: #ff0000;">"ê"</span>, <span style="color: #ff0000;">"Ê"</span>, <span style="color: #ff0000;">"í"</span>, <span style="color: #ff0000;">"Í"</span>, <span style="color: #ff0000;">"ó"</span>, <span style="color: #ff0000;">"Ó"</span>, <span style="color: #ff0000;">"õ"</span>, <span style="color: #ff0000;">"Õ"</span>, <span style="color: #ff0000;">"ô"</span>, <span style="color: #ff0000;">"Ô"</span>, <span style="color: #ff0000;">"ú"</span>, <span style="color: #ff0000;">"Ú"</span>, <span style="color: #ff0000;">"ü"</span>, <span style="color: #ff0000;">"Ü"</span>, <span style="color: #ff0000;">"ç"</span>, <span style="color: #ff0000;">"ù"</span>, <span style="color: #ff0000;">"AAO"</span>, <span style="color: #ff0000;">"§"</span>, <span style="color: #ff0000;">"¦"</span>, <span style="color: #ff0000;">"º"</span>, <span style="color: #ff0000;">"ª"</span>, <span style="color: #ff0000;">"€"</span>, <span style="color: #ff0000;">"‡"</span>, <span style="color: #ff0000;">"Ç"</span>, <span style="color: #ff0000;">"ç"</span>, <span style="color: #ff0000;">"'"</span>, <span style="color: #ff0000;">"`"</span>, <span style="color: #ff0000;">"ø"</span>, <span style="color: #ff0000;">"¡"</span>, <span style="color: #ff0000;">"Þ"</span>, <span style="color: #ff0000;">"×"</span>, <span style="color: #ff0000;">"Ø"</span>, <span style="color: #ff0000;">"ÿ"</span>, <span style="color: #ff0000;">"Ö"</span>, CHR<span style="color: #000000;">(</span><span style="color: #000000;">160</span><span style="color: #000000;">)</span>, CHR<span style="color: #000000;">(</span><span style="color: #000000;">239</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> cLetras := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"E"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"O"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"U"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">" "</span>, <span style="color: #ff0000;">"AAO"</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">""</span> , <span style="color: #ff0000;">""</span> , <span style="color: #ff0000;">"."</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"I"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">FOR</span> nX := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">(</span> cAcentos <span style="color: #000000;">)</span><br /><br /> cStrNew := StrTran<span style="color: #000000;">(</span> cStr, cAcentos<span style="color: #000000;">[</span>nX<span style="color: #000000;">]</span>, cLetras<span style="color: #000000;">[</span>nX<span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br /> cStr := cStrNew<br /><br /> <span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> cStrNew <span style="color: #000000;">)</span><br /> </div>[/code:3gnb75ja][/quote:3gnb75ja]
Thanks but in this especific case the content "SAO MATHEUS " your function change the value to SAOAMATHEUSAAAAAAAAAAAAAAAAAAAA, not work.
|
Alltrim() help
|
[quote="cnavarro":hek90dug]Use
[code=fw:hek90dug]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cStr := StrTran<span style="color: #000000;">(</span> cStr, Chr<span style="color: #000000;">(</span> <span style="color: #000000;">160</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">" "</span> <span style="color: #000000;">)</span><br /> </div>[/code:hek90dug]
<!-- m --><a class="postlink" href="https://stackoverflow.com/questions/27925182/sql-server-how-to-replace-whitespacesnbsp-ascii-in-a-string-with-numbers">https://stackoverflow.com/questions/279 ... th-numbers</a><!-- m -->[/quote:hek90dug]
Thank you! I will try.
|
Almacenar JPG BMP AVI etc etc en archivos .DBF
|
Estimados Amigos, necesito saber si se puede tener en los regisros de una DBF datos de tipo GIF, BMP o AVI
Si no es en DBF, en que tipo de seria ?
gracias
saludos cordiales
|
Almacenar JPG BMP AVI etc etc en archivos .DBF
|
Hola Tom
Hace poco cuando buscaba algo asi, me encontre con un mensaje en al antiguo news de FWH, que hacia exactamente lo que pides, te lo paso al costo, solo es funcional con xHarbour y se almacena en un campo memo de una .dbf
//////////////////////////////////////////////////////////////////////////////
Asunto: Re: Images in memo fields / Imagenes en campos memo
Fecha: Lunes, 05 de Septiembre de 2005 06:31 p.m.
Estos son ejemplos de xHarbour usando DBFCDX:
Con esta llenarias el archivo con las imagenes...
FUNCTION Populate()
USE customer NEW VIA "DBFCDX"
DO WHILE .NOT. EOF()
GetPix( "Pix", Substr(LastName, 1, 4) + CustID)
Customer->DBSkip()
ENDDO
FUNCTION GetPix(cPixField, cPixFile)
LOCAL nPos
nPos := FieldPos(cPixField)
// Import the picture field into the indicated field
IF ! DBFILEPUT(nPos, cPixFile)
Alert("Import of picture " + cPixFile + " failed!")
ENDIF
Con este mostrarias lo que guardaste en el archivo:
FUNCTION ShowPix()
LOCAL cPixFile := "picture.gif"
LOCAL nPos
// Customer database with a picture of each
// customer stored in a field called "Pix"
USE customer NEW VIA "DBFCDX"
nPos := FieldPos("Pix")
// Export the file's data for the current Pix field
IF ! DBFILEGET(nPos, cPixFile, FILEGET_OVERWRITE )
Alert("Export of picture " + cPixFile + " failed!")
ELSE
// Code for displaying picture would go here
ENDIF
Saludos desde Colombia,
Julio Cesar Cantillo Molina
////////////////////////////////////////////////////////////////////////////
ahi te lo dejo <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Saludos.
Marco A. Delgado
|
Almacenar contraseñas con FWH MySQL/MariaDB
|
Hola Amigos del forum.
Necesito almacenar contraseña con la clase fwh mysql/mariadb, utilizando el algorismo AES
y averiguando encontré esto:
Para encriptar
INSERT INTO usuarios VALUES('usuario',AES_ENCRYPT('contraseña','llave'));
Para desencriptar:
INSERT INTO usuarios VALUES('usuario',AES_DECRYPT('contraseña','llave'));
Como llevo estas lineas a la clase o un ejemplo.
Gracias por la atención prestada
Adolfredo martinez
|
Almacenar contraseñas con FWH MySQL/MariaDB
|
Amigos del Forum.
Lo que busco es algo como esto, que hice en tablas DBF:
#include "FiveWin.ch"
*-----------------
func Main()
*-----------------
local oDlg, oGet02,oGet01,oGet03,oFont,clavencriptada:=space(20),claveDecriptada:=space(20)
local cPassword:=SPACE(20),oSay
local oBoton,oBoton2,cChave := 'AMFSOFT',cnombre:=space(33),lEncriDescri := .F.,lSalir := .F.
DEFINE FONT oFont NAME "Tahoma" SIZE 0, -12
DEFINE DIALOG oDlg ;
FROM 5, 5 TO 15, 60 ;
TITLE "Por Favor Identifiquese" ;
FONT oFont
oDlg:lHelpIcon := .f.
@ 1, 2 SAY "Nombre del Usuario:" OF oDlg
@ 1, 10 GET oGet01 VAR cnombre OF oDlg
@ 2, 2 SAY "Digite sus clave para ingresar..." OF oDlg
@ 3, 2 GET oGet02 VAR cPassword OF oDlg PASSWORD
@ 3, 5 BUTTONBMP oBoton PROMPT "Encrytar" OF oDlg size 50,20 ;
ACTION ( lEncriDescri := .T. , oDlg:End() )
@ 3, 15 BUTTONBMP oBoton2 PROMPT "Salir" OF oDlg size 40,20 ;
ACTION ( lSalir := .T. , oDlg:End() )
ACTIVATE DIALOG oDlg CENTER ON INIT oGet01:SetFocus()
IF lEncriDescri
clavencriptada := hb_crypt(cPassword, cChave)
msginfo(clavencriptada,"encrypt")
claveDecriptada :=hb_Decrypt(clavencriptada,cChave)
msginfo(claveDecriptada,"decrypt")
ENDIF
IF lSalir
Return Nil
endif
RETURN( NIL)
Como seria hacer esto pero con la clase FWH Mysql/Mariadb
|
Almacenar contraseñas con FWH MySQL/MariaDB
|
Hola Adolfredo.
Mira si este codigo, tomado parcialmente de uno de mis sistemas, te sirve de guia.
Utilizo MySql - TMySql. Las funciones de encriptacion y decriptacion son de FW.
[code=fw:3kwdy2sn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//-------------------------------------//</span><br /><span style="color: #00C800;">Function</span> lAutorizado<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg,oBt1,oBt2, oCbx, oPw, cItems:=<span style="color: #000000;">{</span><span style="color: #000000;">}</span>,cVar, cPw, lOK:=.f., lAutoriza:=.f.<br /><span style="color: #00C800;">local</span> oUsuarios:= oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"SELECT * FROM usuarios"</span> <span style="color: #000000;">)</span><br /><br />oUsuarios:<span style="color: #000000;">GoTop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">While</span> !oUsuarios:<span style="color: #000000;">eof</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> aadd<span style="color: #000000;">(</span>cItems,oUsuarios:<span style="color: #000000;">nombre</span><span style="color: #000000;">)</span><br /> oUsuarios:<span style="color: #000000;">Skip</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">Enddo</span><br /><br />cPw:=space<span style="color: #000000;">(</span>len<span style="color: #000000;">(</span>oUsuarios:<span style="color: #000000;">codigo</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br />cVar:=cItems<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><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;">"USUARIOS"</span> <br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">ComboBox</span> oCbx <span style="color: #0000ff;">VAR</span> cVar <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">ITEMS</span> cItems ;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span>oCbx:<span style="color: #000000;">GotFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oCbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oPw <span style="color: #0000ff;">VAR</span> cPw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> oDLG<br /><span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oBt1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">312</span> <span style="color: #0000ff;">OF</span> oDLG BITMAP <span style="color: #ff0000;">"ACEPTAR"</span> TEXTRIGHT <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>lOK:=.t.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">REDEFINE</span> BUTTONBMP oBt2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">313</span> <span style="color: #0000ff;">OF</span> oDLG BITMAP <span style="color: #ff0000;">"CANCELAR"</span> TEXTRIGHT <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>lOK:=.f.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <br /><span style="color: #00C800;">if</span> lOK<br /> cPw := Encrypt<span style="color: #000000;">(</span>cPw,<span style="color: #ff0000;">"AMFSOFT"</span><span style="color: #000000;">)</span> <br /> oUsuarios:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oUsuarios:<span style="color: #000000;">Locate</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Codigo"</span>, cPw <span style="color: #000000;">)</span> <span style="color: #B900B9;">//Busca PW en col usuarios:codigo</span><br /><br /> <span style="color: #00C800;">IF</span> oUsuarios:<span style="color: #000000;">nombre</span> = cVar .and. oUsuarios:<span style="color: #000000;">Codigo</span> = cPw<br /> lAutoriza:=.t.<br /> <span style="color: #00C800;">ELSE</span><br /> lAutoriza:=.f.<br /> MsgStop<span style="color: #000000;">(</span><span style="color: #ff0000;">"Acceso Denegado."</span>,<span style="color: #ff0000;">"Alto"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">endif</span><br /> oUsuarios:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> lAutoriza<br /><br /><span style="color: #B900B9;">//---------------------------------------// Agregar usuario, o modificarlo</span><br /><span style="color: #00C800;">Function</span> UsuarConf<span style="color: #000000;">(</span>lAppend,oUsuarios<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg,oNomb,oCodi,oCodi2, lOK:=.f., oUsers, n<br /><span style="color: #00C800;">local</span> cNomb,cCodi<br /><span style="color: #00C800;">local</span> nRecno:=oUsuarios:<span style="color: #000000;">Recno</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">if</span> lAppend<br /> oUsuarios:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> nNumUser := oUsuarios:<span style="color: #000000;">NumUser</span> + <span style="color: #000000;">1</span><br /> cNomb := space<span style="color: #000000;">(</span>len<span style="color: #000000;">(</span>oUsuarios:<span style="color: #000000;">nombre</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> cCodi := oUsuarios:<span style="color: #000000;">codigo</span><br /><span style="color: #00C800;">else</span><br /> nNumUser := oUsuarios:<span style="color: #000000;">NumUser</span> <br /> cNomb := oUsuarios:<span style="color: #000000;">nombre</span><br /> cCodi := Decrypt<span style="color: #000000;">(</span> oUsuarios:<span style="color: #000000;">codigo</span>, <span style="color: #ff0000;">"AMFSOFT"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><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;">"PERFILUSUARIO"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>lAppend,<span style="color: #ff0000;">"Perfil de Usuario"</span>,<span style="color: #ff0000;">"Modificar Perfil de Usuario"</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oNomb <span style="color: #0000ff;">VAR</span> cNomb <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">Valid</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>empty<span style="color: #000000;">(</span>cNomb<span style="color: #000000;">)</span>,<span style="color: #000000;">(</span>MsgStop<span style="color: #000000;">(</span><span style="color: #ff0000;">"Debe ingresar el nombre."</span>,<span style="color: #ff0000;">"Alto"</span><span style="color: #000000;">)</span>,.f.<span style="color: #000000;">)</span>,.t.<span style="color: #000000;">)</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oCodi <span style="color: #0000ff;">VAR</span> cCodi <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">Valid</span> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span>empty<span style="color: #000000;">(</span>cCodi<span style="color: #000000;">)</span>,<span style="color: #000000;">(</span>MsgStop<span style="color: #000000;">(</span><span style="color: #ff0000;">"Debe ingresar la clave."</span>,<span style="color: #ff0000;">"Alto"</span><span style="color: #000000;">)</span>,.f.<span style="color: #000000;">)</span>,.t.<span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> BUTTONBMP <span style="color: #0000ff;">ID</span> <span style="color: #000000;">312</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>lOK:=.T.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> BITMAP <span style="color: #ff0000;">"ACEPTAR"</span> TEXTRIGHT<br /><span style="color: #0000ff;">REDEFINE</span> BUTTONBMP <span style="color: #0000ff;">ID</span> <span style="color: #000000;">313</span> <span style="color: #0000ff;">OF</span> oDLG <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span>lOK:=.F.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> CANCEL BITMAP <span style="color: #ff0000;">"CANCELAR"</span> TEXTRIGHT<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDLG <span style="color: #0000ff;">CENTERED</span> <br /><br /><span style="color: #00C800;">IF</span> lOK<br /> <span style="color: #00C800;">if</span> lAppend<br /> oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"INSERT INTO usuarios SET NumUser = '"</span>+cValToChar<span style="color: #000000;">(</span>nNumeUser<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"' ;"</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span> <br /> <br /> oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"UPDATE usuarios SET nombre = '"</span>+cNomb+<span style="color: #ff0000;">"', codigo = '"</span>+Encrypt<span style="color: #000000;">(</span>cCodi,<span style="color: #ff0000;">'AMFSOFT'</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">"' "</span> +;<br /> <span style="color: #ff0000;">"WHERE numUser = '"</span>+cValToChar<span style="color: #000000;">(</span>nNumeUser<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"' ;"</span><span style="color: #000000;">)</span><br /><br /> oUsuarios:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//actualiza consulta</span><br /> oUsuarios:<span style="color: #000000;">Goto</span><span style="color: #000000;">(</span>nRecno<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> lAppend<br /> oUsuarios:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">ELSE</span><br /> oUsuarios:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3kwdy2sn]
Saludos.
|
Almacenar contraseñas con FWH MySQL/MariaDB
|
Con HDO es muy fácil.
Ahí lo dejo!!!
Incluso podrías usas HDO RDD, mira este código:
[code=fw:38fb0d1u]<div class="fw" id="{CB}" style="font-family: monospace;"><br />USE usuarios <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> usuarios VIA <span style="color: #ff0000;">"HDO"</span><br /><br /><span style="color: #B900B9;">// Para guardar</span><br /><br />usuarios-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br />usuarios->user:= <span style="color: #ff0000;">"el_usuario"</span><br />usuarios->pwd := AES_ENCRYPT<span style="color: #000000;">(</span><span style="color: #ff0000;">'la_contraseña'</span>,<span style="color: #ff0000;">'llave'</span><span style="color: #000000;">)</span><br /><br />usuarios-><span style="color: #000000;">(</span>dbCommit<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Para recuperar</span><br /><br /><span style="color: #00C800;">if</span> usuarios-><span style="color: #000000;">(</span> DBSeek<span style="color: #000000;">(</span> <span style="color: #ff0000;">"el_usuario"</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> usuario := usuarios->user<br /> contraseña := AES_DECRYPT<span style="color: #000000;">(</span> usuarios->pwd, <span style="color: #ff0000;">"llave"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">else</span><br /> alert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Usuario no encontrado"</span> <span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span><br /><br /> </div>[/code:38fb0d1u]
Como ves usando la HDO RDD es como si trataras una DBF normal
No me digas que no es fácil.
También puedes hacerlo con TRowset
o directamente con sentencia SQL
No es por nada pero HDO mola!!!
<!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Almacenar contraseñas con FWH MySQL/MariaDB
|
Hola FranciscoA y xmanuel.
Gracias por contestar.
Francisco excelente ejemplo gracias ya lo resolví, al comienzo tuve mi tropiezo, pero cambie la estructura del campo donde almaceno el password tenia definido así:
Clave varchar(20) NULL la cambie por
CODIGO text(20) NULL
Gracias
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
// Almacena archivos de cualquier tipo en una tabla DBF o Gestor MySQL/SQLSERVER
// Juan navas <!-- e --><a href="mailto:jnavas@datapronet.com">jnavas@datapronet.com</a><!-- e --> <!-- e --><a href="mailto:jnadaptapro@gmail.com">jnadaptapro@gmail.com</a><!-- e -->
// Este programa fue extraido del sistema ERP AdaptaPro <!-- w --><a class="postlink" href="http://www.datapronet.com">www.datapronet.com</a><!-- w --> utiliza MYSQL
// Este ejemplo es mi aporte al foro de FiveWin, se puede utilizar en cualquier gestor de base de datos utilizando campos Memos
// El mecanismo es: A partir del Archivo BMP o Binario, Genera un archivo comprimido ZIP,texto mediante MIME, se fracciona en paginas y se almacena
// Para recuperarlo: Lee el contenido del memo, genera el archivo TEXTO, luego genera el archivo comprimido, finalmente se descomprime y genera el archivo nuevamente en la carpeta filerecover
// Requiere Libreria hbzlib.LIB
// Ejecucion desde la consola: savefilebmp <Nombre de Cualquier Archivo>
// Si no se indica el nombre del archivo, guardara el mismo binario y luego lo recupera en la carpeta filerecover
// Esta funcionalidad la hemos ìmplementado con campos BLOB y LONGTEXT en MYSQL.
#include "FiveWin.ch"
FUNCTION MAIN(cFile)
LOCAL aPag
LOCAL cBin :=Lower(GetModuleFileName( GetInstance() ))
LOCAL cFileDir:="FILES.DBF"
LOCAL cFilePag:="FILESPAG.DBF"
LOCAL aFile,I
DEFAULT cFile:=cBin
SET DELETE ON
IF !FILE(cFile)
MsgAlert("Archivo "+cFile+" no Existe")
RETURN NIL
ENDIF
ISTABLAS(cFileDir,cFilePag)
aFile:=DIRECTORY(cFile)
aPag :=GETPAGES(cFile)
IF Empty(aPag)
MsgAlert("Archivo no generó Paginado")
RETURN NIL
ENDIF
SELECT A
USE (cFileDir) EXCLU
GO TOP
// Remueve el COntenido
DELETE ALL FOR ALLTRIM(FIELD->FILE)=ALLTRIM(cFile)
PACK
APPEND BLANK
REPLACE FILE WITH cFile
REPLACE SIZE WITH aFile[1,2]
REPLACE PAGES WITH LEN(aPag)
COMMIT
// BROWSE()
SELECT B
USE (cFilePag) EXCLU
GO TOP
// Remueve el COntenido
DELETE ALL FOR ALLTRIM(FIELD->FILE)=ALLTRIM(cFile)
PACK
FOR I=1 TO LEN(aPag)
APPEND BLANK
REPLACE FILE WITH cFile
REPLACE PAGE WITH I
REPLACE MEMO WITH aPag[I]
COMMIT
NEXT I
// BROWSE()
CLOSE ALL
RECUPERAR(cFile)
RETURN NIL
FUNCTION cFileTemp(cExt)
LOCAL cFile:="tmp"+STRTRAN(LSTR(SECONDS()),".","")+cExt
RETURN cFile
FUNCTION lstr(nValue)
RETURN ALLTRIM(STR(nValue))
FUNCTION GETPAGES(cFileOrg)
LOCAL cFileZip :=cFileTemp(".ZIP")
LOCAL cFileMime:=cFileTemp(".TXT")
LOCAL aFiles :={},nSize:=0,oFile,cMemo:=""
LOCAL cBin :=Lower(cFilePath(GetModuleFileName( GetInstance() )))
LOCAL aPages:={},I,aTotal:={},nTotal:=0,lZip:=.F.
LOCAL aPag :={},nPage
LOCAL nFileMax :=(1024**4)*2 // Tamaño maximo permitido para almacenar, en paginado el limite esta en la capacidad de la tabla
LOCAL nPageSize:=(1024**2)/2 // Tamaño maximo de la Pagina, limite campo MEMO . Utilizado en MySQL para campos LONGTEXT
nPageSize:=65555 // Capacidad para tablas DBF
CursorWait()
IF !(":"$cFileOrg)
cFileOrg:=cBin+cFileOrg
ENDIF
cFileOrg :=Lower(cFileOrg)
AADD(aFiles,cFileOrg)
IF !(":"$cFileOrg)
MsgAlert("Es necesario Indicar la Ruta Completa del Archivo "+cFileOrg+CRLF+;
"Ejemplo "+cBin+"\docs\documento.doc")
RETURN 0
ENDIF
IF !FILE(cFileOrg)
MsgAlert("Archivo "+cFileOrg+" no Existe")
RETURN 0
ENDIF
IF UPPE(cFileExt(cFileOrg))="ZIP"
cFileZip:=cFileOrg
lZip :=.T.
ELSE
// El Archivo Original es Comprimido en Formato Zip
HB_ZipFile( cFileZip, aFiles, 9,,.T., NIL, .F., .F. )
ENDIF
// El Archivo MIME es Convertido en Formato TEXTO Segun Mime
FMimeEnc(cFileZip,cFileMime)
// Valida el Tamaño con el Archivo MIME
nSize:=DIRECTORY(cFileMime)[1,2]
IF nSize>nFileMax
MsgAlert("Archivo "+cFileMime+" Tamaño "+LSTR(nSize)+",Supera el Límite "+LSTR(nFileMax))
RETURN {}
ENDIF
// Determinamos las Páginas que seran empleadas
nPage :=MAX(INT(nSize/nPageSize),1)
aPages:={}
FOR I=1 TO nPage
AADD(aPages,{MIN(nPageSize,nSize)})
NEXT I
aTotal:=ATOTALES(aPages)
// Remanente de la Ultima Página
IF nSize>aTotal[1]
AADD(aPages,{nSize-aTotal[1]})
ENDIF
// Se Extra Pagina por Pagina del Arhivo MIME
oFile:=TFILE():New(cFileMime)
FOR I=1 TO LEN(aPages)
cMemo:=oFile:cGetStr( aPages[I,1] )
AADD(aPag,cMemo)
nTotal:=nTotal+LEN(cMemo)
NEXT I
oFile:End()
ferase(cFileMime)
IF !lZip
ferase(cFileZip)
ENDIF
RETURN aPag
FUNCTION ATOTALES(aData)
LOCAL aTotal,I,U
aTotal:=ARRAY(LEN(aData[1]))
Aeval( aTotal,{ |a,n| aTotal[n]:=0 })
FOR I=1 TO LEN(aData)
FOR U=1 TO LEN(aData[I])
aTotal[U]:=aTotal[U]+aData[I,U]
NEXT U
NEXT I
RETURN aTotal
PROCE ISTABLAS(cFileDir,cFilePag)
LOCAL aStruct:={}
IF FILE(cFileDir)
RETURN
ENDIF
AADD(aStruct,{"FILE", "C",250,0})
AADD(aStruct,{"SIZE", "N",12 ,0})
AADD(aStruct,{"PAGES","N",3 ,0})
dbcreate(cFileDir, aStruct)
aStruct:={}
AADD(aStruct,{"FILE","C",250,0}) // Archivo
AADD(aStruct,{"PAGE","N",4 ,0}) // Memo
AADD(aStruct,{"MEMO","M",0 ,0}) // Numero de la Pagina, es necesario el Orden para su Recuperación
dbcreate(cFilePag, aStruct)
RETURN
FUNCTION RECUPERAR(cFile)
LOCAL cFileDir:="FILES.DBF"
LOCAL cFilePag:="FILESPAG.DBF"
LOCAL cFileZip :=cFileTemp(".ZIP")
LOCAL cFileMime:=cFileTemp(".TXT")
LOCAL I,cDirOut:="filerecover\"
LOCAL aPag :={}
LOCAL oFile
lMkDir(cDirOut)
SELECT A
USE (cFileDir)
GO TOP
LOCATE FOR ALLTRIM(FIELD->FILE)=ALLTRIM(cFile)
IF !FOUND()
CLOSE ALL
MsgAlert("Archivo "+cFile+" no Encontrado en Tabla "+cFileDir)
RETURN .F.
ENDIF
SELECT B
USE (cFilePag) EXCLU
GO TOP
// Remueve el COntenido
LOCATE FOR ALLTRIM(FIELD->FILE)=ALLTRIM(cFile)
WHILE !EOF() .AND. ALLTRIM(FIELD->FILE)=ALLTRIM(cFile)
AADD(aPag,ALLTRIM(FIELD->MEMO))
SKIP
ENDDO
CLOSE ALL
// Desde DBF hacia MIME
oFile:=TFILE():New(cFileMime)
AEVAL(aPag,{|a,n| oFile:PutStr(a)})
oFile:End()
// De MIME a ZIP
ferase(cFileZip)
FMimeDec(cFileMime,cFileZip)
ferase(cFileMime)
HB_UNZIPFILE( cFileZip , {|| nil }, .t., NIL, cDirOut , NIL )
ferase(cFileZip)
MsgAlert("Archivo recuperado en carpeta "+cDirOut)
IF !cFileExt(cFile)="EXE"
SHELLEXECUTE(NIL,"open",cFile)
ENDIF
RETURN .T.
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Juan,
gracias por compartirlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Antonio,
Muchas gracias espero que sea de utilidad, al principio tuve muchas dificultades para implementar en mi aplicacion el registro y recuperación de todo tipo de archivo.
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Juan, Sencillamente una genialidad, es posible ponerse en contacto contigo. Tu correo no funciona.
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Probably this very difficult approach was necessary during 16-bit clipper days about 20 years back.
Now all this totally not necessary.
We can simply assign file buffer value to the field.
Please try this sample which stores contents of a large file c:\fwh\lib\fiveh32.lib in the memo field of dbf file.
[code=fw:3d73858d]<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: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\f</span>iveh32.lib"</span> <span style="color: #B900B9;">// file size is 5,480,0032</span><br /><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents.dbf"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FILENAME"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"CONTENTS"</span>, <span style="color: #ff0000;">'M'</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /> USE contents EXCLUSIVE<br /><br /> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> FIELD->FILENAME := cFile<br /> FIELD->CONTENTS := MEMOREAD<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /><br /> DBCOMMIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> ? LEN<span style="color: #000000;">(</span> field->contents <span style="color: #000000;">)</span>, FILESIZE<span style="color: #000000;">(</span> cfile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> 5480032, 5480032</span><br /><br /> CLOSE CONTENTS<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3d73858d]
Same way even for storing large BLOB or TEXT data in MySql, MsSql or other databases, it can be done in one simple step.
MYSQL Example (using FWHMYSQL and can be tested with FWH 17.01):
Principle is the same for other libraries too.
[code=fw:3d73858d]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// MYSQL</span><br /> <span style="color: #00C800;">local</span> oCn, oRs<br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\f</span>iveh32.lib"</span><br /><br /> oCn := FW_DemoDB<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// Note: It is important to set max_allowed_packet to sufficiently large value eg. 32MB</span><br /><br /> <span style="color: #00C800;">if</span> oCn:<span style="color: #000000;">TableExists</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span> <span style="color: #000000;">)</span><br /> oCn:<span style="color: #000000;">DropTable</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> oCn:<span style="color: #000000;">CreateTable</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"filename"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"contents"</span>, <span style="color: #ff0000;">'m'</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oCn:<span style="color: #000000;">Insert</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span>, <span style="color: #ff0000;">"filename,contents"</span>, <span style="color: #000000;">{</span> cFile, MEMOREAD<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span> <span style="color: #000000;">)</span><br /> ? Len<span style="color: #000000;">(</span> oRs:<span style="color: #000000;">contents</span> <span style="color: #000000;">)</span>, FILESIZE<span style="color: #000000;">(</span> cfile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> 5480032, 5480032</span><br /><br /> oCn:<span style="color: #000000;">Close</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:3d73858d]
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
[quote="Andrés González":2pu6dyl4]Juan, Sencillamente una genialidad, es posible ponerse en contacto contigo. Tu correo no funciona.[/quote:2pu6dyl4]
Saludos
Puedes escribirme a <!-- e --><a href="mailto:jnavas@datapronet.com">jnavas@datapronet.com</a><!-- e --> o <!-- e --><a href="mailto:adaptaprodrive@gmail.com">adaptaprodrive@gmail.com</a><!-- e -->
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Muy interesante tu método, sin embargo, te puedo decir que por mi larga experiencia manejando bases de datos con miles de imágenes y videos de todo tipo que he llegado a la conclusión de que es preferible lo siguiente:
1. Un campo para almacenar el directorio donde el usuario almacena las imágenes (puede ser absoluto o relativo, recomiendo relativo o todo se vuelve una confusión total si el programa cambia de posición o si entregas un instalable; por ejemplo, con Innosetup <!-- m --><a class="postlink" href="http://jrsoftware.org/">http://jrsoftware.org/</a><!-- m -->). Tipo texto longitud 120.
2. Un campo en el que se almacena el tipo de imagen (BMP, JPG, etc) de longitud 4. Esto es optativo.
3. Un campo tipo texto en el que almacenas el nombre de las imágenes. Yo lo hago así y me da muy buen resultado: Campo tipo texto de longitud 254 en el que el nombre máximo de las imágenes de limita a 8 caracteres sin espacios ni símbolos especiales y cada imagen se separa por un delimitador (yo uso ^). Esto me da la posibilidad de almacenar 254/9 (incluye el nombre del fichero y delimitador = 28 imágenes. Puedes jugar con la longitud permitida para el nombre de la imagen y/o incluir el tipo de imagen con el nombre.
El resultado es 3 campos de texto de un máximo de 120+4+254=378, sin blobs, memos, ni extras en la base de datos.
Emiliano Llano Díaz
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Emiliano
Saludos,
En nuestro caso, AdaptaPro es un sistema Open Source creado con HB + FW + MySQL, el proceso de actualización del sistema lo realizamos mediante el alojamiento de sus componentes en AdaptaPro Server, mas las personalizaciones creadas por los clientes. ha sido eficiente rápido y cómodo hacer las actualizaciones del sistema y distribución en los demás PC involucrados con la aplicación. Hemos erradicado la participación del personal técnico para la actualización del sistema.
Tambien para otros casos, utilizamos funcionalidades utilizar directorios y archivos donde no es necesario que estén almacenados en la BD
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Hola y como sacas el archivo para leerlo por decir una fotografía para presentarla en pantalla
estoy usando dbf
Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Hello and how do you get the file to read it by saying a photograph to present it on screen
i am using dbf
Greetings: wink:
[quote="nageswaragunupudi":8s7bqba4]Probably this very difficult approach was necessary during 16-bit clipper days about 20 years back.
Now all this totally not necessary.
We can simply assign file buffer value to the field.
Please try this sample which stores contents of a large file c:\fwh\lib\fiveh32.lib in the memo field of dbf file.
[code=fw:8s7bqba4]<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: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\f</span>iveh32.lib"</span> <span style="color: #B900B9;">// file size is 5,480,0032</span><br /><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents.dbf"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"FILENAME"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"CONTENTS"</span>, <span style="color: #ff0000;">'M'</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /> USE contents EXCLUSIVE<br /><br /> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> FIELD->FILENAME := cFile<br /> FIELD->CONTENTS := MEMOREAD<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span><br /><br /> DBCOMMIT<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> ? LEN<span style="color: #000000;">(</span> field->contents <span style="color: #000000;">)</span>, FILESIZE<span style="color: #000000;">(</span> cfile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> 5480032, 5480032</span><br /><br /> CLOSE CONTENTS<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:8s7bqba4]
Same way even for storing large BLOB or TEXT data in MySql, MsSql or other databases, it can be done in one simple step.
MYSQL Example (using FWHMYSQL and can be tested with FWH 17.01):
Principle is the same for other libraries too.
[code=fw:8s7bqba4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// MYSQL</span><br /> <span style="color: #00C800;">local</span> oCn, oRs<br /> <span style="color: #00C800;">local</span> cFile := <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\l</span>ib<span style="color: #000000;">\f</span>iveh32.lib"</span><br /><br /> oCn := FW_DemoDB<span style="color: #000000;">(</span> <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// Note: It is important to set max_allowed_packet to sufficiently large value eg. 32MB</span><br /><br /> <span style="color: #00C800;">if</span> oCn:<span style="color: #000000;">TableExists</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span> <span style="color: #000000;">)</span><br /> oCn:<span style="color: #000000;">DropTable</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> oCn:<span style="color: #000000;">CreateTable</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"filename"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> <span style="color: #ff0000;">"contents"</span>, <span style="color: #ff0000;">'m'</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oCn:<span style="color: #000000;">Insert</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span>, <span style="color: #ff0000;">"filename,contents"</span>, <span style="color: #000000;">{</span> cFile, MEMOREAD<span style="color: #000000;">(</span> cFile <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> oRs := oCn:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"contents"</span> <span style="color: #000000;">)</span><br /> ? Len<span style="color: #000000;">(</span> oRs:<span style="color: #000000;">contents</span> <span style="color: #000000;">)</span>, FILESIZE<span style="color: #000000;">(</span> cfile <span style="color: #000000;">)</span> <span style="color: #B900B9;">// --> 5480032, 5480032</span><br /><br /> oCn:<span style="color: #000000;">Close</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:8s7bqba4][/quote:8s7bqba4]
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Saving image to DBF
[code=fw:2hqhkras]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ALIAS->MEMOFIELDNAME := MEMOREAD<span style="color: #000000;">(</span> cImageFile <span style="color: #000000;">)</span><br /> </div>[/code:2hqhkras]
Display image in window / dialog:
[code=fw:2hqhkras]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ r, c XIMAGE oImage SOURCE ALIAS->MEMOFIELDNAME <span style="color: #0000ff;">SIZE</span> w,h <span style="color: #0000ff;">OF</span> oDlg<br /> </div>[/code:2hqhkras]
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Thank you very much <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
Regards <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
[quote="nageswaragunupudi":2om80h2s]Saving image to DBF
[code=fw:2om80h2s]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ALIAS->MEMOFIELDNAME := MEMOREAD<span style="color: #000000;">(</span> cImageFile <span style="color: #000000;">)</span><br /> </div>[/code:2om80h2s]
Display image in window / dialog:
[code=fw:2om80h2s]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ r, c XIMAGE oImage SOURCE ALIAS->MEMOFIELDNAME <span style="color: #0000ff;">SIZE</span> w,h <span style="color: #0000ff;">OF</span> oDlg<br /> </div>[/code:2om80h2s][/quote:2om80h2s]
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
Puedes escribirme a <!-- e --><a href="mailto:jnadaptapro@gmail.com">jnadaptapro@gmail.com</a><!-- e --> +58-4143000518
|
Almacenar/Recuperar imagenes binarios en Tablas DBF
|
jNavas
tus funciones funcionan de maravilla
gracias! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Almacén Virtual 3D.
|
Hola un cliente se ha empeñado en que quiere que a una aplicación que le hemos realizado de almacén, ahora le añadamos la ubicación de lo que almacena, pasillo, fila y altura. Hasta ahí todo bien.
Pero claro como por pedir no quede me ha pedido que quiere ver en pantalla en visión 3D, giro 360º todo el almacén para ver huecos y donde esta el material. ¿alguien me puede ayudar en esto, como empezar, si es posible? Ah además claro las estanterías pueden ir creciendo, es decir, habiendo más , según necesidades y la pantalla de "3D" debe aplicar esos cambios, asi como cuando se llenan los huecos y se vacían.
La verdad es que apetece hacerlo puesto que nunca hemos desarrollado algo así en mi empresa.
Muchas Gracias.
|
Almacén Virtual 3D.
|
Jose Luis,
No tengo experiencia en lo que comentas pero es un tema que siempre me ha llamado la atención.
Asi que cuenta con mi ayuda <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
He buscado en google y existen algunos motores 3D que se podrian usar como Unity:
[url:11pwle75]http://gamejolt.com/f/do-you-know-any-simple-3d-game-engines/5927[/url:11pwle75]
No tengo ni idea acerca de lo facil o dificil que pueda ser. Pero por intentarlo que no quede <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
Almacén Virtual 3D.
|
Jose Luis,
Le consulté a mi hijo ya que el es dueño de la empresa Kibo Studios <!-- w --><a class="postlink" href="http://www.kibostudios.com">www.kibostudios.com</a><!-- w --> y recientemente
han comprado el Oculus Rif (creo que se escribe asi), las mejores gafas de realidad virtual.
Ellos para probar a fondo las gafas, han construido una aplicación usando el motor 3D Unreal, que reproduce
completamente sus oficinas, permitiendo visitar las oficinas virtualmente.
Tal vez podais conversar y llegar a un acuerdo para que ellos desarrollen el Almacen virtual
|
Almacén Virtual 3D.
|
Gracias, lo tendré en cuenta.
Cuando tenga la reunión con el cliente le comentare el tema.
Un saludo y como siempre muchas gracias
|
Almacén Virtual 3D.
|
Jo Antonio el Lolillo me lo imagino como cuando era chico y fijate ya tiene hasta su propia empresa...
Para José Luís, a veces hay que saber decir [color=#FF0000:2druyhwk]NO[/color:2druyhwk]
Si tienes 18 minutos mira este vídeo [url:2druyhwk]https://www.youtube.com/watch?v=KXADQ8Axjtk[/url:2druyhwk]
|
Almacén Virtual 3D.
|
[quote="xmanuel":20plvhej]
a veces hay que saber decir [color=#FF0000:20plvhej]NO[/color:20plvhej]
[/quote:20plvhej]
Sí claro, después de haber consultado en el foro a ver si algún compañero puede echar una mano, o a algún compañero le interesa el proyecto, o conoce de alguien que conoce o le puede interesar.
Eso es justo, justo lo que ha hecho Garbi y es justo, justo para lo que también sirve este foro <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.