topic
stringlengths
1
63
text
stringlengths
1
577k
A ver si esta sale...Boton con prompt en 2 lineas
Así? [code=fw:1rfo921k]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CRUCECITA"</span> &nbsp;<span style="color: #0000ff;">LEFT</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Linea 1"</span>+CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"Linea 2"</span>;<br />&nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Prueba"</span>;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1rfo921k]
A ver si esta sale...Boton con prompt en 2 lineas
No funciona, gracias por tu interes, seguire probando a ver si encuentro una solucion. Es tan facil en tsbutton... Gracias Ruben Fernandez
A ver si esta sale...Boton con prompt en 2 lineas
Saludos si usas BTNBMP, RBBTN usando CRLF deberia funcionar para BUTTON, BUTTONBMP revisa este link <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=98653#p98653">viewtopic.php?p=98653#p98653</a><!-- l --> segu ese link usa setwindowlong, pero con asignar el estilo BS_MULTILINE en el recurso es suficiente
A ver si esta sale...Boton con prompt en 2 lineas
Ruben si puedes colocar un ejempode como lo estas usando seria mejor
A ver si esta sale...Boton con prompt en 2 lineas
Ruben [code=fw:3kcfhs5g]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span>  <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CRUCECITA"</span>  <span style="color: #0000ff;">LEFT</span>;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Linea 1"</span>+CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span>+CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"Linea 2"</span>;<br />      TOOLTIP <span style="color: #ff0000;">"Prueba"</span>;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3kcfhs5g] Faltaba el CHR(10) o lo que es lo mismo [code=fw:3kcfhs5g]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span>  <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CRUCECITA"</span>  <span style="color: #0000ff;">LEFT</span>;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Linea 1"</span>+CRLF+<span style="color: #ff0000;">"Linea 2"</span>;<br />      TOOLTIP <span style="color: #ff0000;">"Prueba"</span>;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:3kcfhs5g] Debería funcionar Un saludo.
A ver si esta sale...Boton con prompt en 2 lineas
Amigos: Funciono con BtnBmp pero[b:4u9jt8cb] no funcion con buttonbmp[/b:4u9jt8cb] REDEFINE BUTTONBMP oBoton3 ID 230 OF oDlg ; PROMPT "Registro"+CHR(10)+"Algo"; TOOLTIP "Prueba"; ACTION (GIVEMEREGISTRO(),oDlg:Update()) Incluso colocando SetWindowlong... y BSMultiline....en el recurso y en el define como lo indico Cesar en el link de este hilo. Pedido: Seria muy dificil que los botones funcionaran todos de la misma forma, para evitar errores ? Saludos y Gracias Ruben Fernandez
A vueltas con TWORD
Estoy adaptando un programa a la última versión de Harbour y FWH. El programa original elaboraba en word cartas desde cero, conteniendo imágenes, cuadros de texto, etc. ¿Alguien tiene funcionando esta con HARBOUR 3? A mi me está fallando el siguiente método: [code=fw:1c3t31et]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> SetMainDoc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TWord<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">local</span> oWindow := ::<span style="color: #000000;">oActiveDoc</span>:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ActiveWindow"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">local</span> oView &nbsp; := oWindow:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"View"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oView:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SeekView"</span> , <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oSelection</span> := ::<span style="color: #000000;">oActiveDoc</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">release</span> oWindow, oView<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span></div>[/code:1c3t31et] Arrojando este error: [code=fw:1c3t31et]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>Rev. <span style="color: #000000;">18449</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;Version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">12.12</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">3</span><br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">18</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">14.02</span><span style="color: #000000;">.2013</span>, <span style="color: #000000;">09</span>:<span style="color: #000000;">48</span>:<span style="color: #000000;">46</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;"><span style="color: #000000;">&#40;</span>DOS</span> Error <span style="color: #000000;">-2147352572</span><span style="color: #000000;">&#41;</span> WINOLE/<span style="color: #000000;">1007</span> &nbsp;Error de argumento: <span style="color: #000000;">SET</span><br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = C &nbsp; SeekView<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">0</span><br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> TOLEAUTO:<span style="color: #000000;">SET</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\TWORDHB.PRG => TWORD:<span style="color: #000000;">SETMAINDOC</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">792</span> <span style="color: #000000;">&#41;</span></div>[/code:1c3t31et] Y la verdad... no sé cómo solucionarlo. ¡¡¡¡SOCORRO!!!
A vueltas con TWORD
a mi me funciona : [code=fw:3vwqpsqc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> SetMainDoc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TWord<br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oActiveDoc</span>:<span style="color: #000000;">ActiveWindow</span>:<span style="color: #000000;">View</span>:<span style="color: #000000;">SeekView</span>:= <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oSelection</span> := ::<span style="color: #000000;">oActiveDoc</span><br />&nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:3vwqpsqc]
A vueltas con TWORD
Gracias. Sustituyendo el Metodo tal como lo tenía yo por el que tú has mencionado... a mi tampoco me falla... ahí. Ahora me falla el médodo WRITE en el argumento SIZE. Y esto por ahora... que quedan 12 llamadas distintas más a la clase. Sería posible que me dijeses dónde puedo obtener una versión correcta de la clase TWORD (no la he encontrado en el foro) o si no es molestia me podrías enviar una copia de la que tú manejas a mi dirección de email: [b:e00vvugh]a.perez@barrilero.es[/b:e00vvugh] Muchas gracias de antemano por la enorme ayuda, y un saludo.
A vueltas con TWORD
Yo creo que ya es la última llamada a TWORD que me queda por corregir, pero estoy bloqueado o ya le he hecho tantas pruebas que no sé ni lo que hago, no sé. ¿Alguna sugerencia? Esta es la llamada al método [code=fw:2usnau4c]<div class="fw" id="{CB}" style="font-family: monospace;">oWord:<span style="color: #000000;">TextBox</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">03.10</span>, <span style="color: #000000;">16.50</span>, <span style="color: #000000;">03.90</span>, <span style="color: #000000;">19.20</span>, aText<span style="color: #000000;">&#91;</span>ni<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, oFnt<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, , ,<span style="color: #000000;">1</span>, <span style="color: #000000;">&#123;</span>,,.T.,,,,,<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>,,,.T.,,<span style="color: #000000;">&#125;</span>,,<span style="color: #000000;">&#41;</span></div>[/code:2usnau4c] Este es el código del método que yo tengo, la versión que está en el foro [code=fw:2usnau4c]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> TextBox<span style="color: #000000;">&#40;</span> nTop, nLeft, nBottom, nRight, cTexto, oFuente, nclrtext, nClrBack, nJustify, afondo, alinea, lvertadjust, norientacion<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TWord<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">local</span> oShapes,oCuadro,oFill,oLinea, oFontC, oText, oCuadroText<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">local</span> nPad := <span style="color: #000000;">0</span>, n, oWrap, nheighttext,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lnocabe := .f., &nbsp;nheightbox:= <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nTop := <span style="color: #000000;">0</span>, nLeft := <span style="color: #000000;">0</span>, nBottom := <span style="color: #000000;">10</span>, nRight := <span style="color: #000000;">10</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cTexto := <span style="color: #ff0000;">' '</span>, oFuente := TFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrText := nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, nJustify := <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;afondo := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, alinea := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, lvertadjust := .f.,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;norientacion := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;nheighttext := oFuente:<span style="color: #000000;">nHeight</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> norientacion > <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; norientacion := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nJustify = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nPad := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nJustify = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nPad := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nJustify = <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nPad := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lsetcm</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nTop := nTop*<span style="color: #000000;">28.35</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nLeft := nLeft*<span style="color: #000000;">28.35</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBottom := nBottom*<span style="color: #000000;">28.35</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nRight := nRight*<span style="color: #000000;">28.35</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oShapes &nbsp; &nbsp; := ::<span style="color: #000000;">oSelection</span>:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Shapes"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oCuadro &nbsp; &nbsp; := oShapes:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"AddTextbox"</span>, norientacion,INT<span style="color: #000000;">&#40;</span>nLeft<span style="color: #000000;">&#41;</span>,INT<span style="color: #000000;">&#40;</span>nTop<span style="color: #000000;">&#41;</span>,INT<span style="color: #000000;">&#40;</span>nRight-nLeft<span style="color: #000000;">&#41;</span>,INT<span style="color: #000000;">&#40;</span>nBottom-nTop<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oFill &nbsp; &nbsp; &nbsp; := oCuadro:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Fill"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oCuadro:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'RelativeHorizontalPosition'</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oCuadro:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'RelativeVerticalPosition'</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Fill</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>afondo<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">1</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFillColor &nbsp;:= oFill:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ForeColor"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFillColor:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'RGB'</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">2</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFillColor &nbsp;:= oFill:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"BackColor"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFillColor:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'RGB'</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">3</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFill:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Transparency'</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">4</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFill:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'TwoColorGradient'</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">6</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFill:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Patterned'</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">7</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFill:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">'PresetTextured'</span>, afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">8</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oFill:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">'UserTextured'</span> , afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span> n<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//Linea de contorno</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oLinea &nbsp; &nbsp; &nbsp;:= oCuadro:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"Line"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>alinea<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLinea:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Weight"</span>, alinea<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLinea:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"ForeColor"</span>, alinea<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLinea:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"BackColor"</span>, alinea<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLinea:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"Transparency"</span>, alinea<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLinea:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"DashStyle"</span>, alinea<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> n = <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLinea:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"Style"</span>, alineas<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span> n<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oCuadroText := oCuadro:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TextFrame"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oText &nbsp; &nbsp; &nbsp; := oCuadroText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TextRange"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oFontC &nbsp; &nbsp; &nbsp;:= oText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Font"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oFontC:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Name"</span> &nbsp;, oFuente:<span style="color: #000000;">cFaceName</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oFontC:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Size"</span> &nbsp;, INT<span style="color: #000000;">&#40;</span>oFuente:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oFontC:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Bold"</span> &nbsp;, oFuente:<span style="color: #000000;">lBold</span> &nbsp; &nbsp; <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oFontC:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Color"</span> , nclrtext <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oText:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">'HighlightColorIndex'</span>, nClrBack <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oText:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #ff0000;">"Text"</span>, cTexto <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oParagraph &nbsp;:= oText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ParagraphFormat"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oParagraph:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Alignment"</span>, nPad <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> lvertadjust<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nheightbox := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCuadro:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Height'</span>, nheightbox<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oActiveDoc</span>:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'ComputeStatistics'</span>,<span style="color: #000000;">2</span>,.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lnocabe := oCuadroText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Overflowing'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nheightbox := nheightbox + nHeighttext <span style="color: #B900B9;">//+ OleGetProperty(oParagraph,'SpaceBefore')</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> whil lnocabe = .t. .and. nheightbox <= nBottom - nTop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCuadro:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Height'</span>, nheightbox<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oText:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Text"</span>, cTexto <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oActiveDoc</span>:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'ComputeStatistics'</span>,<span style="color: #000000;">2</span>,.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lnocabe := oCuadroText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Overflowing'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nheightbox := nheightbox + nHeighttext <span style="color: #B900B9;">//+ OleGetProperty(oParagraph,'SpaceBefore')</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oActiveDoc</span>:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'ComputeStatistics'</span>,<span style="color: #000000;">2</span>,.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lnocabe := oCuadroText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Overflowing'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nheightbox := nBottom<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;lcorta := lnocabe<br />&nbsp; &nbsp; &nbsp; &nbsp;ctexto2 := ctexto<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">do</span> whil lcorta .and. !empty<span style="color: #000000;">&#40;</span>ctexto2<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctexto2 := Dellastword<span style="color: #000000;">&#40;</span>ctexto2<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oText:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Text'</span>, ctexto2<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oActiveDoc</span>:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ComputeStatistics'</span>,<span style="color: #000000;">2</span>,.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lcorta := oCuadroText:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Overflowing'</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ctextoverflow</span> := strtran<span style="color: #000000;">&#40;</span>ctexto, ctexto2, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">loverflowing</span> := lnocabe<br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oLastSay</span> := otext<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">release</span> oParagraph, OLinea, oFillColor, oFill, oFontC, oText,oCuadroText, oCuadro<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">lsetcm</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nlastrow</span> := nBottom/<span style="color: #000000;">28.35</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nlastrow</span> := nBottom<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span></div>[/code:2usnau4c] No hay manera, el argumento en "Transparency" da error
A vueltas con TWORD
Mira cambiandolo asi en cada llamada de 'Transparency' : [code=fw:b0f97qlo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp;<span style="color: #00C800;">case</span> n = <span style="color: #000000;">3</span> .and. afondo<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span> <> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; oFill:Set( 'Transparency', afondo[3])</span><br />&nbsp; &nbsp; &nbsp;oFill:<span style="color: #000000;">Transparency</span> := afondo<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />&nbsp;</div>[/code:b0f97qlo] Saludos.
A vueltas con TWORD
Muchas gracias. Esta vez el problema no era ese o al meno no sólo ese.... aunque ya lo he resuelto por el sistema de "prueba y error" A TRANSPARENCY no se le debe pasar (ahora?) un valor lógico sino un número. Pasando un 1 funciona perfectamente. Gracias de nuevo [code=fw:2cgl59yp]<div class="fw" id="{CB}" style="font-family: monospace;">oWord:<span style="color: #000000;">TextBox</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">03.10</span>, <span style="color: #000000;">16.50</span>, <span style="color: #000000;">03.90</span>, <span style="color: #000000;">19.20</span>, aText<span style="color: #000000;">&#91;</span>ni<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, oFnt<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, , ,<span style="color: #000000;">1</span>, <span style="color: #000000;">&#123;</span>,,<span style="color: #000000;">1</span>,,,,,<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>,,,<span style="color: #000000;">1</span>,,<span style="color: #000000;">&#125;</span>,,<span style="color: #000000;">&#41;</span></div>[/code:2cgl59yp] Un Saludo y gracias.
A vueltas con TWORD
Buenos dias Estoy usando FWH 1203 y Harbour 3.2 (31/05/2012) con BCC582 Hasta ahora usaba la Clase TOleauto.Prg y Ole2.c para realizar llamadas a Ole, pero si he entendido bien Harbour ya lo contiene, antes con la lib Hbole, y ahora HbWin (de hecho la libreria hbole ya no aparece en esa versión), por lo que he quitado esos fuentes para probar. Cuando intento compilar, bien, pero a la hora del linkado, obtengo el siguiente error: Error: Unresolved external '_HB_FUN_OLEUNINITIALIZE' referenced from C:\VERCE43\APLI\TWORD.OBJ Qué estoy haciendo mal? Gracias Investigando........ Ya he visto la llamada a dicha funcion OleUninitialize() en el método End(), y también en el programa Olecore.c de Harbour, pero no entiendo por qué da error de linkado Gracias
A vueltas con TWORD
Sorry where is tword ? I not found it on fwh...
A vueltas con TWORD
[quote="Silvio.Falconi":3o0vpm59]Sorry where is tword ? I not found it on fwh...[/quote:3o0vpm59] <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=17&t=6849">viewtopic.php?f=17&t=6849</a><!-- l --> Saludos
A vueltas con TipMail
Buenos días amigos, vengo utilizando la clase TipMail para recibir e interpretar correos hace bastante tiempo. Concretamente se trata de un sistema automatizado que recibe correos con adjuntos y luego procesa dichos adjuntos. Pues bien, últimamente se están recibiendo algunos correos que la clase no es "capaz" de reconocer el archivo adjunto. Aunque si abro el fichero del correo con cualquier cliente de correo sí que lo reconoce perfectamente. Lo que hago es descargar los correos a un fichero y luego procesarlo con : [code=fw:t0owhm45]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><br />    oMail := TIPMail<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    oMail:<span style="color: #000000;">FromString</span><span style="color: #000000;">&#40;</span> cFichero <span style="color: #000000;">&#41;</span> <br /><br />    <span style="color: #00C800;">While</span> oMail:<span style="color: #000000;">GetAttachment</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">NIL</span><br />        <span style="color: #B900B9;">// Creo el fichero adjunto en el disco</span><br />        cDatos:=oMail:<span style="color: #000000;">NextAttachment</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">GetBody</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        nFichero:=fCreate<span style="color: #000000;">&#40;</span>cDirTemp+cFile<span style="color: #000000;">&#41;</span><br />        fWrite<span style="color: #000000;">&#40;</span>nFichero,cDatos<span style="color: #000000;">&#41;</span><br />        fClose<span style="color: #000000;">&#40;</span>nFichero<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">Enddo</span><br /> </div>[/code:t0owhm45] He colgado el fichero conteniendo el correo a procesar ([url:t0owhm45]http&#58;//www&#46;sigev&#46;com/email_354&#46;eml[/url:t0owhm45]) por si alguno tenéis más experiencia con estos temas. Muchas gracias.
A vueltas con zip
Por mas vueltas que le llevo dadas al tema no consigo hacer uso de las funciones para crear ficheros comprimidos ZIP.¿ Sería alguein tan amable de ponerme un pequeño ejemplo que le funcione, así como las librerías harbour que hay que enlazar? Muchisimas gracias y un saludo José Luis
A vueltas con zip
Groiss... dale un vistazo el blog de biel <!-- m --><a class="postlink" href="http://bielsys.blogspot.com/">http://bielsys.blogspot.com/</a><!-- m --> (gracias biel)
A vueltas con zip
Daniel, a ese blog ya llegué hace tiempo, y sigo igual, me revise todo o casi todo lo que hay en estos foros y sigo igual. Fíjate un PRG con sólo esta línea den el programa HB_zipfile("C:\BASES\salida\files.zip","C:\BASES\salida\BOOKPROV.EXE") Me produce un zip con el nombre files.zip de tamaño 0 bytes, sin nada en su interior. Las rutas esán comprobadas, pero algo me falla. Las librerias que enlazo: [code=fw:38f70quh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib + >> b32.bc<br />echo %hdirl%\hbrtl.lib + >> b32.bc<br />echo %hdirl%\hbvm.lib + >> b32.bc<br />echo %hdirl%\%GT%.lib + >> b32.bc<br />echo %hdirl%\hblang.lib + >> b32.bc<br />echo %hdirl%\hbmacro.lib + >> b32.bc<br />echo %hdirl%\hbrdd.lib + >> b32.bc<br />echo %hdirl%\rddntx.lib + >> b32.bc<br />echo %hdirl%\rddcdx.lib + >> b32.bc<br />echo %hdirl%\rddfpt.lib + >> b32.bc<br />echo %hdirl%\dbfcdx.lib + >> b32.bc<br />echo %hdirl%\hbsix.lib + >> b32.bc<br />echo %hdirl%\hbdebug.lib + >> b32.bc<br />echo %hdirl%\hbcommon.lib + >> b32.bc<br />echo %hdirl%\hbpp.lib + >> b32.bc<br />echo %hdirl%\hbcpage.lib + >> b32.bc<br />echo %hdirl%\hbwin.lib + >> b32.bc<br />echo %hdirl%\hbziparch.lib + >> b32.bc<br />echo %hdirl%\hbzlib.lib + >> b32.bc<br />&nbsp;</div>[/code:38f70quh] Así que no se que puede suceder. Un saludo y mil gracias José Luis
A vueltas con zip
Dear Mr.Jose, To create a zip [code=fw:su5a8zvl]<div class="fw" id="{CB}" style="font-family: monospace;">lOk := hb_ZipFile<span style="color: #000000;">&#40;</span> cTarget  , ;<br />                          aFiles , ;<br />                          nCompress , ;<br />                          bZip  , ;<br />                          lOverwrite , ;           <span style="color: #B900B9;">// overwrite</span><br />                          cPassword  , ;<br />                          lWithPath,;               <span style="color: #B900B9;">// with path</span><br />                          lWithDrive  <span style="color: #000000;">&#41;</span><br /> </div>[/code:su5a8zvl] Try as given below [code=fw:su5a8zvl]<div class="fw" id="{CB}" style="font-family: monospace;">HB_zipfile<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\B</span>ASES<span style="color: #000000;">\s</span>alida<span style="color: #000000;">\f</span>iles.zip"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\B</span>ASES<span style="color: #000000;">\s</span>alida<span style="color: #000000;">\B</span>OOKPROV.EXE"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span></div>[/code:su5a8zvl] If you need to store the file path, then try [code=fw:su5a8zvl]<div class="fw" id="{CB}" style="font-family: monospace;">HB_zipfile<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\B</span>ASES<span style="color: #000000;">\s</span>alida<span style="color: #000000;">\f</span>iles.zip"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\B</span>ASES<span style="color: #000000;">\s</span>alida<span style="color: #000000;">\B</span>OOKPROV.EXE"</span><span style="color: #000000;">&#125;</span>, , , , ,.T., <span style="color: #000000;">&#41;</span></div>[/code:su5a8zvl] Regards Anser
A vueltas con zip
Veamos: cFilZip := "archivo.zip" aFiles := {..............} // array que contiene los nombres de los files a zipear cPass := <contraseña> lOk := HB_ZipFile( cFilZip, aFiles, 9, {|| oMeter2:Set(nRow++)} ,.T., cPass, .F., .F. ) 9 indica el nivel de compresion, y veras que hay un codeblock para ver el avance en un METER Salu2
A vueltas con zip
Muy agradecido a todos, pero cuando he abierto el hilo, es porque todo lo tengo visto y leido, pero por alguna extrañisima circunstancia, mis zip se quedan en 0 kb, y sin nada dentro, y el ejecutable termina de forma anómala. No he comentado que estoy trabajando con Harbour versión 2.0, pero con la beta anterior tampoco me funcionaba. No se cual puede ser el problema. Muchas gracias y un saludo José Luis
A vueltas con zip
Alguien podría enlazarme este código y colgarme su exe correspondiente, para ver si funciona en mi equipo? Gracias y un saludo José Luis [code=fw:3kf5tsfw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />HB_zipfile<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\B</span>ASES<span style="color: #000000;">\s</span>alida<span style="color: #000000;">\f</span>iles.zip"</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\B</span>ASES<span style="color: #000000;">\s</span>alida<span style="color: #000000;">\B</span>OOKPROV.EXE"</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:3kf5tsfw]
A vueltas con zip
José Luís, Te envío a tu correo el ejemplo compilado, funciona bien. Recuerdos. Andrés
A vueltas con zip
Muchisimas gracias, funciona perfecto, pero la que compilo y enlazo yo, no va ni a tiros, ¿podrías indicarme que buildh.bat estas usando?. Gracias nuevamente y un saludo José Luis
A vueltas con zip
José Luís, Aquí te pongo el codigo de mi BuildH.bat [code=fw:1cucc11b]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ECHO OFF<br />CLS<br />ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿<br />ECHO ³ FiveWin <span style="color: #00C800;">for</span> Harbour <span style="color: #000000;">9.05</span> - May. <span style="color: #000000;">2009</span>            Harbour development <span style="color: #0000ff;">power</span>  ³Ü<br />ECHO ³ <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> FiveTech, <span style="color: #000000;">1993</span><span style="color: #000000;">-2009</span>     <span style="color: #00C800;">for</span> Microsoft Windows 9X/NT/200X/ME/XP/Vista/<span style="color: #000000;">7</span> ³Û<br />ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ<br />ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß<br /><br /><span style="color: #00C800;">if</span> A%<span style="color: #000000;">1</span> == A GOTO :<span style="color: #000000;">SINTAX</span><br /><span style="color: #00C800;">if</span> NOT EXIST %<span style="color: #000000;">1</span>.prg GOTO :<span style="color: #000000;">NOEXIST</span><br /><br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%FWDIR%"</span> == <span style="color: #ff0000;">""</span> set FWDIR=c:\fwh<br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%HBDIR%"</span> == <span style="color: #ff0000;">""</span> set HBDIR=c:\harbour<br /><span style="color: #00C800;">if</span> <span style="color: #ff0000;">"%2"</span> == <span style="color: #ff0000;">"/b"</span> set GT=gtwin<br /><span style="color: #00C800;">if</span> not <span style="color: #ff0000;">"%2"</span> == <span style="color: #ff0000;">"/b"</span> set GT=gtgui<br /><br />ECHO Compiling...<br /><br />set hdir=%HBDIR%<br />set hdirl=%hdir%\lib<br />set fwh=%FWDIR%<br />set bcdir=c:\bcc55<br /><br />%hdir%\bin\harbour %<span style="color: #000000;">1</span> /n /i%fwh%\include;%hdir%\include /w /p %<span style="color: #000000;">2</span> %<span style="color: #000000;">3</span> > comp.log<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO COMPILEERRORS<br />@type comp.log<br /><br />echo -O2 -e%<span style="color: #000000;">1</span>.exe -I%hdir%\include -I%bcdir%\include %<span style="color: #000000;">1</span>.c > b32.bc<br />%bcdir%\bin\bcc32 -M -c @b32.bc<br />:<span style="color: #000000;">ENDCOMPILE</span><br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.rc %bcdir%\bin\brc32 -r %<span style="color: #000000;">1</span><br />rem <span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.rc %vcdir%\bin\rc -r -d__FLAT__ %<span style="color: #000000;">1</span><br /><br />echo %bcdir%\lib\c0w32.obj + > b32.bc<br />echo %<span style="color: #000000;">1</span>.obj, + >> b32.bc<br />echo %<span style="color: #000000;">1</span>.exe, + >> b32.bc<br />echo %<span style="color: #000000;">1</span>.map, + >> b32.bc<br />echo %hdirl%\hbZipArc.lib + >> b32.bc<br />echo %hdirl%\hbmzip.lib + >> b32.bc<br />echo %hdirl%\hbzlib.lib + >> b32.bc<br />echo %fwh%\lib\FiveH.lib %fwh%\lib\FiveHC.lib + >> b32.bc<br />echo %hdirl%\hbrtl.lib + >> b32.bc<br />echo %hdirl%\hbvm.lib + >> b32.bc<br />echo %hdirl%\%GT%.lib + >> b32.bc<br />echo %hdirl%\hblang.lib + >> b32.bc<br />echo %hdirl%\hbmacro.lib + >> b32.bc<br />echo %hdirl%\hbrdd.lib + >> b32.bc<br />echo %hdirl%\rddntx.lib + >> b32.bc<br />echo %hdirl%\rddcdx.lib + >> b32.bc<br />echo %hdirl%\rddfpt.lib + >> b32.bc<br />echo %hdirl%\hbsix.lib + >> b32.bc<br />echo %hdirl%\hbdebug.lib + >> b32.bc<br />echo %hdirl%\hbcommon.lib + >> b32.bc<br />echo %hdirl%\hbpp.lib + >> b32.bc<br />echo %hdirl%\hbcpage.lib + >> b32.bc<br />echo %hdirl%\hbwin.lib + >> b32.bc<br /><br />rem Uncomment these two lines <span style="color: #0000ff;">to</span> use Advantage RDD<br />rem echo %hdirl%\rddads.lib + >> b32.bc<br />rem echo %hdirl%\Ace32.lib + >> b32.bc<br /><br />echo %bcdir%\lib\cw32.lib + >> b32.bc<br />echo %bcdir%\lib\uuid.lib + >> b32.bc<br />echo %bcdir%\lib\import32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc<br />echo %bcdir%\lib\psdk\rasapi32.lib, >> b32.bc<br /><br /><span style="color: #00C800;">IF</span> EXIST %<span style="color: #000000;">1</span>.res echo %<span style="color: #000000;">1</span>.res >> b32.bc<br /><span style="color: #00C800;">if</span> %GT% == gtwin %bcdir%\bin\ilink32 -Tpe -s @b32.bc<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br /><span style="color: #00C800;">if</span> %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s @b32.bc<br /><span style="color: #00C800;">IF</span> ERRORLEVEL <span style="color: #000000;">1</span> GOTO LINKERROR<br />ECHO * Application successfully built *<br />%<span style="color: #000000;">1</span><br />GOTO EXIT<br />ECHO<br /><br />rem delete temporary files<br />@del %<span style="color: #000000;">1</span>.c<br /><br />:<span style="color: #000000;">COMPILEERRORS</span><br />@type comp.log<br />ECHO * Compile errors *<br /><span style="color: #00C800;">Pause</span><br />GOTO EXIT<br /><br />:<span style="color: #000000;">LINKERROR</span><br />ECHO * Linking errors *<br /><span style="color: #00C800;">Pause</span><br />GOTO EXIT<br /><br />:<span style="color: #000000;">SINTAX</span><br />ECHO    SYNTAX: <span style="color: #000000;">Build</span> <span style="color: #000000;">&#91;</span>Program<span style="color: #000000;">&#93;</span>     <span style="color: #000000;">&#123;</span>-- No especifiques la extensi¢n PRG<br />ECHO                                <span style="color: #000000;">&#123;</span>-- Don<span style="color: #ff0000;">'t specify .PRG extension<br />Pause<br />GOTO EXIT<br /><br />:NOEXIST<br />ECHO The specified PRG %1 does not exist<br />Pause<br />:EXIT<br /></span></div>[/code:1cucc11b] Espero que te sirva. Recuerdos, Andrés
A vueltas con zip
Muchisimas gracias. Problema resuelto, bastó con cambiar el ordern de proceso de las librerías, porniendo: hbziparc.lib hbmzip.lib hbzlib.lib antes de las propias de Fivewin. Un saludo José Luis
A way to calculate a same Button-Size for Source/Resource ?
Hello, It is the same question I asked in another post. Now I can explain better my problem. A Button-Tool-Download-Version 1.1, with activated SETUP to change Dialog-Backgrounds ( Color, Gradient, Brushes and Image ) and Button-Bmp's and Size. <!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/btntools2.zip">http://www.pflegeplus.com/fw_downloads/btntools2.zip</a><!-- m --> ( 2.0 MB ) It is a version, You can test settings. The Source-Creator will be ready in the next Version. You don't need to close any Dialogs with the exit button. I click on a Button-bar-button does automaticly the needed Action ( close active Dialog ). To open a Preview twice, is also disabled. Maybe You can give me some ideas, to make it still better ? The next Version will include some nice BMP Button-Sets. Example : From Source : Button-Size 65 x 40 is Resized to a new Size : 50 x 30 The Preview must show the same Size from Source and Resource. To do this, I had to calculate the Button-Size with a Factor of 2, to show the same Size from Resource. On my Computer, the Result is OK. I'm not shure, if the result will be different on other Computers. Maybe also different fonts, defined in Dialogs, can show different Results ? Defined Button-Size for Source W_BUTTONV := 40 W_BUTTONH := 65 To show the same Size from Resource : ACTIVATE DIALOG oDlg3 CENTERED NOWAIT ; ON INIT ( oDlg3:Move( 100, 470, 430, 290, .f. ), DisableX(oDlg3, .T.), ; oBtn1:SetSize( W_BUTTONH [color=#FF0000:yes87r5u]* 2[/color:yes87r5u], W_BUTTONV [color=#FF0000:yes87r5u]* 2[/color:yes87r5u], .T. ), ; oBtn2:SetSize( W_BUTTONH * 2, W_BUTTONV * 2, .T. ), ; oBtn3:SetSize( W_BUTTONH * 2, W_BUTTONV * 2, .T. ), ; oBtn4:SetSize( W_BUTTONH * 2, W_BUTTONV * 2, .T. ), ; oBtn5:SetSize( W_BUTTONH * 2, W_BUTTONV * 2, .T. ), ; oBtn6:SetSize( W_BUTTONH * 2, W_BUTTONV * 2, .T. ) ) The Original-Button-Size 65 x 40 [img:yes87r5u]http&#58;//www&#46;pflegeplus&#46;com/pictures/Butresize1&#46;jpg[/img:yes87r5u] Define a new Button-Size in Setup-Section 50 x 30 [img:yes87r5u]http&#58;//www&#46;pflegeplus&#46;com/pictures/Butresize2a&#46;jpg[/img:yes87r5u] The Result with new Button-Size 50 x 30 [img:yes87r5u]http&#58;//www&#46;pflegeplus&#46;com/pictures/Butresize3&#46;jpg[/img:yes87r5u] Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
A web chat developed with mod_harbour
Live demo: [url:3atxha2g]https&#58;//www&#46;modharbour&#46;org/modharbour_samples/chat/chat&#46;prg[/url:3atxha2g] Full source code: [url:3atxha2g]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/blob/master/samples/chat/chat&#46;prg[/url:3atxha2g] Enjoy it and join the Harbour for the web revolution <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
A web chat developed with mod_harbour
Hello, We don't always have the resources to develop everything ideally. But since I need a login so that we can work with the mod harbour chat, I simply integrated lailton's login prg from the mod harbor samples into Antonio's new chat program. [img:jmqniflx]https&#58;//mybergland&#46;com/fwforum/chatlogin&#46;gif[/img:jmqniflx] [code=fw:jmqniflx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">static</span> cUserName<br /><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> hCookies <br />   <br /><br />   hCookies := GetCookies<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> hb_HHasKey<span style="color: #000000;">&#40;</span> hCookies, <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#41;</span> .and. ! Empty<span style="color: #000000;">&#40;</span> hCookies<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />      cUserName = hCookies<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#93;</span><br />   <span style="color: #00C800;">else</span><br />      cUserName = <span style="color: #ff0000;">"guest"</span> <br />   <span style="color: #00C800;">endif</span><br />  <br />  <br />   <span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span>cUserName<span style="color: #000000;">&#41;</span> < <span style="color: #000000;">8</span><br />      ?  <span style="color: #ff0000;">'"<meta http-equiv="Refresh" content="0; url=formok.prg" />'</span><br />   <span style="color: #00C800;">else</span><br />      logging<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ok"</span> <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #00C800;">endif</span> <br /><br /> </div>[/code:jmqniflx]
A web chat developed with mod_harbour
Hello, Now I can select the database which is used. Best regards Otto [url:2rijdy73]https&#58;//winhotel&#46;space/harbourino/html/chat_allg&#46;html[/url:2rijdy73] mod harbour samples are here: [url:2rijdy73]https&#58;//github&#46;com/FiveTechSoft/mod_harbour/tree/master/samples[/url:2rijdy73] [code=fw:2rijdy73]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />setcookie in form.prg<br /><span style="color: #00C800;">function</span> page_home<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cCookie := &nbsp;cUserName + <span style="color: #ff0000;">'#'</span> + &nbsp;cStatus<br />&nbsp; &nbsp; logging<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"vor cookie "</span> + cStatus <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; SetCookie<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'mylivechat'</span>, cCookie, <span style="color: #000000;">600</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; HTML<br /><br /><br />getcookie in chat.prg<br /><br /><span style="color: #00C800;">static</span> cUserName, cRequest<br /><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aRequest<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hCookies <br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cDatabase := <span style="color: #ff0000;">"chat"</span><br />&nbsp; &nbsp;<br /><br />&nbsp; &nbsp;hCookies := GetCookies<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;logging<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"auslesen "</span> + ValToChar<span style="color: #000000;">&#40;</span> hCookies <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;logging<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"auslesen "</span> + ValToChar<span style="color: #000000;">&#40;</span> AP_Args<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> hb_HHasKey<span style="color: #000000;">&#40;</span> hCookies, <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#41;</span> .and. ! Empty<span style="color: #000000;">&#40;</span> hCookies<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cUserName = hCookies<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; cRequest := hCookies<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"mylivechat"</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; logging<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cRequest"</span> + cRequest<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #ff0000;">"#"</span> $ cRequest<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRequest = hb_aTokens<span style="color: #000000;">&#40;</span> cRequest, <span style="color: #ff0000;">"#"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cUserName = aRequest<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cDatabase = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aRequest <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">1</span>, aRequest<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, <span style="color: #ff0000;">"chatdefault"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;logging<span style="color: #000000;">&#40;</span> cUserName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;logging<span style="color: #000000;">&#40;</span> cDatabase <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span> &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cUserName = <span style="color: #ff0000;">"guest"</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:2rijdy73]
A web chat developed with mod_harbour
Intro Chat Software [url:u4sdzg2r]https&#58;//mybergland&#46;com/fwforum/chatsoftwareintro&#46;mp4[/url:u4sdzg2r]
A web chat developed with mod_harbour
Hello, this first part of the video series shows how to easily integrate an HTML program into a mod harbor program. Target group of these instructions are harbor programmers who take the first steps towards internet programming. Best regards, Otto [url:11w51ysi]https&#58;//mybergland&#46;com/fwforum/part1&#46;mp4[/url:11w51ysi]
A web chat developed with mod_harbour
New! Part 3 - video chat software directory/hash [url:1tz9zmja]https&#58;//mybergland&#46;com/fwforum/managerchat3&#46;mp4[/url:1tz9zmja]
A web chat developed with mod_harbour
Hello, after some time I worked again on chat manager. Who is using mod harbour chat? Best regards, Otto Select DBF file you would like to chat. [code=fw:1o4oidoz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><script><br />  <span style="color: #0000ff;">var</span> object=<?prg <span style="color: #00C800;">return</span> hb_jsonEncode<span style="color: #000000;">&#40;</span> hMsgBoxes, .T. <span style="color: #000000;">&#41;</span>?>;<br />  <span style="color: #0000ff;">var</span> nMsgBoxes = <?prg <span style="color: #00C800;">return</span> hb_jsonEncode<span style="color: #000000;">&#40;</span> nMsgBoxes, .T. <span style="color: #000000;">&#41;</span> ?> + <span style="color: #000000;">1</span>;<br />  <span style="color: #0000ff;">var</span> i;<br />  <span style="color: #0000ff;">var</span> cKey =  <span style="color: #000000;">1</span>;<br />  <br />  <span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000;">1</span>; i < nMsgBoxes ; i++<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />          cKey =  i ;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<div class="link-container">'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<a class="list-group-item list-group-item-action active text-white rounded-0" href="index.prg?call='</span> + object<span style="color: #000000;">&#91;</span> cKey.toString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"_database"</span><span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">'">'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<div class="media"><img src="https://mdbootstrap.com/img/Photos/Avatars/img('</span> +   cKey.toString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">').jpg" alt="user" width="50" class="rounded-circle">'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<div class="media-body ml-4">'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<div class="d-flex align-items-center justify-content-between mb-1">'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<h6 class="mb-0">'</span> + object<span style="color: #000000;">&#91;</span> cKey.toString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"_database"</span><span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">'</h6><small class="small font-weight-bold">'</span> + object<span style="color: #000000;">&#91;</span> cKey.toString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"_date"</span> <span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">'</small>'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'</div>'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'<p class="font-italic mb-0 text-small">'</span> + object<span style="color: #000000;">&#91;</span> cKey.toString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"_datetime"</span> <span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">'</p>'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'</div>'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'</div>'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'</a>'</span><span style="color: #000000;">&#41;</span>;<br />          document.write<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'</div>'</span><span style="color: #000000;">&#41;</span>;<br />          <span style="color: #000000;">&#125;</span> ;  <br />          <br /></script><br /> </div>[/code:1o4oidoz] [img:1o4oidoz]https&#58;//mybergland&#46;com/fwforum/chat3&#46;jpg[/img:1o4oidoz]
A web chat developed with mod_harbour
Chat Manager now updates the input of the various chat clients with AJAX [img:3vlednss]https&#58;//mybergland&#46;com/fwforum/chatmanager&#46;gif[/img:3vlednss]
A window with a metafile
I want create a metafile into a window but it not found oDevice and nHorzRes() and nVertRes() How I can create it on a window ? this my test [code:3ouhf57d] Function test&#40;&#41; Local oWnd,oTest DEFINE WINDOW oWnd COLOR CLR_BLACK, CLR_HGRAY ; VSCROLL HSCROLL oTest&#58;=TMetaFile&#40;&#41;&#58;New&#40; 0,0,0,0,"",; oWnd,CLR_BLACK,CLR_WHITE,oDevice&#58;nHorzRes&#40;&#41;,; oDevice&#58;nVertRes&#40;&#41; &#41; ACTIVATE WINDOW oWnd [/code:3ouhf57d]
A xBrowse index-header-problem with multiple open files.
Hello, I have a xBrowse-problem on header-click to activate the index I open 7 files and switch between them with a radio-change. I created the index like : [code=fw:3q6c1wu0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">7</span><br />   X := LTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>I<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">IF</span> NET_USE <span style="color: #000000;">&#40;</span> c_Path + <span style="color: #ff0000;">"SAMPLES&X"</span> + <span style="color: #ff0000;">".DBF"</span>, <span style="color: #ff0000;">"SAMPLES&X"</span>, <span style="color: #000000;">3</span>,.F. <span style="color: #000000;">&#41;</span> = .T. <span style="color: #B900B9;">// own network function</span><br />       FW_CdxCreate<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ELSE</span><br />       <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Netork ERROR"</span>, <span style="color: #ff0000;">"SAMPLES&X.dbf"</span> <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDIF</span>   <br /><span style="color: #00C800;">NEXT</span><br /> </div>[/code:3q6c1wu0] The filechange ( DBSELECTAREA ) works fine and is tested with the function ORDERBAGNAME() the index is included automaticly with the filename. Maybe something wrong with xBrowse using [color=#0000FF:3q6c1wu0]ALIAS cFileName[/color:3q6c1wu0] index not detected ? The xBrowse headers are showing the up / down arrows that a index exists but doesn't always work.. @ 10,20 XBROWSE oBrw SIZE 580, -75 PIXEL OF oDlg ; COLUMNS "TOPICNO", "FORUM", "LIKE", "T_DELETE", "DATE", "AUTHOR", "INFO" ; COLSIZES 50, 60, 45, 45, 70, 120, 110 ; HEADERS "No.", "Forum", "Like", "Del.", "Date", "Author", "Filter or Info" ; AUTOSORT LINES NOBORDER FONT oMono ; [color=#0000FF:3q6c1wu0]ALIAS cFileName[/color:3q6c1wu0] UPDATE // cFilename = SAMPLES1.dbf - SAMPLES7.dbf [img:3q6c1wu0]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Forum28&#46;jpg[/img:3q6c1wu0] changing the file to be displayed with radiochange works fine but the xBrowse header-click doesn't work ( only at startup for the 1. file ) any idea <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
A xBrowse index-header-problem with multiple open files.
Some more tests : I added DBF-name and Index-name infos to the header to be sure the selected workarea is used. The index-selection in xBrowse works only at startup- After a file change the arrows up / down are shown but do not work anymore. There is a selected working area and index !!! Because I don't want to play around with the original I created a extra solution reduced to the minimum to test [b:1ps4q3cn]The todolist[/b:1ps4q3cn] [color=#FF0000:1ps4q3cn]1. the connection to a different forum not only the english 2. the xBrowse index on header click 3. highlighted keywords inside the source-text [/color:1ps4q3cn] [color=#0000FF:1ps4q3cn]the source is included to make the needed changes[/color:1ps4q3cn] Download <!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Forum3.zip">http://www.pflegeplus.com/DOWNLOADS/Forum3.zip</a><!-- m --> [img:1ps4q3cn]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Forum29&#46;jpg[/img:1ps4q3cn] I also tested / changed : [color=#0000FF:1ps4q3cn]// ALIAS cFilename UPDATE[/color:1ps4q3cn] @ 10,20 XBROWSE oBrw SIZE 580, -80 PIXEL OF oDlg ; COLUMNS "TOPICNO", "FORUM", "LIKE", "T_DELETE", "DATE", "AUTHOR", "INFO" ; COLSIZES 50, 60, 45, 45, 70, 120, 110 ; HEADERS "No.", "Forum", "Like", "Del.", "Date", "Author", "Filter or Info" ; AUTOSORT LINES NOBORDER FONT oMono ; [color=#0000FF:1ps4q3cn][b:1ps4q3cn]ALIAS ORDBAGNAME("TOPICNO") UPDATE[/b:1ps4q3cn][/color:1ps4q3cn] // returns the indexname ( the filename is the same returned from DBF() ) NO difference ! Inside the filechange-function and new DBFSELECTAREA the following is included to define the new xBrowse-alias. [color=#0000FF:1ps4q3cn]oBrw:cAlias := Alias()[/color:1ps4q3cn] same result : [color=#0000FF:1ps4q3cn]oBrw:cAlias := ORDBAGNAME("TOPICNO"), oBrw:Refresh(), ; // Alias()[/color:1ps4q3cn] regards Uwe <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
A xBrowse-problem using public defined fonts ?
Hello, I noticed a problem using PUBLIC defined fonts in xbrowse. [color=#0000FF:8yk7ubye][b:8yk7ubye]oBrw:oFont := oSysFont1 [/b:8yk7ubye][/color:8yk7ubye] the following happens 1. oSysFont1 is defined as PUBLIC 2. using this font in xBrowse, it seems the font is closed as well leaving the dialog. 3. After that, everywhere this font is shown as systemfont Creating a extra font for xBrowse, there is no problem any idea ? best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
A xBrowse-problem using public defined fonts ?
Uwe You are tried? [b:3i7qnmin]oBrw:SetFont( oSysFont1 )[/b:3i7qnmin]
A xBrowse-problem using public defined fonts ?
Cristobal, Thank You very much. it seems to be OK as well it doesn' happen using oCol:oDataFont := oSysfont1 oCol:oHeaderFont := oSysfont1 best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xBrowse-problem using public defined fonts ?
We should not assigned to control the font like this: [color=#FF0000:2dvw8hnj]oCtrl:oFont := oNewFont[/color:2dvw8hnj] so it is correct [color=#000040:2dvw8hnj][b:2dvw8hnj]oCtrl:SetFont( oNewFont )[/b:2dvw8hnj][/color:2dvw8hnj]
A xBrowse-problem using public defined fonts ?
I had also the problem! ::setfont() is the solution! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Uwe, how do you assign the font with setfont() to oCol:oHeaderfont??
A xBrowse-problem using public defined fonts ?
Günther, in sample TestXbr5.prg oHeaderfont is defined like WITH OBJECT oBrw:oCol( "Age" ) [color=#0000FF:2xj7jjzq][b:2xj7jjzq]:oHeaderFont := oVFont[/b:2xj7jjzq][/color:2xj7jjzq] // defined font of a selected column :cHeader := "Age Of Employee" :AddBmpFile( '..\bitmaps\attach.bmp' ) :nHeadBmpNo := 1 END that was the reason I used : oBrw:oFont := oSysFont1 best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xBrowse-problem using public defined fonts ?
oCol: .... fonts are to be simply assigned. eg: oCol:xxxfont := oMyFont We need to release the font after done with. This is the thumb-rule: For controls use oCtrl:SetFont( oFont ) for other classes, use oObj:oFont := oMyFont
A xBrw-sample how to compare filesections ( statistic )
Hello, working on a statistic-section I created a sample using file customer.dbf [color=#0000FF:2tjmhivx]REQUIREMENTS : A xBrowse splitted in 3 horizontal sections a filter ( range ) for each section incremental seek inside each section columns must run synchron only one header and one horizontal-scrollbar[/color:2tjmhivx] now I can compare the different sections using just one browser, it is not possible. As well splitting a big file in 3 pieces. maybe something useful <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> [img:2tjmhivx]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Compare1&#46;jpg[/img:2tjmhivx] [code=fw:2tjmhivx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> FUNCTIONS10<span style="color: #000000;">&#40;</span> oSystem, nColorF <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oFont, oFont1, oFontG, oBrw1, oBrw2, oBrw3, oSay<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">LOCAL</span> oGet,  oBtn1, oTabs1<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Segoe UI Light"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-24</span><br /><br />c_path := cFilePath<span style="color: #000000;">&#40;</span>GetModuleFileName<span style="color: #000000;">&#40;</span> GetInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <br />c_path1 := c_path + <span style="color: #ff0000;">"BITMAPS<span style="color: #000000;">\"</span><br />aValues := READ_INI1(c_path)<br /><br />oCust := TDatabase():Open( , "</span>CUSTOMER<span style="color: #ff0000;">", "</span>DBFCDX<span style="color: #ff0000;">", .T. )<br />// CreateIndex(                cFile,              cTag,                         cKey,         lUnique, lDescend, lMemory )<br />oCust:CreateIndex( "</span>CUSTOMER<span style="color: #ff0000;">", "</span>CUST1<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", .F. )<br />oCust:Close()<br /><br />oCust1 := TDatabase():Open( , "</span>CUSTOMER<span style="color: #ff0000;">", "</span>DBFCDX<span style="color: #ff0000;">", .T. )<br />oCust1:SetOrder( "</span>CUST1<span style="color: #ff0000;">", "</span>Customer<span style="color: #ff0000;">" )<br /><br />oCust2 := TDatabase():Open( , "</span>CUSTOMER<span style="color: #ff0000;">", "</span>DBFCDX<span style="color: #ff0000;">", .T. )<br />oCust2:SetOrder( "</span>CUST1<span style="color: #ff0000;">", "</span>Customer<span style="color: #ff0000;">" )<br /><br />oCust3 := TDatabase():Open( , "</span>CUSTOMER<span style="color: #ff0000;">", "</span>DBFCDX<span style="color: #ff0000;">", .T. )<br />oCust3:SetOrder( "</span>CUST1<span style="color: #ff0000;">", "</span>Customer<span style="color: #ff0000;">" )<br /><br />DEFINE DIALOG oDlg  SIZE 850, 520 PIXEL TRUEPIXEL ;<br />TITLE "</span>Compare <span style="color: #00C800;">data</span><span style="color: #ff0000;">" ;<br />COLOR CLR_BLACK, aValues[1] // 14606046<br /><br />// ---- 1. section -----<br /><br />oCust1:ORDSCOPE(0, NIL ) // reset <br />oCust1:ORDSCOPE(1, NIL ) // reset <br />oCust1:ORDSCOPE(0, 20 ) // set top scope<br />oCust1:ORDSCOPE(1, 40 ) // set bottom scope<br />oCust1:GoTop()<br /><br />@ 10, 20 XBROWSE oBrw1 SIZE 690, 170 PIXEL OF oDlg ;<br />DATASOURCE oCust1 ;<br />AUTOSORT FOOTERS ;<br />COLUMNS "</span>First<span style="color: #ff0000;">", "</span>Last<span style="color: #ff0000;">", "</span>State<span style="color: #ff0000;">", "</span>City<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">", "</span>Married<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">" ;<br />HEADERS "</span>First<span style="color: #ff0000;">","</span>Last<span style="color: #ff0000;">", "</span>State<span style="color: #ff0000;">", "</span>City<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">", "</span>Married<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">" ;<br />COLSIZES 80, 115, 50, 130, 50, 80, 50, 80  <br /><br />oBrw1:nMarqueeStyle     := MARQSTYLE_HIGHLCELL<br />oBrw1:nColDividerStyle      := LINESTYLE_BLACK<br />oBrw1:nRowDividerStyle  := LINESTYLE_BLACK<br /><br />WITH OBJECT oBrw1<br />    :lHeader                := .T.<br />        :nHeaderHeight      := 26<br />    :lFooter                := .F.<br />    :lHScroll               := .F.<br />    :lSeekWild          := .T.<br />       :CreateFromCode()<br />END<br /><br />@10, 730 SAY oSay[1] PROMPT "</span>Age <span style="color: #ff0000;">" + CRLF + "</span><span style="color: #000000;">20</span> - <span style="color: #000000;">40</span><span style="color: #ff0000;">" SIZE 80, 60 OF oDlg COLOR  255 PIXEL  <br />oSay[1]:lTransparent := .T.<br />oSay[1]:SetFont(oFont1)<br /><br />@ 85, 730 SAY oBrw1:oSeek PROMPT oBrw1:cSeek SIZE 50, 20 PIXEL ;<br />OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'<br /><br />// ---- 2. section -----<br /><br />oCust2:ORDSCOPE(0, NIL ) // reset <br />oCust2:ORDSCOPE(1, NIL ) // reset <br />oCust2:ORDSCOPE(0, 41 ) // set top scope<br />oCust2:ORDSCOPE(1, 60 ) // set bottom scope<br />oCust2:GoTop()<br /><br />@ 187, 20 XBROWSE oBrw2 SIZE 690, 145 PIXEL OF oDlg ;<br />DATASOURCE oCust2 ;<br />AUTOSORT FOOTERS ;<br />COLUMNS "</span>First<span style="color: #ff0000;">", "</span>Last<span style="color: #ff0000;">", "</span>State<span style="color: #ff0000;">", "</span>City<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">", "</span>Married<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">" ;<br />HEADERS "</span>First<span style="color: #ff0000;">","</span>Last<span style="color: #ff0000;">", "</span>State<span style="color: #ff0000;">", "</span>City<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">", "</span>Married<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">" ;<br />COLSIZES 80, 115, 50, 130, 50, 80, 50, 80  <br /><br />oBrw2:nMarqueeStyle     := MARQSTYLE_HIGHLCELL<br />oBrw2:nColDividerStyle      := LINESTYLE_BLACK<br />oBrw2:nRowDividerStyle  := LINESTYLE_BLACK<br /><br />WITH OBJECT oBrw2<br />    :lHeader                := .F.<br />    :lFooter                := .F.<br />    :lHScroll               := .F.<br />    :lSeekWild          := .T.<br />       :CreateFromCode()<br />END<br /><br />@187, 730 SAY oSay[2] PROMPT "</span>Age <span style="color: #ff0000;">" + CRLF + "</span><span style="color: #000000;">41</span> - <span style="color: #000000;">60</span><span style="color: #ff0000;">" SIZE 80, 60 OF oDlg COLOR  255 PIXEL  <br />oSay[2]:lTransparent := .T.<br />oSay[2]:SetFont(oFont1)<br /><br />@ 265, 730 SAY oBrw2:oSeek PROMPT oBrw2:cSeek SIZE 50, 20 PIXEL ;<br />OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'<br /><br />// ---- 3. section -----<br /><br />oCust3:ORDSCOPE(0, NIL ) // reset <br />oCust3:ORDSCOPE(1, NIL ) // reset <br />oCust3:ORDSCOPE(0, 61 ) // set top scope<br />oCust3:ORDSCOPE(1, 90 ) // set bottom scope<br />oCust3:GoTop()<br /><br />@ 337, 20 XBROWSE oBrw3 SIZE 690, 162 PIXEL OF oDlg ;<br />DATASOURCE oCust3 ;<br />AUTOSORT FOOTERS ;<br />COLUMNS "</span>First<span style="color: #ff0000;">", "</span>Last<span style="color: #ff0000;">", "</span>State<span style="color: #ff0000;">", "</span>City<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">", "</span>Married<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">" ;<br />HEADERS "</span>First<span style="color: #ff0000;">","</span>Last<span style="color: #ff0000;">", "</span>State<span style="color: #ff0000;">", "</span>City<span style="color: #ff0000;">", "</span>Age<span style="color: #ff0000;">", "</span>Salary<span style="color: #ff0000;">", "</span>Married<span style="color: #ff0000;">", "</span>HireDate<span style="color: #ff0000;">" ;<br />COLSIZES 80, 115, 50, 130, 50, 80, 50, 80 <br /><br />oBrw3:nMarqueeStyle     := MARQSTYLE_HIGHLCELL<br />oBrw3:nColDividerStyle      := LINESTYLE_BLACK<br />oBrw3:nRowDividerStyle  := LINESTYLE_BLACK<br /><br />WITH OBJECT oBrw3<br />    :lHeader                := .F.<br />    :lFooter                := .F.<br />    :lSeekWild          := .T.<br />       :CreateFromCode()<br />END<br /><br />@337, 730 SAY oSay[3] PROMPT "</span>Age <span style="color: #ff0000;">" + CRLF + "</span><span style="color: #000000;">61</span> - <span style="color: #000000;">80</span><span style="color: #ff0000;">" SIZE 80, 60 OF oDlg COLOR  255 PIXEL  <br />oSay[3]:lTransparent := .T.<br />oSay[3]:SetFont(oFont1)<br /><br />@ 410, 730 SAY oBrw3:oSeek PROMPT oBrw3:cSeek SIZE 50, 20 PIXEL ;<br />OF oDlg COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'<br /><br /><br />oBrw1:lColChangeNotify  := .t.<br />oBrw1:bGotFocus         := { || SyncBrowses( oBrw1, oBrw2, oBrw3 ) }<br />oBrw1:bChange           := { || If( oBrw1:lFocused, SyncBrowses( oBrw1, oBrw2, oBrw3 ), nil ) }<br /><br />oBrw2:lColChangeNotify  := .t.<br />oBrw2:bGotFocus         := { || SyncBrowses( oBrw2, oBrw1, oBrw3 ) }<br />oBrw2:bChange           := { || If( oBrw2:lFocused, SyncBrowses( oBrw2, oBrw1, oBrw3 ), nil ) }<br /><br />oBrw3:lColChangeNotify  := .t.<br />oBrw3:bGotFocus         := { || SyncBrowses( oBrw3, oBrw1, oBrw2 ) }<br />oBrw3:bChange           := { || If( oBrw3:lFocused, SyncBrowses( oBrw3, oBrw1, oBrw2 ), nil ) }<br /><br /><br />@ 465, 750 BTNBMP oBtn1 OF oDlg ;<br />SIZE 80, 40 PIXEL 2007 ; // B / H<br />PROMPT "</span>&Exit<span style="color: #ff0000;">" ;<br />FILENAME c_path1 + "</span>Exit.Bmp<span style="color: #ff0000;">" ;<br />ACTION oDlg:End() ;<br />FONT oFont  ;<br />LEFT<br />oBtn1:bClrGrad = { | lMouseOver | If( ! lMouseOver,; <br />    { { 0.5, 10526975, 16777215 }, ;<br />      { 0.5, 16777215, 10526975 } }, ;<br />    { { 0.5, 16768185 , 10526975 }, ;<br />       { 0.5, 10526975, 16768185 } } ) }<br />oBtn1:cToolTip =  { "</span>Exit compare-test<span style="color: #ff0000;">","</span>EXIT<span style="color: #ff0000;">", 1, CLR_BLACK, 14089979 }<br />oBtn1:SetColor( 0, )<br /><br /> @ 500, 25 TABS oTabs1 PROMPTS "</span>&One<span style="color: #ff0000;">", "</span>&Two<span style="color: #ff0000;">", "</span>T&hree<span style="color: #ff0000;">", "</span>&Four<span style="color: #ff0000;">" OF oDlg PIXEL ;<br /> BITMAPS "</span>..\<span style="color: #0000ff;">bitmaps</span>\16x16\people.bmp<span style="color: #ff0000;">", "</span>..\<span style="color: #0000ff;">bitmaps</span>\16x16\open2.bmp<span style="color: #ff0000;">",;<br />              "</span>..\<span style="color: #0000ff;">bitmaps</span>\16x16\<span style="color: #00C800;">print</span>.bmp<span style="color: #ff0000;">", "</span>..\<span style="color: #0000ff;">bitmaps</span>\16x16\zoom2.bmp<span style="color: #ff0000;">" ;<br />ACTION oDlg:Say( 5, 5, oTabs1:nOption )<br />   <br />oDlg:oBottom = oTabs1<br />oTabs1:bRClicked = { || nil }<br /><br />ACTIVATE DIALOG oDlg CENTERED <br /><br />CLOSE DATABASE<br />RELEASE FONT oFont, oFont1<br /><br />RETURN NIL<br /><br />//------------------------------------ <br /><br />FUNCTION SYNCBROWSES( oBrw1, oBrw2, oBrw3 )<br /><br />WITH OBJECT oBrw2<br />      :nColSel      := oBrw1:nColSel<br />      :nColOffset   := oBrw1:nColOffset<br />      :Refresh()<br />END<br /><br />WITH OBJECT oBrw3<br />      :nColSel      := oBrw2:nColSel<br />      :nColOffset   := oBrw2:nColOffset<br />      :Refresh()<br />END<br /><br />RETURN NIL<br /></span></div>[/code:2tjmhivx] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xBrw-sample how to compare filesections ( statistic )
The completed sample possible to define the range for each section the download with working exe <!-- m --><a class="postlink" href="http://www.pflegeplus.com/DOWNLOADS/Compare1.zip">http://www.pflegeplus.com/DOWNLOADS/Compare1.zip</a><!-- m --> [img:p98gytpo]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Compare2&#46;jpg[/img:p98gytpo] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xbrowse question to show a section with different values
Hello, what is the best solution to show different values at the same xbrowse-section I have a fixed section with the main customer-informations and one section to be replaced showing different values on button-action. maybe a full browser using : oBrw1:MoveCol( 12, 6 ) // switch position or oBrw1:aCols[1]:Hide() / oBrw1:aCols[1]:Show() or a colum value-replacement of the section Main-data aDatT[1] := TRIM(("KUNDE")->ANREDE) aDatT[2] := TRIM(("KUNDE")->NAME) + " " + TRIM(("KUNDE")->NAME1) aDatT[3] := ("KUNDE")->ANSCHRIFT aDatT[4] := TRIM(("KUNDE")->PLZ) + " " + TRIM(("KUNDE")->ORT) aDatT[5] := ("KUNDE")->TEL_PRI [b:1qlnrwck]section replacement on button-action :[/b:1qlnrwck] in the morning [color=#00BF40:1qlnrwck]aDatT[20] := ("KUNDE")->F_TOUR aDatT[21] := ("KUNDE")->F_TIME aDatT[22] := ("KUNDE")->F_PRINT[/color:1qlnrwck] in the evening [color=#0040FF:1qlnrwck]aDatT[20] := ("KUNDE")->N_TOUR aDatT[21] := ("KUNDE")->N_TIME aDatT[22] := ("KUNDE")->N_PRINT[/color:1qlnrwck] at night [color=#FF0000:1qlnrwck]aDatT[20] := ("KUNDE")->A_TOUR aDatT[21] := ("KUNDE")->A_TIME aDatT[22] := ("KUNDE")->A_PRINT[/color:1qlnrwck] [img:1qlnrwck]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/xBrwCols1&#46;jpg[/img:1qlnrwck]
A xbrowse question to show a section with different values
Uwe, maybe, I try oBrow:aCols[05]:bStrData := <codeblock with parameter of value selected> oBrow:aCols[06]:bStrData := oBrow:aCols[07]:bStrData :=
A xbrowse question to show a section with different values
Cristobal, Yes I think a column-data replacement is the better solution I tested at startup moving columns ( works ) // "NR", "NAME1", "NAME", "SIGNAL", ; 1, 2, 3, 4 // "M_TOUR", "M_ZEIT", "M_MERKER" , ; 5, 6, 7 // "N_TOUR", "N_ZEIT", "N_MERKER", ; 8, 9, 10 // "A_TOUR", "A_ZEIT", "A_MERKER" } ; 11, 12, 13 WITH OBJECT oBrw1 // Color selection : :aCols[5]:bClrStd := {|| { 0, 917261 } } :aCols[6]:bClrStd := {|| { 0, 917261 } } :aCols[7]:bClrStd := {|| { 0, 917261 } } :aCols[8]:bClrStd := {|| { 0, 16767928 } } :aCols[9]:bClrStd := {|| { 0, 16767928 } } :aCols[10]:bClrStd := {|| { 0, 16767928 } } :aCols[11]:bClrStd := {|| { 0, 11974399 } } :aCols[12]:bClrStd := {|| { 0, 11974399 } } :aCols[13]:bClrStd := {|| { 0, 11974399 } } // the 3 options IF nSchicht = 1 // Nothing // shows :aCols[5] // shows :aCols[6] // shows :aCols[7] ENDIF IF nSchicht = 2 // Show section 2 :aCols[5]:Hide() :aCols[6]:Hide() :aCols[7]:Hide() ENDIF IF nSchicht = 3 // Show section 3 :aCols[5]:Hide() :aCols[6]:Hide() :aCols[7]:Hide() :aCols[8]:Hide() :aCols[9]:Hide() :aCols[10]:Hide() ENDIF :bChange := { || T_GET(nSchicht), oFld:aDialogs[1]:Update(), ; oDatT[12]:Refresh(), oDatT[13]:Refresh() } END but some calculations are needed on each button-action I will test You solution best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xbrowse question to show a section with different values
And with one array of colors for use with one parameter passed of codeblock and ("KUNDE")->fieldget( n ) instead of the field name Sorry my english
A xbrowse question to show a section with different values
Cristobal, thank You very much It is finished, tested and works PERFECT Column datareplacement was the best solution for this project-part best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xbrowse question to show a section with different values
Mr Uwe Method oBrw:ReArrangeCols( aCols ) is exactly meant for this purpose only. First create browse like this: @ r,c XBROWSE oBrw <clauses> ; COLUMNS ; "NR", "NAME1", "NAME", "SIGNAL", ; 1, 2, 3, 4 "M_TOUR", "M_ZEIT", "M_MERKER" , ; 5, 6, 7 "N_TOUR", "N_ZEIT", "N_MERKER", ; 8, 9, 10 "A_TOUR", "A_ZEIT", "A_MERKER" } ; 11, 12, 13 <otherClauses> AEval( oBrw:aCols, { |o| o:lHide := .t. }, 8 ) <other settings> oBrw:CreateFromCode() Button Action: if nSchicht == 1 oBrw:ReArrangeCols( { 1, 2, 3, 4, 5, 6, 7 } ) elseif nSchicht == 2 oBrw:ReArrangeCols( { 1, 2, 3, 4, 8, 9, 10 } ) else oBrw:ReArrangeCols( { 1, 2, 3, 4, 11,12,13 } ) endif
A xbrowse question to show a section with different values
Mr. Rao, thank You very much for the infos. It works fine and is much better than replacing the column-values because export to Excel will display all 3 tours. I'm still working on the final result. best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
A xbrowse question to show a section with different values
[quote:1v0bgwvc]because export to Excel will display all 3 tours.[/quote:1v0bgwvc] If you have any difficulty please let us know.
A4 dentro ad una finestra
come posso inserire un foglio a4 dentro ad una finestra e inserire lo scroll verticale e zoomare il foglio ? avete per caso un esempio ...? Grazie
AAAUXXXILIO !!!! necesito abrir este DBF
Hola, necesito abrir este dbf , segun esto es de visual fox pro, pero no estoy seguro. <!-- m --><a class="postlink" href="http://hyperupload.com/download/013e62c040/mgw.zip.html">http://hyperupload.com/download/013e62c040/mgw.zip.html</a><!-- m --> si alguien me puede ayudar se los agradeceria mucho ya que estoy atorrado en un proyecto desde hace una semana y no puedo continuar... mil gracias Rene
AAAUXXXILIO !!!! necesito abrir este DBF
Estoy intentando descargar el fichero pero se abre la pagina y no descarga nada automaticamente ni se ve nada donde decirle que lo descarge.
AAAUXXXILIO !!!! necesito abrir este DBF
garbi, te lo cabao de mandar a tu mail y tambien lo puse en este otro link <!-- m --><a class="postlink" href="http://www.mundodemotos.com/mgm.zip">http://www.mundodemotos.com/mgm.zip</a><!-- m --> gracias
AAAUXXXILIO !!!! necesito abrir este DBF
Rene: Te lo envie a tu correo, pesan 549 k entre la dbf, el campo memo en fpt y el cdx. Saludos,
AAAUXXXILIO !!!! necesito abrir este DBF
Gracias Daniel, NO me ha llegado tu correo pero yo creo que no me explique bien. Yo La necesito poder abrir la BD con FW y manupularla... en otras palabras necesito saber como le puedo hacer para trabajar con ella. Yo la puedo abriar y ver su contenido con execel y ODBC y con otro programa que se llama dbfviewer2000. Pero la necesito abrirr con un programa hehco con FW para poder trabajar con ella en el proyecto que estoy. Gracias por tu ayuda Saludos Rene
AAAUXXXILIO !!!! necesito abrir este DBF
Rene, Como te he indicado por email, tu DBF se abre bien con Harbour/xharbour.
AADD not working with GETS
[quote:26y9euqc]I'm not saying that it does not works. IT works to show the dialog the 1st time, but as the user skips from register to register the dialog does not update, it keeps the old values. [/quote:26y9euqc] No, please. It works correctly. Please re-check.
AADD not working with GETS
After noticing that a tabbed dialog only updated partially, I finally realize (5 hours later) that if I fill-up the culprit array using: [code=fw:2h4aspdz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aCalif:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />...<br />AADD<span style="color: #000000;">&#40;</span>aCalif,<span style="color: #000000;">&#123;</span>chCta, Others<span style="color: #000000;">&#91;</span>INT<span style="color: #000000;">&#40;</span>chCta+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span> ,thCta, Others<span style="color: #000000;">&#91;</span>int<span style="color: #000000;">&#40;</span>thCta+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span>, ;<br />                   <span style="color: #000000;">&#40;</span>chCta+thCta<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span>, Others<span style="color: #000000;">&#91;</span>int<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>chCta+thCta<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span>+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aCalif,<span style="color: #000000;">&#123;</span>cmCta,  mCab<span style="color: #000000;">&#91;</span>nInd<span style="color: #000000;">&#93;</span> ,tmCta, Others<span style="color: #000000;">&#91;</span>int<span style="color: #000000;">&#40;</span>tmCta+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span>, ;<br />                  <span style="color: #000000;">&#40;</span>cmCta+tmCta<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span>, Others<span style="color: #000000;">&#91;</span>int<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>cmCta+tmCta<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span>+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />...</div>[/code:2h4aspdz] it will not work in the following dialog code (will not update, although it will show the correct data for the 1st register): [code=fw:2h4aspdz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oDbf:<span style="color: #000000;">Number</span>  <span style="color: #0000ff;">ID</span> <span style="color: #000000;">301</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> READONLY <span style="color: #0000ff;">UPDATE</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"#9.99"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">FONT</span> oFuente<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>   <span style="color: #B900B9;">//cbl</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">UPDATE</span> READONLY <span style="color: #0000ff;">FONT</span> oFuente<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>   <br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"#9.99"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">FONT</span> oFuente<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>   <span style="color: #B900B9;">//tor</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">UPDATE</span> READONLY <span style="color: #0000ff;">FONT</span> oFuente<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />----</div>[/code:2h4aspdz] Things came back to normal when using this kind of assignment: [code=fw:2h4aspdz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">25</span>,<span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span><br />...<br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:=chCta<br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:=Others<span style="color: #000000;">&#91;</span>INT<span style="color: #000000;">&#40;</span>chCta+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span><br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:=thCta<br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:=Otros<span style="color: #000000;">&#91;</span>int<span style="color: #000000;">&#40;</span>thCta+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span><br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:=<span style="color: #000000;">&#40;</span>chCta+thCta<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span><br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:= Others<span style="color: #000000;">&#91;</span>int<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>chCta+thCta<span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span>+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span><br /><br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:=cm<br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:=mCab<span style="color: #000000;">&#91;</span>nInd<span style="color: #000000;">&#93;</span><br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:=tm<br />aCalif<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:=Others<span style="color: #000000;">&#91;</span>INT<span style="color: #000000;">&#40;</span>tm+.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span><span style="color: #000000;">&#93;</span><br />...</div>[/code:2h4aspdz] This is really a shame since the code changes from a compact, few-liner program, to a huge horrible monster. Is there something that can be done in the version or code? FWH 18.07 Emiliano Llano Díaz
AADD not working with GETS
Clear.
AADD not working with GETS
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36139&p=218838#p218838">viewtopic.php?f=3&t=36139&p=218838#p218838</a><!-- l -->
AADD not working with GETS
It has to work. This is a sample that works perfectly. [code=fw:31sxqb3x]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> i, j<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg<br /><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">101</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">103</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">201</span>, <span style="color: #000000;">202</span>, <span style="color: #000000;">203</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">301</span>, <span style="color: #000000;">302</span>, <span style="color: #000000;">303</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">40</span> * i, <span style="color: #000000;">100</span> * j <span style="color: #0000ff;">GET</span> aData SUBSCRIPT i,j <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">70</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RIGHT</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span> j<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span> i<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;XBROWSER aData<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:31sxqb3x] If you are still not convinced, please post a sample which we can build and test at our end.
AADD not working with GETS
I'm not saying that it does not works. IT works to show the dialog the 1st time, but as the user skips from register to register the dialog does not update, it keeps the old values. Doing it assigning values to a predefined array, on the other hand, works perfectly showing the values every time.
AADD not working with GETS
Here is a mini working example: To notice before you answer: 1. I do not use browse in this example, but my tabbed dialogs are full of them as well as lists, images, comboboxes, date fields, buttons, slide-shows, reports, Excel conversion, SQL queries, and everything else that works correctly 2. I cannot change to browse since there are zillions of discrete fields that should be fill-in by the user depending on previous answers 3. The problem is only with ARRAYS (using AADD as explained) and nothing else 4. This is an incomplete example missing a lot of functionalities only done as proof of concept. It will work to show the update problem if you place the DB and required icons (even if they do not correspond) [code=fw:lvf6n7uv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// the problem here is ONLY with GETS and SAYS using arrays</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">STATIC</span> oDlg<br />    <br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #00C800;">LOCAL</span> aData, ;<br />             oDbfC, ;<br />             aText<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br /><br />       USE clientes  <span style="color: #B900B9;">//this DB is located in the samples path of FW</span><br />       DATABASE oDbfC<br />       oDbfC:<span style="color: #000000;">LOAD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       oDbfC:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />       Load_Data<span style="color: #000000;">&#40;</span>@aData, @aText, oDbfC<span style="color: #000000;">&#41;</span><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;">800</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />       Show_Dialog<span style="color: #000000;">&#40;</span>aData, aText, oDbfC<span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span><span style="color: #00C800;">self</span><span style="color: #000000;">&#41;</span>, ;<br />                Main_bar<span style="color: #000000;">&#40;</span>@aData, @aText, oDbfC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE Show_Dialog<span style="color: #000000;">&#40;</span>aData, aText, oDbfC<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">LOCAL</span> i, j<br />*? HB_valtoExp<span style="color: #000000;">&#40;</span>aData<span style="color: #000000;">&#41;</span>        <br />       <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />          <span style="color: #00C800;">FOR</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />             @ <span style="color: #000000;">40</span> * i, <span style="color: #000000;">200</span> * j <span style="color: #0000ff;">GET</span> aData SUBSCRIPT i,j <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />          <span style="color: #00C800;">NEXT</span> j<br />       <span style="color: #00C800;">NEXT</span> i<br />       <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />          <span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />             @ <span style="color: #000000;">150</span>+ <span style="color: #000000;">&#40;</span><span style="color: #000000;">40</span> * i<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">200</span> * j <span style="color: #0000ff;">GET</span> aText SUBSCRIPT i,j <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />          <span style="color: #00C800;">next</span> j<br />       <span style="color: #00C800;">next</span> i<br /><span style="color: #00C800;">RETURN</span><br /><br />************  Fill arrays as needed **********<br /><span style="color: #00C800;">STATIC</span> PROCEDURE Load_Data<span style="color: #000000;">&#40;</span>aData, aText, oDbfC <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">LOCAL</span> i<br /><br />  aData:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />     AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> oDbfC:<span style="color: #000000;">Nombre</span>, oDbfC:<span style="color: #000000;">Direccion</span>, oDbfC:<span style="color: #000000;">Telefono</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />     oDbfC:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i   <br /><br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />     aText<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:=oDbfC:<span style="color: #000000;">Nombre</span><br />     aText<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:=oDbfC:<span style="color: #000000;">Direccion</span><br />     aText<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:=oDbfC:<span style="color: #000000;">Telefono</span><br />     oDbfC:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i   <br /><br /><span style="color: #00C800;">RETURN</span><br /><br />***** Create <span style="color: #0000ff;">button</span> bar <span style="color: #000000;">&#40;</span>use any <span style="color: #0000ff;">image</span> just <span style="color: #0000ff;">to</span> ilustrate the point<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">STATIC</span> PROCEDURE Main_bar<span style="color: #000000;">&#40;</span>aData, aText, oDbfC<span style="color: #000000;">&#41;</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oBar, oBtn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>,<span style="color: #000000;">30</span> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar ;<br />        FILE <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>cons<span style="color: #000000;">\p</span>revious.bmp"</span> ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>, ;<br />           nAccion<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>,aData, @aText, @oDbfC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />        TOOLTIP <span style="color: #ff0000;">"Next"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar ;<br />        FILE <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>cons<span style="color: #000000;">\n</span>ext.bmp"</span> ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>, ;<br />           nAccion<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span>,aData, @aText, @oDbfC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />        TOOLTIP <span style="color: #ff0000;">"Previous"</span> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar ;<br />        FILE <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>cons<span style="color: #000000;">\e</span>xit.bmp"</span> ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>, ;<br />                oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />        TOOLTIP <span style="color: #ff0000;">"Exit"</span> <br /><br /><span style="color: #00C800;">RETURN</span>     <br /><br /><span style="color: #B900B9;">//****** All actions from different button bar go here ***********************************************************</span><br /><span style="color: #00C800;">STATIC</span> PROCEDURE nAccion<span style="color: #000000;">&#40;</span>nAccion, aData, aText, oDbfC<span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span>  <span style="color: #B900B9;">//several possibilities here</span><br />    <span style="color: #00C800;">CASE</span> nAccion=<span style="color: #000000;">1</span>  <span style="color: #B900B9;">//prev</span><br />       dbSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">IF</span> BOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         dbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">CASE</span> nAccion=<span style="color: #000000;">2</span>  <span style="color: #B900B9;">//next</span><br />       dbSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">IF</span> EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          dbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDCASE</span><br /><br />  oDbfC:<span style="color: #000000;">LOAD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  Load_Data<span style="color: #000000;">&#40;</span>@aData, @aText, oDbfC <span style="color: #000000;">&#41;</span><br />  <br />  oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <br /><span style="color: #00C800;">RETURN</span>      <br />       <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:lvf6n7uv]
AADD not working with GETS
Hello, after deleting PICTURE "9999" your code is working fine. Clientes.dbf has only 20 records. Everytime you you load_data you move 6 records. But your backbutton is only skip(-1). Therefore you get empty records. Best regards Otto
AADD not working with GETS
Mr. Ellano Yes. We can not refill the data using aData := {} and AAdd. Because when we assign aData := {} again, this is a new array different from the array used in the Gets. Also in Add, AAdd( aData, { ..... } ) the array { ... } is again a new array which is different from the array used in the Gets. So, the only way to refresh data is the assign each item individually as in the case of aText.
AADD not working with GETS
OK. Understood. New array=will not update (strange that will show the old one). Mr. Otto, of course I only skip 1 and -1, as I explain, this is only a test program, Nothing to do with a real case. Just done to illustrate AADD vs array assignation and how they show (or not) in a Dialog. And no, deleting PICTURE "9999" will not fix the issue (AADD will not update vs direct array assignation updates) Thanks Emiliano Llano Díaz
AADD not working with GETS
Array variable points to a memory location holding the data. a1 := {} a2 := a Now both a1 and a2 refer to the same memory location. Any changes made to an element in array a1 are also seen in the array a2, because both refer to the same memory location. ? a1 == a2 // --> .t. a1[ n ] := 100 ? a2[ n ] // 100 Now let us assign a1 := {} // or a1 := Array( x ) now a1 is a new array pointing to a different location in the memory. a1 is not equal to a2 any more. Changes made to a1 no longer reflect in a2.
AADD not working with GETS
After reading carefully your answer, I try something similar to pointers in C which worked perfectly: [code=fw:p4imte3m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Problem solved here using AADD to fill arrays</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00C800;">STATIC</span> oDlg<br />    <br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #00C800;">LOCAL</span> aData<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, ; <span style="color: #B900B9;">//MUST be the same dimensions as the final array</span><br />             oDbfC<br /><br />       USE clientes  <span style="color: #B900B9;">//this DB is located in the samples path of FW</span><br />       DATABASE oDbfC<br />       oDbfC:<span style="color: #000000;">LOAD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       oDbfC:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />       Load_Data<span style="color: #000000;">&#40;</span>@aData, oDbfC<span style="color: #000000;">&#41;</span><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;">800</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />       Show_Dialog<span style="color: #000000;">&#40;</span>aData, oDbfC<span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span><span style="color: #00C800;">self</span><span style="color: #000000;">&#41;</span>, ;<br />                Main_bar<span style="color: #000000;">&#40;</span>@aData, oDbfC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE Show_Dialog<span style="color: #000000;">&#40;</span>aData, oDbfC<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">LOCAL</span> i, j<br />       <br />       <span style="color: #00C800;">FOR</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />          <span style="color: #00C800;">FOR</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />             @ <span style="color: #000000;">40</span> * i, <span style="color: #000000;">200</span> * j <span style="color: #0000ff;">GET</span> aData SUBSCRIPT i,j <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />          <span style="color: #00C800;">NEXT</span> j<br />       <span style="color: #00C800;">NEXT</span> i<br /><span style="color: #00C800;">RETURN</span><br /><br />************  Fill arrays as needed **********<br />*  This is practical <span style="color: #00C800;">for</span> big arrays that need <span style="color: #0000ff;">to</span> be updated back in <span style="color: #0000ff;">dialog</span><br />*  since will give a compact code <span style="color: #000000;">&#40;</span>completely useless and non-sense <span style="color: #00C800;">for</span> small arrays<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">STATIC</span> PROCEDURE Load_Data<span style="color: #000000;">&#40;</span>aData, oDbfC <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">LOCAL</span> i, j, aText:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, aItem, nItem<br />  <br />  <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />     AAdd<span style="color: #000000;">&#40;</span> aText, <span style="color: #000000;">&#123;</span> oDbfC:<span style="color: #000000;">Nombre</span>, oDbfC:<span style="color: #000000;">Direccion</span>, oDbfC:<span style="color: #000000;">Telefono</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />     oDbfC:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">NEXT</span> i   <br /><br /><span style="color: #B900B9;">// re-assign back to original array to update in dialog aCopy does not work</span><br />  i:=<span style="color: #000000;">1</span><br />  <span style="color: #00C800;">FOR</span> EACH aItem IN aText<br />     j:=<span style="color: #000000;">1</span><br />     <span style="color: #00C800;">FOR</span> EACH nItem IN aItem<br />         aData<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span>=nitem<br />         j++<br />     <span style="color: #00C800;">NEXT</span><br />     i++<br />  <span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />***** Create <span style="color: #0000ff;">button</span> bar <span style="color: #000000;">&#40;</span>use any <span style="color: #0000ff;">image</span> just <span style="color: #0000ff;">to</span> ilustrate the point<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">STATIC</span> PROCEDURE Main_bar<span style="color: #000000;">&#40;</span>aData, oDbfC<span style="color: #000000;">&#41;</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oBar, oBtn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>,<span style="color: #000000;">30</span> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar ;<br />        FILE <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>conos<span style="color: #000000;">\p</span>revious.bmp"</span> ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>, ;<br />           nAccion<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span>,aData, @oDbfC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />        TOOLTIP <span style="color: #ff0000;">"Next"</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar ;<br />        FILE <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>conos<span style="color: #000000;">\n</span>ext.bmp"</span> ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>, ;<br />           nAccion<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span>,aData, @oDbfC<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />        TOOLTIP <span style="color: #ff0000;">"Previous"</span> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar ;<br />        FILE <span style="color: #ff0000;">".<span style="color: #000000;">\i</span>conos<span style="color: #000000;">\e</span>xit.bmp"</span> ;<br />        <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>HB_SYMBOL_UNUSED<span style="color: #000000;">&#40;</span>this<span style="color: #000000;">&#41;</span>, ;<br />                oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />        TOOLTIP <span style="color: #ff0000;">"Exit"</span> <br /><br /><span style="color: #00C800;">RETURN</span>     <br /><br /><span style="color: #B900B9;">//****** All actions from different button bar go here ***********************************************************</span><br /><span style="color: #00C800;">STATIC</span> PROCEDURE nAccion<span style="color: #000000;">&#40;</span>nAccion, aData, oDbfC<span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span>  <span style="color: #B900B9;">//several possibilities here (incomplete code)</span><br />    <span style="color: #00C800;">CASE</span> nAccion=<span style="color: #000000;">1</span>  <span style="color: #B900B9;">//prev</span><br />       dbSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">IF</span> BOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         dbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">CASE</span> nAccion=<span style="color: #000000;">2</span>  <span style="color: #B900B9;">//next</span><br />       dbSKIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">IF</span> EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          dbGoTop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">ENDCASE</span><br /><br />  oDbfC:<span style="color: #000000;">LOAD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  Load_Data<span style="color: #000000;">&#40;</span>@aData, oDbfC <span style="color: #000000;">&#41;</span><br />  <br />  oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <br /><span style="color: #00C800;">RETURN</span>      <br />       <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:p4imte3m] Thanks for your time.
AADD not working with GETS
Mr. ellano I prepared a very simple solution for you a few days back, but forgot to post. Here it is: In your first program, instead of [code=fw:2mlc3h7w]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;aData:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> oDbfC:<span style="color: #000000;">Nombre</span>, oDbfC:<span style="color: #000000;">Direccion</span>, oDbfC:<span style="color: #000000;">Telefono</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oDbfC:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">NEXT</span> i &nbsp; <br />&nbsp;</div>[/code:2mlc3h7w] Replace this code: [code=fw:2mlc3h7w]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;<span style="color: #00C800;">DEFAULT</span> aData := Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp;ACopy<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> oDbfC:<span style="color: #000000;">Nombre</span>, oDbfC:<span style="color: #000000;">Direccion</span>, oDbfC:<span style="color: #000000;">Telefono</span> <span style="color: #000000;">&#125;</span>, aData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oDbfC:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">NEXT</span> i<br />&nbsp;</div>[/code:2mlc3h7w] This works as you expected.
AADD not working with GETS
Dear Mr. Rao, can you please post the whole prg file. Thank you in advance Otto
AADD not working with GETS
[quote="Otto":1o1knkjk]Dear Mr. Rao, can you please post the whole prg file. Thank you in advance Otto[/quote:1o1knkjk] Here it is: [code=fw:1o1knkjk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDbf<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBar, i, j<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aText<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;oDbf &nbsp; &nbsp; := TDatabase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">"CLIENTES"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Load_Data<span style="color: #000000;">&#40;</span> aData, aText, oDbf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>,<span style="color: #000000;">30</span> <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">RESOURCE</span> 0X30076 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">Bof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDbf:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Load_Data<span style="color: #000000;">&#40;</span> aData, aText, oDbf <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">RESOURCE</span> 0X30077 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDbf:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Load_Data<span style="color: #000000;">&#40;</span> aData, aText, oDbf <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">RESOURCE</span> 0x100A5 <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">40</span> * i, <span style="color: #000000;">200</span> * j <span style="color: #0000ff;">GET</span> aData SUBSCRIPT i,j &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span> j<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span> i<br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> j := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">150</span>+ <span style="color: #000000;">&#40;</span><span style="color: #000000;">40</span> * i<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">200</span> * j <span style="color: #0000ff;">GET</span> aText SUBSCRIPT i,j &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span> j<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span> i<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> procedure Load_Data<span style="color: #000000;">&#40;</span> aData, aText, oDbf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">local</span> i, nRec &nbsp; := oDbf:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp;ACopy<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> oDbf:<span style="color: #000000;">Nombre</span>, oDbf:<span style="color: #000000;">Direccion</span>, oDbf:<span style="color: #000000;">Telefono</span> <span style="color: #000000;">&#125;</span>, aData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oDbf:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">NEXT</span> i<br /><br />&nbsp; <span style="color: #00C800;">FOR</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp;aText<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:=oDbf:<span style="color: #000000;">Nombre</span><br />&nbsp; &nbsp; &nbsp;aText<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:=oDbf:<span style="color: #000000;">Direccion</span><br />&nbsp; &nbsp; &nbsp;aText<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:=oDbf:<span style="color: #000000;">Telefono</span><br />&nbsp; &nbsp; &nbsp;oDbf:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">NEXT</span> i<br /><br />&nbsp; oDbf:<span style="color: #000000;">GoTo</span><span style="color: #000000;">&#40;</span> nRec <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><br />&nbsp;</div>[/code:1o1knkjk]
ABM con Eagle1 + FW
Saludos foro Alguien que utilice / haya usado esta clase tendra un ejemplo que como hacer un ABM con MySql? De antemano gracias a los que sugieran hacerlo con Dolphin o FWMQL pero mi interes es con Eagle 1
ABM con Eagle1 + FW
Mira esta ejemplo proporcionado por Manu: [code=fw:rsd0icl0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Soft4U Manu Exposito &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// Eagle1 Clases para manejo de MySQL desde xBase &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//</span><br /><span style="color: #B900B9;">// Tutor15 : Ejemplo de mantenimiento simple de una tabla &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#define</span> CRLF Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">13</span> <span style="color: #000000;">&#41;</span> + Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#define</span> B_BOX <span style="color: #000000;">&#40;</span> CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">218</span> <span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">196</span> <span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">191</span> <span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">179</span> <span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">217</span> <span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">196</span> <span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">192</span> <span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">179</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"util.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"inKey.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Eagle1.ch"</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> GetList := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cServer := <span style="color: #ff0000;">"127.0.0.1"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cUser := <span style="color: #ff0000;">"root"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cPasswd := <span style="color: #ff0000;">"root"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cDb := <span style="color: #ff0000;">"prueba"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cTable := <span style="color: #ff0000;">"test"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oCon<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oDb, oTb<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> a := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; cls<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">INIT</span> CONNECT oCon ;<br />&nbsp; &nbsp; &nbsp; &nbsp; HOST cServer;<br />&nbsp; &nbsp; &nbsp; &nbsp; USER cUser ;<br />&nbsp; &nbsp; &nbsp; &nbsp; PASSWORD cPasswd<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> oCon:<span style="color: #000000;">lConnected</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; USE DATABASE oDb <span style="color: #0000ff;">NAME</span> cDb <span style="color: #0000ff;">OF</span> oCon<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oDb:<span style="color: #000000;">Used</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> TABLE oTb <span style="color: #0000ff;">NAME</span> cTable DATAFIELD ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ORDER BY</span> <span style="color: #000000;">1</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDb<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPEN TABLE oTb<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oTb:<span style="color: #000000;">lOpened</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oTb:<span style="color: #000000;">RecCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">aBuffer</span> := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Manu"</span>, <span style="color: #ff0000;">"Exposito"</span>, <span style="color: #ff0000;">"Principe"</span> , <span style="color: #ff0000;">"Sevilla"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"SP"</span>, <span style="color: #ff0000;">"41100"</span>, <span style="color: #ff0000;">"1990-10-10"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">53</span>, <span style="color: #000000;">2000</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"ningun"</span> <span style="color: #000000;">&#125;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INSERT INTO oTb <span style="color: #0000ff;">REFRESH</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GestBrw<span style="color: #000000;">&#40;</span> oTb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; FREE TABLE oTb<br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; FREE CONNECT oCon<br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> GestBrw<span style="color: #000000;">&#40;</span> oTb <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oBrw, oCol<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lEnd := .f.<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nKey := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> n := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> oTb:<span style="color: #000000;">RecCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < <span style="color: #000000;">1</span> <span style="color: #B900B9;">// Comprobamos que hay registros</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No hay registros"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; oBrw := TBrowseNew<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span>, MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span>, MaxCol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">colorSpec</span> := <span style="color: #ff0000;">"W+/B, N/BG"</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">ColSep</span> &nbsp; &nbsp;:= <span style="color: #ff0000;">" ³ "</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">HeadSep</span> &nbsp; := <span style="color: #ff0000;">"ÄÅÄ"</span><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">FootSep</span> &nbsp; := <span style="color: #ff0000;">"ÄÁÄ"</span><br /><br />&nbsp; &nbsp; oTb:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// Hacer siempre un Read() para cargar el buffer interno</span><br />&nbsp; &nbsp; MySetBrowse<span style="color: #000000;">&#40;</span> oBrw, oTb <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; oBrw:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">&#40;</span> TBColumnNew<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Reg."</span>, <span style="color: #000000;">&#123;</span> || oTb:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> oTb:<span style="color: #000000;">FCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">&#40;</span> TBColumnNew<span style="color: #000000;">&#40;</span> oTb:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, GenCB<span style="color: #000000;">&#40;</span> oTb, n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; cls<br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> PadC<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Ojeando la tabla "</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; upper<span style="color: #000000;">&#40;</span> oTb:<span style="color: #000000;">cName</span> <span style="color: #000000;">&#41;</span>, MaxCol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span>, <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/G+"</span><br /><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"INSERT"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"GR+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Altas"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"ENTER"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"GR+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Modifica"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"SUPR"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"GR+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Bajas"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"F4"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"GR+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Ordenacion"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Flechas"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"GR+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Moverse"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"ESC"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"GR+/R+"</span><br />&nbsp; &nbsp; @ MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, Col<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Salir"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W+/R+"</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">while</span> !lEnd<br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">ForceStable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nKey = InKey<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_ESC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetPos<span style="color: #000000;">&#40;</span> MaxRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lEnd = .t.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_DOWN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Down</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_F4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ElOrden<span style="color: #000000;">&#40;</span> oTb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">goTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_F5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> BuscaValor<span style="color: #000000;">&#40;</span> oTb <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Encontrado..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Valor no encontrado..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RefreshAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_F6<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oTb:<span style="color: #000000;">FindNext</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Encontrado..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Valor no encontrado..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RefreshAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_UP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Up</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_LEFT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey == K_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_PGDN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">pageDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_PGUP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">pageUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_CTRL_PGUP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">goTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_CTRL_PGDN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">goBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_HOME<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">home</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_END<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_CTRL_LEFT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">panLeft</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_CTRL_RIGHT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">panRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_CTRL_HOME<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">panHome</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_CTRL_END<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">panEnd</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_DEL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Borrar<span style="color: #000000;">&#40;</span> oTb, oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_INS<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Insertar<span style="color: #000000;">&#40;</span> oTb, oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">case</span> nKey = K_ENTER<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Modificar<span style="color: #000000;">&#40;</span> oTb, oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endcase</span><br /><br />&nbsp; &nbsp;end<br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> GenCB<span style="color: #000000;">&#40;</span> oTb, n <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> || oTb:<span style="color: #000000;">xFieldGet</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> PantMuestra<span style="color: #000000;">&#40;</span> oTb, cTipo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> GetList := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; set <span style="color: #0000ff;">cursor</span> <span style="color: #0000ff;">on</span><br /><br />&nbsp; &nbsp; DispBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">74</span>, B_BOX <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">04</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> cTipo + <span style="color: #ff0000;">" de Usuarios de Eagle1 &nbsp; &nbsp; &nbsp;Número: "</span> + ;<br />&nbsp; &nbsp; AllTrim<span style="color: #000000;">&#40;</span> str<span style="color: #000000;">&#40;</span> oTb:<span style="color: #0000ff;">Id</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">06</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Nombre..:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Nombre</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K!"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">07</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"eMail...:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">eMail</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">08</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"MSN.....:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">MSN</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">09</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Pais....:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Pais</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">10</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Pago....:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Pago</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">11</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Pagado..:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Pagado</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">12</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Banco...:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Banco</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">13</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Fecha...:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Fecha</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Importe.:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Importe</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; @ <span style="color: #000000;">15</span>, <span style="color: #000000;">03</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Password:"</span> <span style="color: #0000ff;">GET</span> oTb:<span style="color: #000000;">Password</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> GetList <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Insertar<span style="color: #000000;">&#40;</span> oTb, oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> GetList := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lOk := .f.<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cPant := SaveScreen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">74</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; oTb:<span style="color: #000000;">xBlank</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; GetList := PantMuestra<span style="color: #000000;">&#40;</span> oTb, <span style="color: #ff0000;">"Altas"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; READ<br />&nbsp; &nbsp; set <span style="color: #0000ff;">cursor</span> off<br /><br />&nbsp; &nbsp; RestScreen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">74</span>, cPant <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; INSERT INTO oTb <span style="color: #0000ff;">TO</span> lOk<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lOk<br />&nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Tupla insertada"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> MyMsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Refresca el Browse?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">goBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RefreshAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Modificar<span style="color: #000000;">&#40;</span> oTb, oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lOk := .f.<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> GetList := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nRecNo := oTb:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cPant := SaveScreen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">74</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; oTb:<span style="color: #000000;">xLoad</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; GetList := PantMuestra<span style="color: #000000;">&#40;</span> oTb, <span style="color: #ff0000;">"Actualizacion"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; READ<br /><br />&nbsp; &nbsp; set <span style="color: #0000ff;">cursor</span> off<br /><br />&nbsp; &nbsp; RestScreen<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">74</span>, cPant <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">UPDATE</span> oTb <span style="color: #0000ff;">TO</span> lOk<br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lOk<br />&nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Tupla modificada"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> MyMsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Refresca el Browse?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">GoTo</span><span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RefreshAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Borrar<span style="color: #000000;">&#40;</span> oTb, oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lOk := .f.<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nRecNo := oTb:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> MyMsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Realmente quieres borrar el registro?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; DELETE <span style="color: #0000ff;">FROM</span> oTb LIMIT <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> lOk<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lOk<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Borrado en el servidor"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> MyMsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Refresca el Browse?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">GoTo</span><span style="color: #000000;">&#40;</span> nRecNo - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RefreshAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MyMsg<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Mo se ha borrado..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ElOrden<span style="color: #000000;">&#40;</span> oTb <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> i := oTb:<span style="color: #000000;">FCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aFld := Array<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> n := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lRet := .f.<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> i<br />&nbsp; &nbsp; &nbsp; &nbsp; aFld<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> := oTb:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; DispBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">25</span>, B_BOX <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; i := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; i := AChoice<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">24</span>, aFld <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lRet := <span style="color: #000000;">&#40;</span> i > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oTb:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> lRet <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> BuscaValor<span style="color: #000000;">&#40;</span> oTb <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> GetList := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nCol := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lRet := .f.<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> uVal<br /><br />&nbsp; &nbsp; DispBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">75</span>, B_BOX <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">6</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Entre numero de columna:"</span> <span style="color: #0000ff;">GET</span> nCol <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; READ<br /><br />&nbsp; &nbsp; uVal := oTb:<span style="color: #000000;">xFieldGet</span><span style="color: #000000;">&#40;</span> nCol <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">7</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Entre valor buscado:"</span> <span style="color: #0000ff;">GET</span> uVal <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span><br />&nbsp; &nbsp; READ<br /><br />&nbsp; &nbsp; lRet := oTb:<span style="color: #000000;">Find</span><span style="color: #000000;">&#40;</span> nCol, uVal, .t. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> lRet <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:rsd0icl0] Espero te sirva. Saludos. Carlos
ABM con Eagle1 + FW
Y este es otro ejemplo de Manu, utilizando FWH: [code=fw:2svxh3y5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Eagle1.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"calendar.ch"</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Son estaticas para que sean visibles desde todo el PRG un poco por</span><br /><span style="color: #B900B9;">// comodidad</span><br /><br /><span style="color: #00C800;">static</span> oConnect &nbsp; &nbsp; <span style="color: #B900B9;">// Objeto conexion</span><br /><span style="color: #00C800;">static</span> oDS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Objeto DataSet</span><br /><br /><span style="color: #00C800;">static</span> oWnd &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Objetos de FWH</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SET DATE FORMAT <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"DD/MM/YYYY"</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> AbrirTodo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">120</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ejemplo de manteniento de una tabla con Eagle1 y FWH"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd NOINSET;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TO</span> oDS:<span style="color: #000000;">cVersion</span> + <span style="color: #ff0000;">" por "</span> + oDS:<span style="color: #000000;">cAuthor</span> CLOCK DATE<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; Salir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oMenu<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Mantenimiento"</span> <span style="color: #0000ff;">ACTION</span> Mantenimiento<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Utilities"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Calculadora"</span> <span style="color: #0000ff;">ACTION</span> WinExec<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Calc"</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Lamando a la calculadora de Windows"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SEPARATOR</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Escribir"</span> &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> WinExec<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Write"</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Llamando a Write de Windows"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Salir"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Acerca de..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> MsgAbout<span style="color: #000000;">&#40;</span> oDS:<span style="color: #000000;">cAuthor</span>, oDS:<span style="color: #000000;">cVersion</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Informa sobre la versión de Eagle1"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Salir"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> Salir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Salir del ejemplo de Eagle1 y FWH"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDMENU</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> AbrirTodo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cHost := &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"127.0.0.1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cUser := &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"root &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cPassword := &nbsp;<span style="color: #ff0000;">"root &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cDbName := &nbsp; &nbsp;<span style="color: #ff0000;">"E1Prueba &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cTabla := <span style="color: #ff0000;">"Test"</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lRet<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oDlg<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">14</span>, <span style="color: #000000;">35</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Datos de conexión"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Host:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">GET</span> cHost <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">1.8</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Usuario:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">02</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">GET</span> cUser <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">2.6</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Password:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">03</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">GET</span> cPassword <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">3.4</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Base datos:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">04</span>, <span style="color: #000000;">05</span> <span style="color: #0000ff;">GET</span> cDbName <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4</span>, <span style="color: #000000;">7</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Acptar"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp; cHost := trim<span style="color: #000000;">&#40;</span> cHost <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cUser := trim<span style="color: #000000;">&#40;</span> cUser <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cPassword := trim<span style="color: #000000;">&#40;</span> cPassword <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; cDbName := trim<span style="color: #000000;">&#40;</span> cDbName <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Creamos el objeto "connexion"</span><br />&nbsp; &nbsp; oConnect := TMSConnect<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">// Nos conectamos al servidor</span><br />&nbsp; &nbsp; lRet := oConnect:<span style="color: #000000;">Connect</span><span style="color: #000000;">&#40;</span> cHost, cUser, cPassword, cDbName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> !lRet<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No hay conexión con el servidor"</span>, <span style="color: #ff0000;">"Operación Cancelada"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS := TMyTable<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oConnect, cTabla <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">SetReadPADAll</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">SetTinyAsLogical</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Abrimos la tabla, traemos el resultado a nuestro cliente</span><br />&nbsp; &nbsp; &nbsp; &nbsp; lRet := oDS:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !lRet<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se puede abrir la tabla: "</span> + cTabla, <span style="color: #ff0000;">"Operación Cancelada"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> lRet <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">//</span><br /><br /><span style="color: #00C800;">static</span> procedure Salir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> oDS <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"O"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">Free</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> oConnect <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"O"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oConnect:<span style="color: #000000;">Free</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> oWnd <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"O"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> procedure Mantenimiento<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oDlg, oLbx<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Mantenimiento tabla TEST"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">00</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">" &Datos tabla..."</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>,<span style="color: #000000;">01</span> <span style="color: #0000ff;">LISTBOX</span> oLbx ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FIELDS &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PadL<span style="color: #000000;">&#40;</span> oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">6</span>, <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADERS ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">365</span>, <span style="color: #000000;">220</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; MySetBrowse<span style="color: #000000;">&#40;</span> oLbx, oDS <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Asigna los codeBlock de movimiento</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oLbx:<span style="color: #000000;">cAlias</span> := <span style="color: #ff0000;">"ARRAY"</span> <span style="color: #B900B9;">// Para que el gestor de listados no de error</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oLbx:<span style="color: #000000;">lCellStyle</span> := .t.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Añadir"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> CtrDatos<span style="color: #000000;">&#40;</span> oLbx, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">08</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Modificar"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> CtrDatos<span style="color: #000000;">&#40;</span> oLbx, .f. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Borrar"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> Borrar<span style="color: #000000;">&#40;</span> oLbx <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">22</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ordenar"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> Ordernar<span style="color: #000000;">&#40;</span> oLbx <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">29</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"B&uscar"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> Buscar<span style="color: #000000;">&#40;</span> oLbx <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">36</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Listar"</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oLbx:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Listado de la tabla"</span>, .t. <span style="color: #000000;">&#41;</span>, oDS:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">14</span>, <span style="color: #000000;">57</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Salir"</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>, <span style="color: #000000;">12</span><br /><br />&nbsp; &nbsp;<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><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Borra la fila actual</span><br /><br /><span style="color: #00C800;">static</span> procedure Borrar<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nRecNo := oDS:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Realmente quiere borrar el registro "</span> + StrNum<span style="color: #000000;">&#40;</span> oDS:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> oDS:<span style="color: #000000;">Delete</span><span style="color: #000000;">&#40;</span> , <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Borrado en el servidor"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Refresca la lista?"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">GoTo</span><span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha borrado..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Establece un nuevo orden de visualizacion</span><br /><br /><span style="color: #00C800;">static</span> procedure Ordernar<span style="color: #000000;">&#40;</span> oLbxPrincipal <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oDlg, oLbx<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> i := oDS:<span style="color: #000000;">FieldCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> aFld := Array<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> n, cValue<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> i<br />&nbsp; &nbsp; &nbsp; &nbsp; aFld<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> := oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; n := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">18</span>, <span style="color: #000000;">30</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Eagle1, FW y ListBox"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">1</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">LISTBOX</span> oLbx;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VAR</span> cValue;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ITEMS</span> aFld;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">70</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">5</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Seleccionar"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">DEFAULT</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Orden: "</span> + Str<span style="color: #000000;">&#40;</span> n := oLbx:<span style="color: #000000;">GetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ CRLF + <span style="color: #ff0000;">"Nombre del campo: "</span> + cValue, <span style="color: #ff0000;">"Has elegido"</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">5</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Salir"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> n != <span style="color: #000000;">0</span> .and. oDS:<span style="color: #000000;">SetOrderBy</span><span style="color: #000000;">&#40;</span> n,, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oLbxPrincipal:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oLbxPrincipal:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha establacido otro orden..."</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> procedure Buscar<span style="color: #000000;">&#40;</span> oLb <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oDlg<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> i := oDS:<span style="color: #000000;">FieldCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> n := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oSay, cSay := <span style="color: #ff0000;">"&Valor campo "</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oGet, uVal<br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">70</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Búsqueda de valores en el DataSet"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"&Numero de columna ( 1 - "</span> + StrNum<span style="color: #000000;">&#40;</span> i <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" ):"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> n <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> uVal := oDS:<span style="color: #000000;">FieldGet</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, oGet:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cSay + oDS:<span style="color: #000000;">FieldName</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, n > <span style="color: #000000;">0</span> .and. n <= i <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">02</span>, <span style="color: #000000;">01</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> cSay <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">02</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> uVal <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">160</span>, <span style="color: #000000;">13</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">3</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Buscar"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oDS:<span style="color: #000000;">Find</span><span style="color: #000000;">&#40;</span> n, uVal, .t. <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Valor encontrado"</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Valor no encontrado"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oLb:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">3</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"S&iguiente"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> !oDS:<span style="color: #000000;">FindNext</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, MyMsgInfo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No hay más. Se llegó al final"</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oLb:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">3</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Salir"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> procedure CtrDatos<span style="color: #000000;">&#40;</span> oLb, lNuevo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oDlg<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cQueHago<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nRec := oDS:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lNuevo<br />&nbsp; &nbsp; &nbsp; &nbsp; cQueHago := <span style="color: #ff0000;">"Altas"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">Blank</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cQueHago := <span style="color: #ff0000;">"Modificación"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">77</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Mantenimiento de la tabla Test - "</span> + cQueHago;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"First"</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">02</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">First</span> &nbsp; &nbsp; <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">01</span>, <span style="color: #000000;">26.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Last"</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">02</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">Last</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">2.8</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Street"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">Street</span> &nbsp; &nbsp; <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">2.8</span>, <span style="color: #000000;">26.6</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"City"</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">City</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">6</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">State</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K XX"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">5.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Zip"</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">6</span>, <span style="color: #000000;">4</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">Zip</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K 99999-9999"</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">13.9</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Hiredate"</span> &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">78</span>, <span style="color: #000000;">83</span> DTPICKER oDS:<span style="color: #000000;">Hiredate</span> <span style="color: #0000ff;">UPDATE</span> &nbsp;<span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">11</span> <span style="color: #0000ff;">OF</span> oDlg<br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp;@ 6, 10 GET oDS:Hiredate &nbsp; PICTURE "@K" UPDATE OF oDlg</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">5.7</span>, <span style="color: #000000;">22</span> <span style="color: #0000ff;">CHECKBOX</span> oDS:<span style="color: #000000;">Married</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Married"</span> &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">33</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Age"</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">6</span>, <span style="color: #000000;">24.5</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">Age</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@K 999"</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">4.6</span>, <span style="color: #000000;">37.5</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Salary"</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">6</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">Salary</span> &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@KE 9,999,999.999"</span> &nbsp; <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><span style="color: #B900B9;">//..................... El campo MEMO...............................................</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">6.4</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Notes"</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">8.1</span>, <span style="color: #000000;">1.5</span> <span style="color: #0000ff;">GET</span> oDS:<span style="color: #000000;">Notes</span> &nbsp; &nbsp; &nbsp;MEMO &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">270</span>, <span style="color: #000000;">65</span><br /><span style="color: #B900B9;">//..................................................................................</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10.5</span>, <span style="color: #000000;">02</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Guardar"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> FuncVale<span style="color: #000000;">&#40;</span> lNuevo <span style="color: #000000;">&#41;</span>, oLb:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10.5</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancelar"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lNuevo, oDS:<span style="color: #000000;">Blank</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDS:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10.5</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Salir"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> oDlg;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> procedure FuncVale<span style="color: #000000;">&#40;</span> lNuevo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> nRec<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> lNuevo<br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">insert</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nRec := oDS:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oDS:<span style="color: #000000;">GoTo</span><span style="color: #000000;">&#40;</span> nRec <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:2svxh3y5]
ABM con Eagle1 + FW
Estos ejemplos no funcionan
ABPaint + Folders
Antonio/Daniel, Para mostrar un bitmap con Alpha, tanto en ventanas como en dialogos se usa en el ON PAINT. Ahora, si lo quiero aplicar en un folder con varias pestañas lo estoy usando con oFld:aDialogs[1]:bPainted, pero, cada vez que cambio y al hacer el repintado me vuelve a llamar la funcion y a recargar la imagen, cosa que me va consumiendo varios kb en la memoria ( depende del tamaño del bitmap ). Hay alguna manera que solo se pinte la 1ra vez que se construye la pestaña y ya despues no se vuelva a repintar la imagen ? Ya probe con bInit, bStart y nop, no me pinta la imagen, al parecer solo con bPainted. Sorry, pero tengo la malisima costumbre de tener abierto el task manager todo el tiempo para monitorear consumo de recursos, procesos, etc. <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> Saludos
ABPaint + Folders
Antonio/Daniel, Algo que se pueda hacer en el tema ? Es el comportamiento normal o estoy haciendo algo incorrecto. Saludos
ABRIR TABLA DE RESULTADO DE CONSULTA SQL EN MODO COMPARTIDO
Estimados Amigos del Foro, Alguién podrá indicarme como indico a ADS que abra la tabla de respuesta a un consulta SQL en modo compartida para poder escribirla , resulta que las tablas resultado de una AdsCreateSqlStament devuelve la tabla en modo READONLY Aca ejemplo, [code=fw:19fjdcee]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">if</span> !AdsCreateSqlStatement<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"BASE"</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;MSGSTOP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ATENCION!! - ERROR DE SERVIDOR AdsCreateSqlStatement"</span>,<span style="color: #ff0000;">"ERROR!!"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;BASE:=<span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp;BASE:=<span style="color: #0000ff;">SELECT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">if</span> !AdsExecuteSqlDirect<span style="color: #000000;">&#40;</span>c_sql<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;MSGSTOP<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ATENCION!! - ERROR DE SERVIDOR AdsExecuteSqlDirect"</span>,<span style="color: #ff0000;">"ERROR!!"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;BASE:=<span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp;BASE:=<span style="color: #0000ff;">SELECT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br />&nbsp;</div>[/code:19fjdcee] Resulta que BASE la devuelve abierta en modo solo lectura, como hacer para que la devuelva de forma de poder modificar datos en ellla Gracias a Todos, Gustavo Prediger
ABRIR WORD COM .DBF
Amigos, tenho a seguinte rotina que quando manda abrir o Word e um respectivo documento (usando mala direta) e o arquivo CTOWORD.DBF como base de dados da mala direta, nao mostra os dados do arquivo .DBF (atualizados). Dá a impressao que o .DBF não é localizado. Todos os caminhos/path sao passados corretamente se nao me engano. Uma observação que faço é que quando abro um desses documentos com mala direta pelo Word via Windows, ele pergunta na tela: -------------------------------------------------------------------------------------------- "Quando este documento for aberto, o seguinte comando SQL será executado: SELECT * FROM CTOWORD Os dados do banco de dados serão inseridos no documento. Deseja continuar? (SIM) (NÃO) -------------------------------------------------------------------------------------------- ... clicando em SIM o Word abre o arquivo documento com os dados do CTOWORD.DBF mesclados corretamente. Uso a versao 2003 do Word e lembro que num Word de versao anterior (2000) isso nao ocorria. * outra observação: uso o Xharbour 0.99.70 e nao gostaria de utilizar a classe TWORD e a FIVEWIN por muitas mudanças que terei de fazer. Segue o fonte: [code=fw:9q3i4txh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> LASTKEY<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">-7</span><br />   * obtendo vars para o contrato no Word...<br />   WD_CPF=<span style="color: #ff0000;">""</span><br />   TCODY=CLIENTE<br />   CLI-><span style="color: #000000;">&#40;</span>DBSEEK<span style="color: #000000;">&#40;</span>TCODY<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_LOC   = CLI->NOME<br />   WD_PJPF  = CLI->PESSOA<br />   <span style="color: #00C800;">IF</span> WD_PJPF    = <span style="color: #ff0000;">"F"</span><br />      WD_CPF = ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>CLI->CPF_CGC,<span style="color: #ff0000;">"@R 999.999.999-99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   ELSEIF WD_PJPF= <span style="color: #ff0000;">"J"</span><br />      WD_CPF = ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>CLI->CPF_CGC,<span style="color: #ff0000;">"@R 99.999.999/9999-99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br />   WD_ENDER = CLI->ENDERECO<br />   WD_BAI   = CLI->BAIRRO<br />   WD_CEP   = CLI->CEP<br />   WD_CID   = CLI->CIDADE<br />   WD_UF    = CLI->UF<br />   WD_FONE  = CLI->FONE<br />   WD_IERG  = CLI->RG<br /><br />   TCODX=VEICULO<br />   VEI-><span style="color: #000000;">&#40;</span>DBSEEK<span style="color: #000000;">&#40;</span>TCODX<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_PLACA = SUBST<span style="color: #000000;">&#40;</span>VEI->PLACA,<span style="color: #000000;">1</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"-"</span>+SUBST<span style="color: #000000;">&#40;</span>VEI->PLACA,<span style="color: #000000;">4</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br /><br />   * Memorizando a Marca\Fabricante...<br />   <span style="color: #00C800;">IF</span>     VEI->marca=<span style="color: #ff0000;">'1'</span><br />      fabrica=<span style="color: #ff0000;">'VOLKSWAGEM'</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'2'</span><br />      fabrica=<span style="color: #ff0000;">'CHEVROLET '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'3'</span><br />      fabrica=<span style="color: #ff0000;">'FIAT      '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'4'</span><br />      fabrica=<span style="color: #ff0000;">'FORD      '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'5'</span><br />      fabrica=<span style="color: #ff0000;">'MOTOS     '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'6'</span><br />      fabrica=<span style="color: #ff0000;">'OUTROS    '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'7'</span><br />      fabrica=<span style="color: #ff0000;">'RENAULT   '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'8'</span><br />      fabrica=<span style="color: #ff0000;">'HONDA     '</span><br />   ELSEIF VEI->marca=<span style="color: #ff0000;">'9'</span><br />      fabrica=<span style="color: #ff0000;">'TOYOTA    '</span><br />   <span style="color: #00C800;">ELSE</span><br />      fabrica=<span style="color: #ff0000;">''</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   WD_MARCA = fabrica<br />   WD_VEIC  = VEI->MODELO<br />   WD_TIPO  = <span style="color: #ff0000;">"PASSEIO"</span><br />   WD_EMISS = DTOC<span style="color: #000000;">&#40;</span>DATACAD<span style="color: #000000;">&#41;</span><br />   WD_CHASSI= VEI->CHASSIS<br />   WD_DTSAI = DTOC<span style="color: #000000;">&#40;</span>DATASAI<span style="color: #000000;">&#41;</span><br />   WD_HSSAI = HORASAI<br />   WD_ODOME = STR<span style="color: #000000;">&#40;</span>ODOMETR1<span style="color: #000000;">&#41;</span><br />   WD_DTDEVO= DTOC<span style="color: #000000;">&#40;</span>PREVIDT<span style="color: #000000;">&#41;</span><br /><br />   TCODM=MOTORIST<br />   CLI-><span style="color: #000000;">&#40;</span>DBSEEK<span style="color: #000000;">&#40;</span>TCODM<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_MOTORI= CLI->NOME<br />   WD_IDENTI= CLI->RG<br />   WD_EMISI = <span style="color: #ff0000;">"**"</span><br />   WD_DTISI = <span style="color: #ff0000;">"**"</span><br />   WD_HABILI= CLI->CNH<br />   WD_EMIH  = <span style="color: #ff0000;">"**"</span><br />   WD_DTEMH = <span style="color: #ff0000;">"**"</span><br />   WD_QTDIA = STR<span style="color: #000000;">&#40;</span>QTDIARIA<span style="color: #000000;">&#41;</span><br />   WD_VLRDIA= ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>DIARIA,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_SINAL = ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>SINAL,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_DESCO = ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>DESCONTO,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_KMEXCE= ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>KMEXCEVAL,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_TOTAL = ALLTRIM<span style="color: #000000;">&#40;</span>TRANS<span style="color: #000000;">&#40;</span>TOTAL,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   WD_FOPAG = OBS1<br />   <br />   * Abrindo doc para o word mala-direta...<br />   <span style="color: #B900B9;">// cCurDir:= CurDrive() + ":\" + CurDir()</span><br />   SELE <span style="color: #000000;">99</span><br />   USE C:\LOC\CTOWORD <span style="color: #0000ff;">ALIAS</span> CTOWO<br />   ZAP<br />   DBAPPEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   REPLACE LOCATARIO  WITH WD_LOC<br />   REPLACE CPF_CNPJ   WITH WD_CPF<br />   REPLACE ENDERECO   WITH WD_ENDER<br />   REPLACE BAIRRO     WITH WD_BAI<br />   REPLACE CEP        WITH WD_CEP<br />   REPLACE CIDADE     WITH WD_CID<br />   REPLACE UF         WITH WD_UF<br />   REPLACE FONE       WITH WD_FONE<br />   REPLACE IE_RG      WITH WD_IERG<br />   REPLACE PLACA      WITH WD_PLACA<br />   REPLACE MARCA      WITH WD_MARCA<br />   REPLACE VEICULO    WITH WD_VEIC<br />   REPLACE TIPO       WITH WD_TIPO<br />   REPLACE EMISSAO    WITH WD_EMISS<br />   REPLACE CHASSI     WITH WD_CHASSI<br />   REPLACE DT_SAIDA   WITH WD_DTSAI<br />   REPLACE HS_SAIDA   WITH WD_HSSAI<br />   REPLACE ODOMETRO   WITH WD_ODOME<br />   REPLACE DT_DEVOLU  WITH WD_DTDEVO<br />   REPLACE MOTORI     WITH WD_MOTORI<br />   REPLACE IDENTIF    WITH WD_IDENTI<br />   REPLACE EMISSORI   WITH WD_EMISI<br />   REPLACE DT_EMIS    WITH WD_DTISI<br />   REPLACE HABILI     WITH WD_HABILI<br />   REPLACE EMISSORH   WITH WD_EMIH<br />   REPLACE DT_EMIH    WITH WD_DTEMH<br />   REPLACE QT_DIARIA  WITH WD_QTDIA<br />   REPLACE VLR_DIARIA WITH WD_VLRDIA<br />   REPLACE SINAL      WITH WD_SINAL<br />   REPLACE DESCONTO   WITH WD_DESCO<br />   REPLACE KMEXCEVAL  WITH WD_KMEXCE<br />   REPLACE TOTAL      WITH WD_TOTAL<br />   REPLACE FORMAPAG   WITH WD_FOPAG<br />   DBCOMMIT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   CLOSE CTOWO<br /><br />   <span style="color: #B900B9;">// abrindo arquivo no WinWord com os dados gravados acima (Mala Direta)...</span><br />   COPY FILE C:\LOC\ENTRLOBK.DOC <span style="color: #0000ff;">TO</span> C:\LOC\ENTREGA.DOC   <span style="color: #B900B9;">// usando o Backup...</span><br />   COPY FILE C:\LOC\CHEKLOBK.DOC <span style="color: #0000ff;">TO</span> C:\LOC\CHEKLIST.DOC  <span style="color: #B900B9;">// usando o Backup...</span><br />   COPY FILE C:\LOC\NPLOCBK.DOC  <span style="color: #0000ff;">TO</span> C:\LOC\NPLOC.DOC     <span style="color: #B900B9;">// usando o Backup...</span><br />   COPY FILE C:\LOC\TERMLOBK.DOC <span style="color: #0000ff;">TO</span> C:\LOC\TERMOLOC.DOC  <span style="color: #B900B9;">// usando o Backup...</span><br />   cARQ2=<span style="color: #ff0000;">"C:<span style="color: #000000;">\L</span>OC<span style="color: #000000;">\E</span>NTREGA.DOC"</span><br />   cARQ3=<span style="color: #ff0000;">"C:<span style="color: #000000;">\L</span>OC<span style="color: #000000;">\C</span>HEKLIST.DOC"</span><br />   cARQ4=<span style="color: #ff0000;">"C:<span style="color: #000000;">\L</span>OC<span style="color: #000000;">\N</span>PLOC.DOC"</span><br />   cARQ5=<span style="color: #ff0000;">"C:<span style="color: #000000;">\L</span>OC<span style="color: #000000;">\T</span>ERMOLOC.DOC"</span><br /><br />   COPY FILE C:\LOC\CTOLOCBK.DOC <span style="color: #0000ff;">TO</span> C:\LOC\CTOLOC.DOC    <span style="color: #B900B9;">// usando o Backup...</span><br />   cARQ=<span style="color: #ff0000;">"C:<span style="color: #000000;">\L</span>OC<span style="color: #000000;">\C</span>TOLOC.DOC"</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      oWord := GetActiveObject<span style="color: #000000;">&#40;</span>  <span style="color: #ff0000;">"Word.Application"</span> <span style="color: #000000;">&#41;</span><br />   CATCH<br />      <span style="color: #00C800;">TRY</span><br />         oWord := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Word.Application"</span> <span style="color: #000000;">&#41;</span>  <br />      CATCH<br />         MsgBOX1<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"NÆo foi poss¡vel achar o Word instalado!!!"</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">RETURN</span><br />      END<br />   END<br />   * abrindo documentos complementares...<br />   oDoc2 := oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>cARQ2<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//ABRE O WORD</span><br />   oDoc3 := oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>cARQ3<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//ABRE O WORD</span><br />   oDoc4 := oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>cARQ4<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//ABRE O WORD</span><br />   oDoc5 := oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>cARQ5<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//ABRE O WORD</span><br />   * abrindo o contrato principal com Mala Direta....<br /><br />   * oDoc := oWord:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'[CAMPO]'</span>,cARQ<span style="color: #000000;">&#41;</span><br /><br />   oDoc := oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>cARQ<span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">//ABRE O WORD</span><br /><br />   oWord:<span style="color: #000000;">visible</span>:= .T.    <span style="color: #B900B9;">// para visualizar...</span><br />   oWord:<span style="color: #000000;">WindowState</span>:=<span style="color: #000000;">1</span>   <span style="color: #B900B9;">// maximizar</span><br />   * oWord:<span style="color: #000000;">PrintOut</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">// para imprimir direto...</span><br /><br />   SELE LOC<br /><span style="color: #00C800;">ENDIF</span><br /><br /> </div>[/code:9q3i4txh] Uma ultima coisa amigos: Seu eu uso o comando na linha: oDoc := oWord:Replace('[CAMPO]',cARQ) ocorrem erros na execucao do programa. Há algum outro comando que faça a substituição dos campos no arquivo documento??? Obrigado!!! Erasmo
AC4xBrowse
Hello friends, I always wonder how you know and find all the methods and parameters without AUTOCODE. Best regards, Otto [img:1gldzoo8]https&#58;//mybergland&#46;com/fwforum/nstretch&#46;gif[/img:1gldzoo8]
AC4xBrowse
[quote="Otto":5k0bs448]Hello friends, I always wonder how you know and find all the methods and parameters without AUTOCODE. Best regards, Otto [/quote:5k0bs448] We, or at least I don't <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> I use Uwe's forum searcher and spend much time in browsing the forum. Autocode is not part of FW as I think, so don't know if it keeps up with actual sources.
ACBrNFe32
Pessoal, Já tem alguém usando a lib ACBRNFE32.DLL para emitir NF-e em modo de produção no lugar do ACBrNFeMonitor? Quero compartilhar os resultados e trocar experiências.
ACCEDER Y MANEJAR DBF DE ACCESS
Saludos a todos, todas, toditos y toditas, la siguiente es para saber si alguno tendra algun ejemplo o me pueda dar alguna idea de como acceder y usar una DBF hecha en ACCESS, son mas de 3.000 registros, si es mejor migrar la datra a DBF de clipper o si se puede manipular directamente desde access, aplicando A.M.E. de registros, cualquier ayuda o sugerencia sera super bien recibida... gracias y saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
ACCEDER Y MANEJAR DBF DE ACCESS
Ado maneja perfectamente las tablas de access. Pero si el programa que la generó ya no esta en uso, yo la traspasaría a dbf sin pensarlo mucho. La decisión es muy relativa, no hay suficientes datos para poder decidir. Esta es la cadena de conexión que usamos para abrir una tabla de access de un programa de facturación ajeno. [code=fw:228375az]<div class="fw" id="{CB}" style="font-family: monospace;"><br />      oConn:= TAdoConnection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</span>+cFileMdb , <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />      oConn:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      oRS:= ADMRecordSet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oConn <span style="color: #000000;">&#41;</span><br />      oRS:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Select * from PceVenEnt, Client Where PceVenEnt.veTiersID = Client.clID"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Consulta SQL</span><br /><br /> </div>[/code:228375az]
ACCES AUX MANUEL
JE N<AI PLUS ACCES AUX MANUEL CLASS, COMMAND, FUNCTION POUVEZ-VOUS M ENVOYER LE LIEN MERCI
ACCES AUX MANUEL
Dear Richard, Do you mean Manuel Mercado ?
ACCES AUX MANUEL
Manuel Expósito, alias Manu, perhaps ?
ACCES AUX MANUEL
[quote="hmpaquito":hx34xv8a]Manuel Expósito, alias Manu, perhaps ?[/quote:hx34xv8a] Manuel Mercado's classes
ACCES AUX MANUEL
[url:3dw3kztk]https&#58;//bitbucket&#46;org/fivetech/fivewin-contributions/downloads/tsbuttonu&#46;zip[/url:3dw3kztk]
ACCESO A WEB SERVICE DESDE FWH USANDO SOAP
Estimados amigos, Necesito acceder a un Web Service mediante SOAP y no encuentro solucion desde harbour. Al ws le tengo que pasar una cantidad importante de parametros que tengo en un archivo XML, ahora bien, intente usar una clase TdWebservice() que encontre en el foro que funciona bien pero no usa SOAP y el ws no me acepta los parametros. Hay alguna forma de hacer que desde mi aplicacion pueda invocar al Ws y pasarle los parametros necesarios mediante SOAP. Agradeceria cualquier ayuda que puedan brindarme, si es posible algun codigo fuente que pueda oriemtarme. El Ws a invocar se llama SyncReceta y se aloja en un servidor "http://www.misvalidaciones.com.ar/ws" agradecido por la ayuda!
ACCESO A WEB SERVICE DESDE FWH USANDO SOAP
Raul, Esto puede servirte: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=16866&start=0&hilit=osoap">viewtopic.php?f=3&t=16866&start=0&hilit=osoap</a><!-- l --> <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=11387&start=0&hilit=tdwebservice">viewtopic.php?f=3&t=11387&start=0&hilit=tdwebservice</a><!-- l --> <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=12514&start=0&hilit=https+patrick">viewtopic.php?f=3&t=12514&start=0&hilit=https+patrick</a><!-- l -->
ACCESS_VIOLATION using ADS Local Server (DBF)
hey everybody, I'm not so experienced with ADS, as I said before, so I'm here once again to ask for some help! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> I'm having troubles with simultaneous requests using DBF tables and the ADS Local server (testing environment)... when my webservice is processing about 3 requests concurrently which are manipulating the same tables I'm getting a error 6005 ACCESS_VIOLATION callend from DBUSEAREA() I'm trying to track the problem and found out that from those 3 requests, the first 2 requests were processed as expected, but the third one is unable to open the file and then I get this error I just mentioned... My function is manipulating the files like that: [code=fw:1ry0txrk]<div class="fw" id="{CB}" style="font-family: monospace;">caliasage:= NewAlias<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"PX"</span>+hData<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'nagenda'</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>     <br />    <br />    USE <span style="color: #000000;">&#40;</span>  cDirDbf+ <span style="color: #ff0000;">"<span style="color: #000000;">\A</span>GENDA.DBF"</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">INDEX</span> <span style="color: #ff0000;">"AGENDA"</span>  <span style="color: #0000ff;">ALIAS</span> caliasage VIA <span style="color: #ff0000;">"ADS"</span> SHARED <span style="color: #00C800;">NEW</span><br />    <span style="color: #00C800;">IF</span> NetErr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        hResponse<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">'success'</span> <span style="color: #000000;">&#93;</span> := .T.<br />        hResponse<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'cod'</span><span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">"7"</span><br /><br />        hResponseCrypt<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'conteudo'</span><span style="color: #000000;">&#93;</span>:=hb_crypt<span style="color: #000000;">&#40;</span>hb_jsonEncode<span style="color: #000000;">&#40;</span>hResponse<span style="color: #000000;">&#41;</span>,AP_GetEnv<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ENCRYPT"</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />        oController:<span style="color: #000000;">oResponse</span>:<span style="color: #000000;">SetHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Authorization"</span>,hCookies<span style="color: #000000;">&#41;</span><br />        oController:<span style="color: #000000;">oResponse</span>:<span style="color: #000000;">SendJson</span><span style="color: #000000;">&#40;</span> hResponseCrypt <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />    <span style="color: #00C800;">ENDIF</span>   <br /><br />    calias:= <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span>caliasage<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:1ry0txrk] newalias() is a function that is creating a Alias dynamically for my table, in order to avoid duplicated alias (advice from Charly) As I said, I'm using ADS Local Server here in my testing environment, so is there any limitation about the opened tables? When I'm sending a request that manipulates a table, this request will count as a different "user" (different connection) everytime? the error in my apache error.log: [code=fw:1ry0txrk]<div class="fw" id="{CB}" style="font-family: monospace;">Unrecoverable error <span style="color: #000000;">6005</span>: <span style="color: #000000;">Exception</span> error:<br /><br />    Exception Code:<span style="color: #000000;">C0000005</span> ACCESS_VIOLATION<br />    Exception Address:00007FFB74AB3416<br />    RAX:<span style="color: #000000;">0000000000000000</span>  RBX:000001BDA3CAEF60  RCX:000001BDA3CAEF60  RDX:00000000FFFFFFFA<br />    RSI:<span style="color: #000000;">0000000000000000</span>  RDI:<span style="color: #000000;">0000000000000000</span>  RBP:000001BDA3CAEA00<br />    R8 :<span style="color: #000000;">0000000000000000</span>  R9 :000001BDA3CAEF00  R10:<span style="color: #000000;">0000000000000000</span>  R11:00000000122BE5A8<br />    R12:<span style="color: #000000;">0000000000000000</span>  R13:000000487FBD6000  R14:<span style="color: #000000;">0000000000000001</span>  R15:<span style="color: #000000;">0000000000000000</span><br />    CS:<span style="color: #000000;">RIP</span>:<span style="color: #000000;">0033</span>:00007FFB74AB3416  SS:<span style="color: #000000;">RSP</span>:002B:000000487FEFE140<br />    DS:002B  ES:002B  FS:<span style="color: #000000;">0053</span>  GS:002B<br />    Flags:<span style="color: #000000;">00010213</span><br />    Exception Parameters: <span style="color: #000000;">0000000000000001</span> <span style="color: #000000;">0000000000000024</span><br /><br /><br />Modules:<br /><br /><span style="color: #000000;">&#91;</span>...<span style="color: #000000;">&#93;</span><br /><br /><br />Called <span style="color: #0000ff;">from</span> DBUSEAREA<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> WS:<span style="color: #000000;">SALVARCONSULTA</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">725</span><span style="color: #000000;">&#41;</span> in pcode.hrb<br />Called <span style="color: #0000ff;">from</span> __RUNCONTROLLER<span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span><span style="color: #000000;">&#41;</span> in pcode.hrb<br />Called <span style="color: #0000ff;">from</span> HB_HRBDO<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> ZEXECUTE<span style="color: #000000;">&#40;</span><span style="color: #000000;">217</span><span style="color: #000000;">&#41;</span> in C:/xampp/htdocs/WSH<span style="color: #B900B9;">//lib/mercury/mercury.hrb</span><br />Called <span style="color: #0000ff;">from</span> TROUTE:<span style="color: #000000;">EXECUTE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">566</span><span style="color: #000000;">&#41;</span> in C:/xampp/htdocs/WSH<span style="color: #B900B9;">//lib/mercury/mercury.hrb</span><br />Called <span style="color: #0000ff;">from</span> TROUTE:<span style="color: #000000;">LISTEN</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">392</span><span style="color: #000000;">&#41;</span> in C:/xampp/htdocs/WSH<span style="color: #B900B9;">//lib/mercury/mercury.hrb</span><br />Called <span style="color: #0000ff;">from</span> TAPP:<span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">139</span><span style="color: #000000;">&#41;</span> in C:/xampp/htdocs/WSH<span style="color: #B900B9;">//lib/mercury/mercury.hrb</span><br />Called <span style="color: #0000ff;">from</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">16</span><span style="color: #000000;">&#41;</span> in pcode.hrb<br />Called <span style="color: #0000ff;">from</span> HB_HRBDO<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> EXECUTE<span style="color: #000000;">&#40;</span><span style="color: #000000;">70</span><span style="color: #000000;">&#41;</span> in ..\source\exec.prg<br /><span style="color: #000000;">&#91;</span>Tue Mar <span style="color: #000000;">23</span> <span style="color: #000000;">17</span>:<span style="color: #000000;">20</span>:<span style="color: #000000;">37.854706</span> <span style="color: #000000;">2021</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span>mpm_winnt:<span style="color: #000000;">notice</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#91;</span>pid <span style="color: #000000;">18764</span>:<span style="color: #000000;">tid</span> <span style="color: #000000;">584</span><span style="color: #000000;">&#93;</span> AH00428: <span style="color: #000000;">Parent</span>: <span style="color: #000000;">child</span> process <span style="color: #000000;">9676</span> exited with status <span style="color: #000000;">3221225477</span> -- Restarting.</div>[/code:1ry0txrk]
ACCESS_VIOLATION using ADS Local Server (DBF)
I was taking a look at the Advantage Local Server documentation and I found this: [quote:kc6j3gxp]The Advantage Local Server allows both single-user and multiple-user access to data files. The Advantage Local Server file that is installed with Advantage client products contains a physical limitation such that only five or fewer users can concurrently access any table.[/quote:kc6j3gxp] [url:kc6j3gxp]https&#58;//devzone&#46;advantagedatabase&#46;com/dz/webhelp/Advantage9&#46;1/advantage_local_server&#46;htm#&#58;~&#58;text=The%20Advantage%20Local%20Server%20allows,running%20the%20Advantage%20Database%20Server&#46;[/url:kc6j3gxp] Is it the problem?