topic
stringlengths
1
63
text
stringlengths
1
577k
Como Saber si hay abierta una base de datos
FUNCTION LstAlias() LOCAL i:=1,cMsg:='',cAlias WHILE !Empty(cAlias:=Alias(i++)) cMsg+=cAlias+CRLF ENDDO MsgInfo(cMsg) RETURN NIL david
Como Seleccionar un CHECKBOX y a la vez se active un GET
Necesitamos saber como un CHECKBOX que al darle clic, active un GET para introducir informacion; y a la vez la información introducida nos aparezca grabada en el archivo. STATIC FUNCTION Nuevo() #define DIALOG_3 3 LOCAL oCbx,oCbx1,oBoton1, oBoton2 LOCAL videntif local oGet1,oGet2,oGet3 local vcuenta:=space(8) local vnomcuenta:=space(40) LOCAL VNOM_PA:=space(20) static vreq_pa:=.F. static ccampo1 LOCAL lSalir := .F. LOCAL lSalvar := .F. use IDENTIFI alias "NOMB" NEW SHARED DEFINE DIALOG oDlg1 RESOURCE DIALOG_3 of oDlg REDEFINE GET oGet1 var vcuenta PICTURE "########" ID 101 OF oDlg1 VALID LEER1( vcuenta ) REDEFINE GET oGet2 var vnomcuenta PICTURE "@!" ID 102 OF oDlg1 REDEFINE CHECKBOX oCkb1 var vreq_pa ID 103 OF oDlg1 ON CLICK reg1( vreq_pa ) REDEFINE DBCOMBO oCbx VAR videntif ID 109 OF oDlg1 ; ALIAS "NOMB" ; ITEMFIELD "CODIGO" ; LISTFIELD "NOMB" REDEFINE BUTTONBMP oBoton1 ID 113 OF oDlg1 ; ACTION ( lSalvar := .T. , oDlg1:End() ) REDEFINE BUTTONBMP oBoton2 ID 114 OF oDlg1 ; ACTION ( lSalir := .T. , oDlg1:End() ) ACTIVATE DIALOG oDlg1 CENTER IF lSalvar APPEND BLANK lSalvar := .F. replace plan->cuenta with vcuenta,plan->nomcuenta with vnomcuenta replace plan->req_pa with vreq_pa replace plan->nom_pa with vnom_pa MsgWait( "Informacion Salvada" ) oTBR2 : Refresh() ENDIF IF lSalir Return Nil endif RETURN( NIL ) STATIC FUNCTION reg1(cCampo1) //VNOM_PA:=space(20) if cCampo1 REDEFINE GET oGet3 var vnom_pa PICTURE "@!" ID 104 OF oDlg1 else VNOM_PA:=space(20) return(.F.) endif return(vnom_pa)
Como Seleccionar un CHECKBOX y a la vez se active un GET
Prueba esto: REDEFINE GET oGet1 var vcuenta PICTURE "########" ID 101 OF oDlg1 VALID LEER1( vcuenta ) REDEFINE GET oGet2 var vnomcuenta PICTURE "@!" ID 102 OF oDlg1 [color=darkred:2v26i0fz]REDEFINE GET oGet3 var vnom_pa PICTURE "@!" ID 104 OF oDlg1 WHEN vreq_pa = .T. REDEFINE CHECKBOX oCkb1 var vreq_pa ID 103 OF oDlg1 [/color:2v26i0fz] Un saludo, Manuel [quote="JHON JAIRO VALENCIA DIAZ":2v26i0fz]Necesitamos saber como un CHECKBOX que al darle clic, active un GET para introducir informacion; y a la vez la información introducida nos aparezca grabada en el archivo. STATIC FUNCTION Nuevo() #define DIALOG_3 3 LOCAL oCbx,oCbx1,oBoton1, oBoton2 LOCAL videntif local oGet1,oGet2,oGet3 local vcuenta:=space(8) local vnomcuenta:=space(40) LOCAL VNOM_PA:=space(20) static vreq_pa:=.F. static ccampo1 LOCAL lSalir := .F. LOCAL lSalvar := .F. use IDENTIFI alias "NOMB" NEW SHARED DEFINE DIALOG oDlg1 RESOURCE DIALOG_3 of oDlg REDEFINE GET oGet1 var vcuenta PICTURE "########" ID 101 OF oDlg1 VALID LEER1( vcuenta ) REDEFINE GET oGet2 var vnomcuenta PICTURE "@!" ID 102 OF oDlg1 REDEFINE CHECKBOX oCkb1 var vreq_pa ID 103 OF oDlg1 ON CLICK reg1( vreq_pa ) REDEFINE DBCOMBO oCbx VAR videntif ID 109 OF oDlg1 ; ALIAS "NOMB" ; ITEMFIELD "CODIGO" ; LISTFIELD "NOMB" REDEFINE BUTTONBMP oBoton1 ID 113 OF oDlg1 ; ACTION ( lSalvar := .T. , oDlg1:End() ) REDEFINE BUTTONBMP oBoton2 ID 114 OF oDlg1 ; ACTION ( lSalir := .T. , oDlg1:End() ) ACTIVATE DIALOG oDlg1 CENTER IF lSalvar APPEND BLANK lSalvar := .F. replace plan->cuenta with vcuenta,plan->nomcuenta with vnomcuenta replace plan->req_pa with vreq_pa replace plan->nom_pa with vnom_pa MsgWait( "Informacion Salvada" ) oTBR2 : Refresh() ENDIF IF lSalir Return Nil endif RETURN( NIL ) STATIC FUNCTION reg1(cCampo1) //VNOM_PA:=space(20) if cCampo1 REDEFINE GET oGet3 var vnom_pa PICTURE "@!" ID 104 OF oDlg1 else VNOM_PA:=space(20) return(.F.) endif return(vnom_pa)[/quote:2v26i0fz]
Como Seleccionar un CHECKBOX y a la vez se active un GET
Gracias viejo Manuel, Me funciono.
Como Separar lineas en Archivo TXT SOLUCIONADO
Hola, se necesita separar por líneas un archivo txt las líneas no son del mismo tamaño y por separador de línea tiene LF alguna sugerencia. 2023/05/11||03|B001|945||1|21812734|RAMIREZ BENGOLEA DE VASQUEZ MARILUZ|0|14.41|0|2.59|0|0|0|0|0|0|0|0|17|PEN|1.000|||||||1|0|0|0101|||2053460194903B0010000000945
Como Separar lineas en Archivo TXT SOLUCIONADO
Gracias le encontre la solucion aLines := hb_ATokens( MemoRead( xFile ), Chr(10)) For a:=1 To Len( aLines ) ?aLines[a] Next
Como Setar um objeto com uma font usando choosefont
Olá, Como faço para setar o objeto em foco, uma font que eu escolher usando a função choosefont() ? Obrigado, Rossine.
Como Usar el Signo ?
Estimados Como puedo ejecutar una funcion apretando el signo de ? (pregunta) que está en la barra del Dialog gracias David Argentina
Como Usar el Signo ?
Estimados Se puede? o que me sujieren para realizar un Instructivo? David argetnina
Como Usar el Signo ?
Hola David: [quote="dobfivewin":1hp2n5es]Como puedo ejecutar una funcion apretando el signo de ? (pregunta) que está en la barra del Dialog[/quote:1hp2n5es] Hasta donde yo sé, ese boton (?) está asociado al sistema de ayudas standard de Windows. Para usarlo deberás: 1.-Generar un archivo de ayuda .hlp 2.- Al crear tus controles para una ventana o cuadro de diálogo, deberás asignarles un número de tópico usando la cláusula HELPID. Estos números (data nHelpId) dentro de cada control, le indicarán a la API de Windows el tópico de ayuda contenido en el archivo .hlp que deberá ser mostrado al arrastrar y apuntar el ícono de ayuda (?) sobre cualquier control. 3.- En la función o procedimiento donde defines tus controles, deberás activar el archivo .hlp que contiene los tópicos de ayuda, usando la función SetHelpFile( "TuAyuda.hlp" ) Espero haber ayudado un poco. Un abrazo. Manuel Mercado.
Como Usar el Signo ?
MUCHAS GRACIAS trataré de encaminar mi idea de ayuda y/o instructivo de uso de mis programa como me sugeris muchas gracias muevamente David argentina
Como abrir base de datos Visual FoxPro desde FIVEWIN
Amigos Saben como abrir una base de datos Visual FoxPro desde FIVEWIN Gracias por la AYUDA Saludos Vladimir Zorrilla Llerena
Como abrir base de datos Visual FoxPro desde FIVEWIN
Vladimir, Se abre sin problema con el RDD DBFCDX. Saludos
Como abrir el excel automatico con tsbrowse?
Saludos. Cuando abro una ventana usando tsbrowse, agregue un botón para generar un archivo de excel usando la misma clase. ExcelOle( cXlsFile, lActivate, oMeter, cTitle, oFont, lSave, bExtern ) [code=fw:tmhr1fw9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// --- Impresion del contenido de un browse</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ImprimeVent<span style="color: #000000;">&#40;</span>aVent,lExcel<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oFont,nReg<br /><br /><span style="color: #00C800;">if</span> lExcel<br />&nbsp;<span style="color: #00C800;">if</span> confirma<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'La generación en Excel se realizará con toda la informaci¢n'</span>+CR_LF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">'que contenga la ventana activa.'</span>+CR_LF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">'¿Desea continuar?'</span>,<span style="color: #ff0000;">'N'</span><span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">'N'</span><br />&nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br />&nbsp;<span style="color: #00C800;">endif</span><br />&nbsp;nReg:=recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">if</span> lHIJA<br />&nbsp; oBROWSEHIJA:<span style="color: #000000;">ExcelOle</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span>,.t.,<span style="color: #00C800;">NIL</span>,TITVENT<span style="color: #000000;">&#41;</span><br />&nbsp; oBROWSEHIJA:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; dbgoto<span style="color: #000000;">&#40;</span>nReg<span style="color: #000000;">&#41;</span><br />&nbsp;elseif TIPO_VENT==<span style="color: #ff0000;">'T'</span><br />&nbsp; oBROWSE:<span style="color: #000000;">ExcelOle</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIL</span>,.t.,<span style="color: #00C800;">NIL</span>,TITVENT<span style="color: #000000;">&#41;</span><br />&nbsp; oBROWSE:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; dbgoto<span style="color: #000000;">&#40;</span>nReg<span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">endif</span><br />&nbsp;CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;DespVent<span style="color: #000000;">&#40;</span>aVent<span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #00C800;">else</span><br />&nbsp;<span style="color: #00C800;">if</span> confirma<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'La impresi¢n se realizará con toda la informaci¢n'</span>+CR_LF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">'que contenga la ventana activa.'</span>+CR_LF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">'¿Desea continuar?'</span>,<span style="color: #ff0000;">'N'</span><span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">'N'</span><br />&nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br />&nbsp;<span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">endif</span><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;">-8</span><br /><span style="color: #00C800;">if</span> lHIJA<br />&nbsp;oBROWSEHIJA:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span>TITVENT,.t.,oFont<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br />&nbsp;oBROWSE:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span>TITVENT,.t.,oFont<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:tmhr1fw9] y si me genera correctamente el excel o manda la impresion. Pero cuando es hace excel lo genera pero como le are para que me lo despliegue en pantalla justo cuando lo termina, me lo genera pero me aparaece minimizado en la barra de tareas. al final del ExcelOle() [code=fw:tmhr1fw9]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> lActivate<br />&nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A1"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oExcel:<span style="color: #000000;">Visible</span> := .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">Reset</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:tmhr1fw9] Existira un cambio o como puedo abrir automaticamente el excel creado. gracias.
Como abrir el excel automatico con tsbrowse?
Mira se ayuda, [code=fw:1tdf6qwo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* TSBrowse testing Excel conections - testxls.prg<br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"<span style="color: #000000;">\T</span>SBrowse<span style="color: #000000;">\I</span>nclude<span style="color: #000000;">\T</span>SBrowse.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> CLR_PINK &nbsp; nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#define</span> CLR_NBLUE &nbsp;nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">192</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Static</span> oWnd, oBrw<br /><br />Request DBFCDX<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> oBmp, oBar, oFont, oFont1, oBrush, oCol, cTitle, lGrid<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> File<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Employee.cdx"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; FErase<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Employee.cdx"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;Use Employee Shared <span style="color: #00C800;">New</span> Via <span style="color: #ff0000;">"DBFCDX"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">Index</span> <span style="color: #0000ff;">On</span> First+Last Tag <span style="color: #0000ff;">Name</span><br /><br />&nbsp; &nbsp;<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;">-13</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Font</span> oFont1 <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;">-13</span> NESCAPEMENT <span style="color: #000000;">900</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Brush</span> oBrush <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">"CoverBack"</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Define</span> BitMap oBmp <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">"Selector"</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Window</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TSBrowse/Excel conectivity. &nbsp; &nbsp;One Click From TSBrowse To Excel &nbsp; And more..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Brush</span> oBrush ;<br />&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;<span style="color: #00C800;">If</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> FWVERSION, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> >= <span style="color: #ff0000;">"7.12"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">ButtonBar</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">Size</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> 3D <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">ButtonBar</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">Size</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> 3D<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;cTitle := <span style="color: #ff0000;">"Database: "</span> + Trim<span style="color: #000000;">&#40;</span> StrCapFirst<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">".dbf"</span><br /><br />&nbsp; &nbsp;bExtern := <span style="color: #000000;">&#123;</span>|oSheet| oSheet:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NumberFormat"</span>, <span style="color: #ff0000;">"#,##0.00"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</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> <span style="color: #ff0000;">"Excel"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Action</span> oBrw:<span style="color: #000000;">ExcelOle</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Test.xls"</span>, .T.,, cTitle,,, bExtern <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToolTip <span style="color: #ff0000;">"Export Browse to Excel"</span><br /><br />&nbsp; &nbsp;lGrid &nbsp; := .T.<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> <span style="color: #ff0000;">"Print"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Action</span> oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span> cTitle,,,,,,,, lGrid <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToolTip <span style="color: #ff0000;">"Export Browse to Excel"</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> <span style="color: #ff0000;">"Exit"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Action</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ToolTip <span style="color: #ff0000;">"Exit"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> Browse oBrw <span style="color: #0000ff;">Alias</span> <span style="color: #ff0000;">"Employee"</span> <span style="color: #0000ff;">Of</span> oWnd <span style="color: #0000ff;">Size</span> oWnd:<span style="color: #000000;">nWidth</span>, oWnd:<span style="color: #000000;">nHeight</span> <span style="color: #0000ff;">Pixel</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Font</span> oFont <span style="color: #0000ff;">AutoCols</span> Transparent Selector oBmp Editable<br /><br />&nbsp; &nbsp;Add <span style="color: #00C800;">Super</span> Header <span style="color: #0000ff;">To</span> oBrw <span style="color: #0000ff;">From</span> Column <span style="color: #000000;">2</span> <span style="color: #0000ff;">To</span> Column <span style="color: #000000;">3</span> <span style="color: #0000ff;">Color</span> CLR_BLUE, <span style="color: #000000;">&#123;</span> CLR_NBLUE, CLR_WHITE <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"Name"</span> 3DLook<br /><br />&nbsp; &nbsp;Add <span style="color: #00C800;">Super</span> Header <span style="color: #0000ff;">To</span> oBrw <span style="color: #0000ff;">FROM</span> Column <span style="color: #000000;">4</span> <span style="color: #0000ff;">TO</span> Column <span style="color: #000000;">6</span> <span style="color: #0000ff;">Color</span> CLR_BLUE, <span style="color: #000000;">&#123;</span> CLR_NBLUE, CLR_WHITE <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"Address"</span> 3DLook<br /><br />&nbsp; &nbsp;With Object oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nHeightCell</span> += <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nHeightHead</span> += <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nHeightSuper</span> += <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> CLR_HEADF, CLR_HEADB, CLR_FOCUSF, CLR_FOCUSB <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> CLR_BLUE, <span style="color: #000000;">&#123;</span> CLR_WHITE, CLR_NBLUE, <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CLR_BLACK, <span style="color: #000000;">-1</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">ChangeFont</span><span style="color: #000000;">&#40;</span> oFont1, <span style="color: #000000;">9</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nHAlign</span> := DT_VERT<br />&nbsp; &nbsp;End With<br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := oBrw<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> FWVERSION, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> >= <span style="color: #ff0000;">"7.12"</span><br />&nbsp; &nbsp; &nbsp; Set <span style="color: #0000ff;">Message</span> <span style="color: #0000ff;">Of</span> oWnd Clock Date Keyboard Noinset <span style="color: #000000;">2007</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; SET <span style="color: #0000ff;">Message</span> <span style="color: #0000ff;">Of</span> oWnd Clock Date Keyboard Noinset<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">Window</span> oWnd <span style="color: #0000ff;">Maximized</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBmp:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;DbCloseAll<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: #B900B9;">//--------------------------------------------------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Static</span> <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: #00C800;">If</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> FWVERSION, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> >= <span style="color: #ff0000;">"7.12"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span> oMenu<br />&nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENU</span> oMenu<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"TSBrowse"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Excel"</span> <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">"Excel16"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Action</span> oBrw:<span style="color: #000000;">ExcelOle</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Test.xls"</span>, .T.,, <span style="color: #ff0000;">"Here you are"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">"Exit16"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Action</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Exit"</span> <span style="color: #0000ff;">Action</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Help"</span> <span style="color: #0000ff;">Action</span> WinExec<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Start ..<span style="color: #000000;">\d</span>oc<span style="color: #000000;">\H</span>elp.htm"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">Return</span> oMenu<br />&nbsp;</div>[/code:1tdf6qwo] Saludos.
Como abrir el excel automatico con tsbrowse?
[code=fw:268gj1w0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />* ============================================================================<br />* <span style="color: #00C800;">METHOD</span> TSBrowse:<span style="color: #000000;">ExcelOle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> Version <span style="color: #000000;">9.0</span> Nov/<span style="color: #000000;">30</span>/<span style="color: #000000;">2009</span><br />* Requires TOleAuto <span style="color: #00C800;">class</span><br />* Many thanks <span style="color: #0000ff;">to</span> Victor Manuel Tomás <span style="color: #00C800;">for</span> the core <span style="color: #0000ff;">of</span> this <span style="color: #00C800;">method</span><br />* ============================================================================<br /><br /><span style="color: #00C800;">METHOD</span> ExcelOle<span style="color: #000000;">&#40;</span> cXlsFile, lActivate, oMeter, cTitle, oFont, lSave, bExtern, aColSel, bPrintRow <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TSBrowse<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oExcel, oBook, oSheet, nRow, nCol, uData, nEvery, oRange, cRange, cCell, cLet, nColHead, nVar, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bError, cText, oClip, nStart, aRepl, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLine &nbsp;:= <span style="color: #000000;">1</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCount := <span style="color: #000000;">0</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRecNo := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAt &nbsp; &nbsp;:= ::<span style="color: #000000;">nAt</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aCol := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">78</span>, <span style="color: #000000;">104</span>, <span style="color: #000000;">130</span>, <span style="color: #000000;">156</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aLet := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"A"</span>, <span style="color: #ff0000;">"B"</span>, <span style="color: #ff0000;">"C"</span>, <span style="color: #ff0000;">"D"</span>, <span style="color: #ff0000;">"E"</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> lActivate := Empty<span style="color: #000000;">&#40;</span> cXlsFile <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cTitle &nbsp; &nbsp;:= <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> lSave &nbsp; &nbsp;:= ! lActivate .and. ! Empty<span style="color: #000000;">&#40;</span> cXlsFile <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cXlsFile := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ::<span style="color: #000000;">lSelector</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aClipBoard</span> := <span style="color: #000000;">&#123;</span> OClone<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">DelColumn</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;cLet := aLet<span style="color: #000000;">&#91;</span> AScan<span style="color: #000000;">&#40;</span> aCol, <span style="color: #000000;">&#123;</span>|e| Len<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> aColSel != <span style="color: #00C800;">Nil</span>, aColSel, ::<span style="color: #000000;">aColumns</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <= e <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> cLet <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nCol := AScan<span style="color: #000000;">&#40;</span> aLet, cLet <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; cLet += Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span> + Len<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> aColSel != <span style="color: #00C800;">Nil</span>, aColSel, ::<span style="color: #000000;">aColumns</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - aCol<span style="color: #000000;">&#91;</span> <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, nCol <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; cLet := Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span> + Len<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> aColSel != <span style="color: #00C800;">Nil</span>, aColSel, ::<span style="color: #000000;">aColumns</span> <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;">EndIf</span><br /><br />&nbsp; &nbsp;aRepl &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lNoPaint</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oMeter != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; oMeter:<span style="color: #000000;">nTotal</span> := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLen</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> * Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">30</span><br />&nbsp; &nbsp; &nbsp; oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oMeter:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nEvery := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, Int<span style="color: #000000;">&#40;</span> oMeter:<span style="color: #000000;">nTotal</span> * .<span style="color: #000000;">02</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// refresh ometer every 2 %</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> cXlsFile <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cXlsFile := AllTrim<span style="color: #000000;">&#40;</span> StrTran<span style="color: #000000;">&#40;</span> Upper<span style="color: #000000;">&#40;</span> cXlsFile <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">".XLS"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;cTitle &nbsp; := AllTrim<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;bError &nbsp; := ErrorBlock<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> | x | <span style="color: #00C800;">Break</span><span style="color: #000000;">&#40;</span> x <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Begin Sequence<br />&nbsp; &nbsp; &nbsp; oExcel := TOleAuto<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;">"Excel.Application"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Recover<br />&nbsp; &nbsp; &nbsp; ErrorBlock<span style="color: #000000;">&#40;</span> bError <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No Ole.lib searched"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp;End Sequence<br /><br />&nbsp; &nbsp;ErrorBlock<span style="color: #000000;">&#40;</span> bError <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oMeter != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; nCount -= <span style="color: #000000;">15</span><br />&nbsp; &nbsp; &nbsp; oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> nCount <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBook &nbsp;:= oExcel:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ActiveWorkBook"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oSheet := oExcel:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ActiveSheet"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oMeter != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; nCount -= <span style="color: #000000;">15</span><br />&nbsp; &nbsp; &nbsp; oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> nCount <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bGoTop</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cText := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">For</span> nRow := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> ::<span style="color: #000000;">nLen</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> nRow == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> nLine++, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := AllTrim<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A1:"</span> + cLet + <span style="color: #ff0000;">"1"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"HorizontalAlignment"</span>, xlHAlignCenterAcrossSelection <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++nLine<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nStart := nLine<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nStart := nLine<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSuperHead</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSuperHead</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nVar := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lSelector</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uData := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSuperhead</span><span style="color: #000000;">&#91;</span> nCol, <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSuperhead</span><span style="color: #000000;">&#91;</span> nCol, <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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aSuperhead</span><span style="color: #000000;">&#91;</span> nCol, <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; &nbsp;oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> nLine, ::<span style="color: #000000;">aSuperHead</span><span style="color: #000000;">&#91;</span> nCol, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> - nVar <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := uData<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cRange := &nbsp;Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span> + ::<span style="color: #000000;">aSuperHead</span><span style="color: #000000;">&#91;</span> nCol, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> - nVar <span style="color: #000000;">&#41;</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> nLine <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">":"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span> + ::<span style="color: #000000;">aSuperHead</span><span style="color: #000000;">&#91;</span> nCol, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> - nVar <span style="color: #000000;">&#41;</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> nLine <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> cRange <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Borders</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">LineStyle</span> := xlContinuous<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> cRange <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"HorizontalAlignment"</span>, xlHAlignCenterAcrossSelection <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nStart := nLine ++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nColHead := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">For</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> aColSel != <span style="color: #00C800;">Nil</span> .and. AScan<span style="color: #000000;">&#40;</span> aColSel, nCol <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Loop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uData := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeading</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeading</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; ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cHeading</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"C"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Loop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uData := StrTran<span style="color: #000000;">&#40;</span> uData, CRLF, Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nColHead ++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> nLine, nColHead <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := uData<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> oMeter != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> nCount % nEvery == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> nCount <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; &nbsp; &nbsp; &nbsp;nCount ++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Next</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStart := ++ nLine<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> bPrintRow != <span style="color: #00C800;">Nil</span> .and. ! Eval<span style="color: #000000;">&#40;</span> bPrintRow, nRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<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; &nbsp; &nbsp; &nbsp; &nbsp;Loop<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> aColSel != <span style="color: #00C800;">Nil</span> .and. AScan<span style="color: #000000;">&#40;</span> aColSel, nCol <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Loop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uData := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bData</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"C"</span> .and. <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> CRLF, uData <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uData := StrTran<span style="color: #000000;">&#40;</span> uData, CRLF, <span style="color: #ff0000;">"&&"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Chr( 10 ) )</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> AScan<span style="color: #000000;">&#40;</span> aRepl, nCol <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aRepl, nCol <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;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cPicture</span> != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uData := Transform<span style="color: #000000;">&#40;</span> uData, ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cPicture</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uData &nbsp;:= &nbsp;<span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">"D"</span>, DtoC<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">"N"</span>, Str<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">"L"</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> uData ,<span style="color: #ff0000;">".T."</span> ,<span style="color: #ff0000;">".F."</span> <span style="color: #000000;">&#41;</span>, cValToChar<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cText += Trim<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span> + Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> oMeter != <span style="color: #00C800;">Nil</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> nCount % nEvery == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> nCount <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nCount ++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span><br /><br />&nbsp; &nbsp; &nbsp; ::<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; &nbsp; &nbsp; cText += Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">13</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; ++nLine<br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">/*<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Cada 20k volcamos el texto a la hoja de Excel , usando el portapapeles , algo muy rapido y facil ;-)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Every 20k set text into excel sheet , using Clipboard , very easy and faster.<br />&nbsp; &nbsp; &nbsp; */</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Len<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">20000</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oClip := TClipBoard<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;oClip:<span style="color: #000000;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oClip:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cCell := <span style="color: #ff0000;">"A"</span> + Alltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> nStart <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRange := oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> cCell <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oRange:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSheet:<span style="color: #000000;">Paste</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oClip:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cText := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nStart := nLine + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> AScan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">cFooting</span> != <span style="color: #00C800;">Nil</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> <span style="color: #000000;">&#40;</span> aColSel != <span style="color: #00C800;">Nil</span> .and. AScan<span style="color: #000000;">&#40;</span> aColSel, nCol <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> .or. ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooting</span> == <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Loop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uData := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooting</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooting</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aColumns</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cFooting</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uData := cValTochar<span style="color: #000000;">&#40;</span> uData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uData := StrTran<span style="color: #000000;">&#40;</span> uData, CRLF, Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSheet:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> nLine, nCol <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := uData<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ::<span style="color: #000000;">lIsDbf</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DbGoTo<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nAt</span> := nAt<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> Len<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; oClip := TClipBoard<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; oClip:<span style="color: #000000;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oClip:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cCell := <span style="color: #ff0000;">"A"</span> + Alltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> nStart <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRange := oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> cCell <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRange:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Paste</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oClip:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cText := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;nLine := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> cTitle <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nLIne += <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSuperHead</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cRange := <span style="color: #ff0000;">"A"</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> nLine <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">":"</span> + cLet + Alltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oSheet:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Rows</span>:<span style="color: #0000ff;">Count</span><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 />&nbsp; &nbsp;oRange := oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> cRange <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oFont != <span style="color: #00C800;">Nil</span> <span style="color: #B900B9;">// let the programmer to decide the font he wants, otherwise use Excel's default</span><br />&nbsp; &nbsp; &nbsp; oRange:<span style="color: #0000ff;">Font</span>:<span style="color: #0000ff;">Name</span> := oFont:<span style="color: #000000;">cFaceName</span><br />&nbsp; &nbsp; &nbsp; oRange:<span style="color: #0000ff;">Font</span>:<span style="color: #0000ff;">Size</span> := oFont:<span style="color: #000000;">nSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oRange:<span style="color: #0000ff;">Font</span>:<span style="color: #000000;">Bold</span> := oFont:<span style="color: #000000;">lBold</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> aRepl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> aRepl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSheet:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span> + aRepl<span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Replace</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"&&"</span>, Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> bExtern != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> bExtern, oSheet, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;oRange:<span style="color: #000000;">Borders</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">LineStyle</span> := xlContinuous<br />&nbsp; &nbsp;oRange:<span style="color: #000000;">Columns</span>:<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> aRepl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span> aRepl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSheet:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span> + aRepl<span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">WrapText</span> := .T.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> oMeter != <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; oMeter:<span style="color: #000000;">Set</span><span style="color: #000000;">&#40;</span> oMeter:<span style="color: #000000;">nTotal</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> ::<span style="color: #000000;">lSelector</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">InsColumn</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aClipBoard</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">aClipBoard</span><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; ::<span style="color: #000000;">lNoPaint</span> := .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> ! Empty<span style="color: #000000;">&#40;</span> cXlsFile <span style="color: #000000;">&#41;</span> .and. lSave<br />&nbsp; &nbsp; &nbsp; oBook:<span style="color: #000000;">SaveAs</span><span style="color: #000000;">&#40;</span> cXlsFile, xlWorkbookNormal <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> ! lActivate<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oExcel:<span style="color: #000000;">Quit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Reset</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">EndIf</span><br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> lActivate<br />&nbsp; &nbsp; &nbsp; oSheet:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A1"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oExcel:<span style="color: #000000;">Visible</span> := .T.<br />&nbsp; &nbsp;<span style="color: #00C800;">EndIf</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">Reset</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br />&nbsp;</div>[/code:268gj1w0] 
Como abrir el excel automatico con tsbrowse?
Noe, perdona por el post, pero yo cambiaría a XBrownse, con posibilidades infinitas y el soporte de MR. Raó. No te arrepentirás. Mira los ejemplos y busca en el foro. Hay mucha información, puedes hacer cualquier cosa. Saludos. Jose. Enviado desde mi POCOPHONE F1 mediante Tapatalk
Como abrir el navegador desde mi aplicación.
Hola de nuevo a todos los foristas. En esta oportunidad quisiera saber si alguno de Uds., me ayuda a encontrar la solución a lo sigiente: Necesito una rutina que al hacer click sobre un botón, abra el navegador de internet que el usuario tenga por defecto en su maquina y con la pagina web cuyo link se encuentre al momento en el portapapeles. Se ve sencillo pero no he podido. Trate con el SchellExecute pero por lo que veo necesito indicarle el ejecutable del navegador y asi no me sirve. Necesito que se abra el que este por defecto en el equipo donde se ejecuta mi aplicación. Alguna sugerencia de que puedo usar para encontrar la solución ? Como siempre, agradecido de antemano a quienes me ayuden.. un Gran Abrazo a todos...
Como abrir el navegador desde mi aplicación.
has usado turl? salu2 carlos vargas
Como abrir el navegador desde mi aplicación.
Hola Carlos, Gracias por tu gentil ayuda. Ya voy a investigar... Saludos.
Como abrir indices ya existentes?
Ayuda, ¿Como se usan índices, si ya existen?. Mi rutina de apertura de ficheros siempre LOS CREA y asi funciona, pero claro esto no es operativo. Gracias de antemano
Como acceder a bases de datos MySQL con FWH y Eagle1
Debido a que muchos me habéis escrito para saber donde ver los ejemplos...Saludos <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Como acceder a bases de datos MySQL con FWH y Eagle1
Hola Manolo,Te agradecemos si publicas aqui los ejemplos directamente, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Como acceder a bases de datos MySQL con FWH y Eagle1
OK Antonio <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> Cómo puedo adjuntar los ejemplos?, Te los envío a tí?
Como acceder a bases de datos MySQL con FWH y Eagle1
Aquí os dejo el código el PRG de un mantenimiento completo de una tabla en MySQL. Verá que hay altas, modificaciones, bajas, listados, ordenación y búsquedas... todo con muy poco código y una rapidez que reto a cualquiera que la supere con otras libsSaludos[code:1e0mghk0]//---------------------------------------------------------------------------// // AUTOR&#46;&#46;&#46;&#46;&#46;&#58; Manuel Expósito Suárez Soft4U 2002-2008 // // e-Mail&#46;&#46;&#46;&#46;&#58; messoft@gmail&#46;com // // CLASE&#46;&#46;&#46;&#46;&#46;&#58; TMyTable // // FECHA MOD&#46;&#58; 15/05/2008 // // VERSION&#46;&#46;&#46;&#58; v5&#46;05 // // PROPOSITO&#46;&#58; Ejemplo uso Egle1 + FW con Browse de FW // //---------------------------------------------------------------------------// #include "Eagle1&#46;ch" #include "FiveWin&#46;ch" //---------------------------------------------------------------------------// // Son estaticas para que sean visibles desde todo el PRG un poco por // comodidad static oConnect // Objeto conexion static oDS // Objeto DataSet static oWnd // Objetos de FWH //---------------------------------------------------------------------------// function main&#40;&#41; local oBrush SET DATE FORMAT TO "DD/MM/YYYY" if AbrirTodo&#40;&#41; DEFINE BRUSH oBrush STYLE BORLAND DEFINE WINDOW oWnd FROM 4, 4 TO 40, 120 ; TITLE "Ejemplo de manteniento de una tabla con Eagle1 y FWH" ; MENU BuildMenu&#40;&#41; ; BRUSH oBrush SET MESSAGE OF oWnd; TO oDS&#58;cVersion + " por " + oDS&#58;cAuthor CLOCK DATE ACTIVATE WINDOW oWnd else Salir&#40;&#41; endif return&#40; nil &#41; //----------------------------------------------------------------------------// function BuildMenu&#40;&#41; local oMenu MENU oMenu MENUITEM "&Mantenimiento" ACTION Mantenimiento&#40;&#41; MENUITEM "&Utilities" MENU MENUITEM "&Calculadora" ACTION WinExec&#40; "Calc" &#41; ; MESSAGE "Lamando a la calculadora de Windows" SEPARATOR MENUITEM "&Escribir" ACTION WinExec&#40; "Write" &#41; ; MESSAGE "Llamando a Write de Windows" ENDMENU MENUITEM "&Salir" MENU MENUITEM "&Acerca de&#46;&#46;&#46;" ; ACTION MsgAbout&#40; oDS&#58;cAuthor, oDS&#58;cVersion &#41; ; MESSAGE "Informa sobre la versión de Eagle1" SEPARATOR MENUITEM "&Salir"; ACTION Salir&#40;&#41;; MESSAGE "Salir del ejemplo de Eagle1 y FWH" ENDMENU ENDMENU return oMenu //----------------------------------------------------------------------------// // static function AbrirTodo&#40;&#41; local cHost &#58;= "127&#46;0&#46;0&#46;1" local cUser &#58;= "root" local cPassword &#58;= "root" local cDbName &#58;= "E1Prueba" local cTabla &#58;= "Test" local lRet // Creamos el objeto "connexion" oConnect &#58;= TMSConnect&#40;&#41;&#58;New&#40;&#41; // Nos conectamos al servidor lRet &#58;= oConnect&#58;Connect&#40; cHost, cUser, cPassword, cDbName &#41; if !lRet MsgInfo&#40; "No hay conexion con el servidor", "Operación Cancelada" &#41; else oDS &#58;= TMyTable&#40;&#41;&#58;New&#40; oConnect, cTabla &#41; oDS&#58;SetReadPADAll&#40; &#46;t&#46; &#41; // Abrimos la tabla, traemos el resultado a nuestro cliente lRet &#58;= oDS&#58;Open&#40;&#41; if !lRet MsgInfo&#40; "No se puede abrir la tabla&#58; " + cTabla, "Operación Cancelada" &#41; endif endif return&#40; lRet &#41; //----------------------------------------------------------------------------// // static procedure Salir&#40;&#41; if ValType&#40; oDS &#41; == "O" oDS&#58;Free&#40;&#41; endif if ValType&#40; oConnect &#41; == "O" oConnect&#58;Free&#40;&#41; endif if ValType&#40; oWnd &#41; == "O" oWnd&#58;End&#40;&#41; endif return //----------------------------------------------------------------------------// static procedure Mantenimiento&#40;&#41; local oDlg, oLbx DEFINE DIALOG oDlg FROM 3, 3 TO 40, 100 TITLE "Mantenimiento tabla TEST" @ 00, 01 SAY " &Datos tabla&#46;&#46;&#46;" OF oDlg @ 01,01 LISTBOX oLbx ; FIELDS ; PadL&#40; oDS&#58;FieldGet&#40; 1 &#41;, 6, " " &#41;,; oDS&#58;FieldGet&#40; 02 &#41;, ; oDS&#58;FieldGet&#40; 03 &#41;, ; oDS&#58;FieldGet&#40; 04 &#41;, ; oDS&#58;FieldGet&#40; 05 &#41;, ; oDS&#58;FieldGet&#40; 06 &#41;, ; oDS&#58;FieldGet&#40; 07 &#41;, ; oDS&#58;FieldGet&#40; 09 &#41;, ; oDS&#58;FieldGet&#40; 08 &#41; ; HEADERS ; oDS&#58;FieldName&#40; 01 &#41;, ; oDS&#58;FieldName&#40; 02 &#41;, ; oDS&#58;FieldName&#40; 03 &#41;, ; oDS&#58;FieldName&#40; 04 &#41;, ; oDS&#58;FieldName&#40; 05 &#41;, ; oDS&#58;FieldName&#40; 06 &#41;, ; oDS&#58;FieldName&#40; 07 &#41;, ; oDS&#58;FieldName&#40; 09 &#41;, ; oDS&#58;FieldName&#40; 08 &#41; ; SIZE 365, 220 OF oDlg MySetBrowse&#40; oLbx, oDS &#41; // Asigna los codeBlock de movimiento oLbx&#58;cAlias &#58;= "ARRAY" // Para que el gestor de listados no de error oLbx&#58;lCellStyle &#58;= &#46;t&#46; @ 14, 01 BUTTON "&Añadir" OF oDlg SIZE 35, 12; ACTION CtrDatos&#40; oLbx, &#46;t&#46; &#41; @ 14, 08 BUTTON "&Modificar" OF oDlg SIZE 35, 12; ACTION CtrDatos&#40; oLbx, &#46;f&#46; &#41; @ 14, 15 BUTTON "&Borrar" OF oDlg SIZE 35, 12; ACTION Borrar&#40; oLbx &#41; @ 14, 22 BUTTON "&Ordenar" OF oDlg SIZE 35, 12; ACTION Ordernar&#40; oLbx &#41; @ 14, 29 BUTTON "B&uscar" OF oDlg SIZE 35, 12; ACTION Buscar&#40; oLbx &#41; @ 14, 36 BUTTON "Listar" OF oDlg SIZE 35, 12; ACTION &#40; oLbx&#58;Report&#40; "Listado de la tabla", &#46;t&#46; &#41;, oDS&#58;GoTop&#40;&#41; &#41; @ 14, 57 BUTTON "&Salir" OF oDlg ; ACTION oDlg&#58;End&#40;&#41; SIZE 35, 12 ACTIVATE DIALOG oDlg CENTERED return //----------------------------------------------------------------------------// // Borra la fila actual static procedure Borrar&#40; oBrw &#41; local nRecNo &#58;= oDS&#58;RecNo&#40;&#41; if MsgYesNo&#40; "Realmente quiere borrar el registro " + StrNum&#40; oDS&#58;RecNo&#40;&#41; &#41; + "?" &#41; if oDS&#58;Delete&#40; , 1 &#41; MyMsgInfo&#40; "Borrado en el servidor" &#41; if MsgYesNo&#40; "Refresca la lista?" &#41; oDS&#58;Refresh&#40;&#41; oDS&#58;GoTo&#40; nRecNo &#41; oBrw&#58;Refresh&#40;&#41; endif endif else MyMsgInfo&#40; "No se ha borrado&#46;&#46;&#46;" &#41; endif return //----------------------------------------------------------------------------// // Establece un nuevo orden de visualizacion static procedure Ordernar&#40; oLbxPrincipal &#41; local oDlg, oLbx local i &#58;= oDS&#58;FieldCount&#40;&#41; local aFld &#58;= Array&#40; i &#41; local n, cValue FOR n &#58;= 1 TO i aFld&#91; n &#93; &#58;= oDS&#58;FieldName&#40; n &#41; NEXT n &#58;= 0 DEFINE DIALOG oDlg FROM 2, 2 TO 18, 30; TITLE "Eagle1, FW y ListBox" ; STYLE nOr&#40; DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 &#41; @ 1, 02 LISTBOX oLbx; VAR cValue; ITEMS aFld; SIZE 80, 70; OF oDlg @ 5, 02 BUTTON "&Seleccionar"; OF oDlg; SIZE 40, 12; DEFAULT; ACTION &#40; MyMsgInfo&#40; "Orden&#58; " + Str&#40; n &#58;= oLbx&#58;GetPos&#40;&#41; &#41; + ; + CRLF + "Nombre del campo&#58; " + cValue, "Has elegido" &#41;, ; oDlg&#58;End&#40;&#41; &#41; @ 5, 10 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg CENTERED if n != 0 &#46;and&#46; oDS&#58;SetOrder&#40; n &#41; oLbxPrincipal&#58;GoTop&#40;&#41; oLbxPrincipal&#58;Refresh&#40;&#41; else MyMsgInfo&#40; "No se ha establacido otro orden&#46;&#46;&#46;" &#41; endif return //----------------------------------------------------------------------------// static procedure Buscar&#40; oLb &#41; local oDlg local i &#58;= oDS&#58;FieldCount&#40;&#41; local n &#58;= 1 local oSay, cSay &#58;= "&Valor campo " local oGet, uVal DEFINE DIALOG oDlg FROM 2, 2 TO 12, 70; TITLE "Búsqueda de valores en el DataSet" ; STYLE nOr&#40; DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 &#41; @ 01, 01 SAY "&Numero de columna &#40; 1 - " + StrNum&#40; i &#41; + " &#41;&#58;" OF oDlg @ 01, 10 GET n PICTURE "999" ; VALID &#40; uVal &#58;= oDS&#58;FieldGet&#40; n &#41;, oGet&#58;Refresh&#40;&#41;, ; oSay&#58;SetText&#40; cSay + oDS&#58;FieldName&#40; n &#41; &#41;, n > 0 &#46;and&#46; n <= i &#41; ; OF oDlg @ 02, 01 SAY oSay VAR cSay OF oDlg @ 02, 10 GET oGet VAR uVal SIZE 160, 13 OF oDlg @ 3, 02 BUTTON "&Buscar"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; oDS&#58;Find&#40; n, uVal, &#46;t&#46; &#41;, ; MyMsgInfo&#40; "Valor encontrado" &#41;, ; MyMsgInfo&#40; "Valor no encontrado" &#41; &#41;, oLb&#58;Refresh&#40;&#41; &#41; @ 3, 10 BUTTON "S&iguiente"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; !oDS&#58;FindNext&#40;&#41;, MyMsgInfo&#40; "No hay más&#46; Se llegó al final" &#41;, &#41;, ; oLb&#58;Refresh&#40;&#41; &#41; @ 3, 18 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg return //----------------------------------------------------------------------------// static procedure CtrDatos&#40; oLb, lNuevo &#41; local oDlg local cQueHago if lNuevo cQueHago &#58;= "Altas" oDS&#58;Blank&#40;&#41; else cQueHago &#58;= "Modificación" oDS&#58;Load&#40;&#41; endif DEFINE DIALOG oDlg FROM 2, 2 TO 30, 80; TITLE "Mantenimiento de la tabla Test - " + cQueHago; STYLE nOr&#40; DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 &#41; @ 01, 01 SAY "First" OF oDlg @ 01, 05 GET oDS&#58;First PICTURE "@K" UPDATE OF oDlg @ 1&#46;8, 01 SAY "Last" OF oDlg @ 02, 05 GET oDS&#58;Last PICTURE "@K" UPDATE OF oDlg @ 2&#46;6, 01 SAY "Street" OF oDlg @ 03, 05 GET oDS&#58;Street PICTURE "@K" UPDATE OF oDlg @ 3&#46;5, 01 SAY "City" OF oDlg @ 04, 05 GET oDS&#58;City PICTURE "@K" UPDATE OF oDlg @ 4&#46;4, 01 SAY "State" OF oDlg @ 05, 05 GET oDS&#58;State PICTURE "@K" UPDATE OF oDlg @ 5&#46;2, 01 SAY "Zip" OF oDlg @ 06, 05 GET oDS&#58;Zip PICTURE "@K" UPDATE OF oDlg @ 6&#46;1, 01 SAY "Hiredate" OF oDlg @ 07, 05 GET oDS&#58;Hiredate PICTURE "@K" UPDATE OF oDlg @ 7&#46;0, 01 SAY "Married" OF oDlg @ 08, 05 GET oDS&#58;Married PICTURE "@K" UPDATE OF oDlg @ 7&#46;9, 01 SAY "Age" OF oDlg @ 09, 05 GET oDS&#58;Age PICTURE "@K" UPDATE OF oDlg @ 8&#46;9, 01 SAY "Salary" OF oDlg @ 10, 05 GET oDS&#58;Salary PICTURE "@K" UPDATE OF oDlg @ 9&#46;8, 01 SAY "Notes" OF oDlg @ 11, 05 GET oDS&#58;Notes PICTURE "@K" UPDATE OF oDlg @ 10, 02 BUTTON "&Vale"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; lNuevo, oDS&#58;Insert&#40; &#46;t&#46; &#41;, oDS&#58;Update&#40; &#46;t&#46; &#41; &#41;, ; oLb&#58;Refresh&#40;&#41;, oDlg&#58;End&#40;&#41; &#41; @ 10, 10 BUTTON "&Cancelar"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; lNuevo, oDS&#58;Blank&#40;&#41;, oDS&#58;Load&#40;&#41; &#41;, oDlg&#58;Update&#40;&#41; &#41; @ 10, 18 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg return //----------------------------------------------------------------------------// [/code:1e0mghk0]
Como acceder a bases de datos MySQL con FWH y Eagle1
[quote="xmanuel":2b91bdwm]Aquí os dejo el código el PRG de un mantenimiento completo de una tabla en MySQL. Verá que hay altas, modificaciones, bajas, listados, ordenación y búsquedas... todo con muy poco código y una rapidez que reto a cualquiera que la supere con otras libs Saludos Perdon muy interesante , alguien tiene el archivo [color=red:2b91bdwm][b:2b91bdwm]Eagle1.ch [/b:2b91bdwm][/color:2b91bdwm]me hace falta para hacer la prueba [code:2b91bdwm]//---------------------------------------------------------------------------// // AUTOR&#46;&#46;&#46;&#46;&#46;&#58; Manuel Expósito Suárez Soft4U 2002-2008 // // e-Mail&#46;&#46;&#46;&#46;&#58; messoft@gmail&#46;com // // CLASE&#46;&#46;&#46;&#46;&#46;&#58; TMyTable // // FECHA MOD&#46;&#58; 15/05/2008 // // VERSION&#46;&#46;&#46;&#58; v5&#46;05 // // PROPOSITO&#46;&#58; Ejemplo uso Egle1 + FW con Browse de FW // //---------------------------------------------------------------------------// #include "Eagle1&#46;ch" #include "FiveWin&#46;ch" //---------------------------------------------------------------------------// // Son estaticas para que sean visibles desde todo el PRG un poco por // comodidad static oConnect // Objeto conexion static oDS // Objeto DataSet static oWnd // Objetos de FWH //---------------------------------------------------------------------------// function main&#40;&#41; local oBrush SET DATE FORMAT TO "DD/MM/YYYY" if AbrirTodo&#40;&#41; DEFINE BRUSH oBrush STYLE BORLAND DEFINE WINDOW oWnd FROM 4, 4 TO 40, 120 ; TITLE "Ejemplo de manteniento de una tabla con Eagle1 y FWH" ; MENU BuildMenu&#40;&#41; ; BRUSH oBrush SET MESSAGE OF oWnd; TO oDS&#58;cVersion + " por " + oDS&#58;cAuthor CLOCK DATE ACTIVATE WINDOW oWnd else Salir&#40;&#41; endif return&#40; nil &#41; //----------------------------------------------------------------------------// function BuildMenu&#40;&#41; local oMenu MENU oMenu MENUITEM "&Mantenimiento" ACTION Mantenimiento&#40;&#41; MENUITEM "&Utilities" MENU MENUITEM "&Calculadora" ACTION WinExec&#40; "Calc" &#41; ; MESSAGE "Lamando a la calculadora de Windows" SEPARATOR MENUITEM "&Escribir" ACTION WinExec&#40; "Write" &#41; ; MESSAGE "Llamando a Write de Windows" ENDMENU MENUITEM "&Salir" MENU MENUITEM "&Acerca de&#46;&#46;&#46;" ; ACTION MsgAbout&#40; oDS&#58;cAuthor, oDS&#58;cVersion &#41; ; MESSAGE "Informa sobre la versión de Eagle1" SEPARATOR MENUITEM "&Salir"; ACTION Salir&#40;&#41;; MESSAGE "Salir del ejemplo de Eagle1 y FWH" ENDMENU ENDMENU return oMenu //----------------------------------------------------------------------------// // static function AbrirTodo&#40;&#41; local cHost &#58;= "127&#46;0&#46;0&#46;1" local cUser &#58;= "root" local cPassword &#58;= "root" local cDbName &#58;= "E1Prueba" local cTabla &#58;= "Test" local lRet // Creamos el objeto "connexion" oConnect &#58;= TMSConnect&#40;&#41;&#58;New&#40;&#41; // Nos conectamos al servidor lRet &#58;= oConnect&#58;Connect&#40; cHost, cUser, cPassword, cDbName &#41; if !lRet MsgInfo&#40; "No hay conexion con el servidor", "Operación Cancelada" &#41; else oDS &#58;= TMyTable&#40;&#41;&#58;New&#40; oConnect, cTabla &#41; oDS&#58;SetReadPADAll&#40; &#46;t&#46; &#41; // Abrimos la tabla, traemos el resultado a nuestro cliente lRet &#58;= oDS&#58;Open&#40;&#41; if !lRet MsgInfo&#40; "No se puede abrir la tabla&#58; " + cTabla, "Operación Cancelada" &#41; endif endif return&#40; lRet &#41; //----------------------------------------------------------------------------// // static procedure Salir&#40;&#41; if ValType&#40; oDS &#41; == "O" oDS&#58;Free&#40;&#41; endif if ValType&#40; oConnect &#41; == "O" oConnect&#58;Free&#40;&#41; endif if ValType&#40; oWnd &#41; == "O" oWnd&#58;End&#40;&#41; endif return //----------------------------------------------------------------------------// static procedure Mantenimiento&#40;&#41; local oDlg, oLbx DEFINE DIALOG oDlg FROM 3, 3 TO 40, 100 TITLE "Mantenimiento tabla TEST" @ 00, 01 SAY " &Datos tabla&#46;&#46;&#46;" OF oDlg @ 01,01 LISTBOX oLbx ; FIELDS ; PadL&#40; oDS&#58;FieldGet&#40; 1 &#41;, 6, " " &#41;,; oDS&#58;FieldGet&#40; 02 &#41;, ; oDS&#58;FieldGet&#40; 03 &#41;, ; oDS&#58;FieldGet&#40; 04 &#41;, ; oDS&#58;FieldGet&#40; 05 &#41;, ; oDS&#58;FieldGet&#40; 06 &#41;, ; oDS&#58;FieldGet&#40; 07 &#41;, ; oDS&#58;FieldGet&#40; 09 &#41;, ; oDS&#58;FieldGet&#40; 08 &#41; ; HEADERS ; oDS&#58;FieldName&#40; 01 &#41;, ; oDS&#58;FieldName&#40; 02 &#41;, ; oDS&#58;FieldName&#40; 03 &#41;, ; oDS&#58;FieldName&#40; 04 &#41;, ; oDS&#58;FieldName&#40; 05 &#41;, ; oDS&#58;FieldName&#40; 06 &#41;, ; oDS&#58;FieldName&#40; 07 &#41;, ; oDS&#58;FieldName&#40; 09 &#41;, ; oDS&#58;FieldName&#40; 08 &#41; ; SIZE 365, 220 OF oDlg MySetBrowse&#40; oLbx, oDS &#41; // Asigna los codeBlock de movimiento oLbx&#58;cAlias &#58;= "ARRAY" // Para que el gestor de listados no de error oLbx&#58;lCellStyle &#58;= &#46;t&#46; @ 14, 01 BUTTON "&Añadir" OF oDlg SIZE 35, 12; ACTION CtrDatos&#40; oLbx, &#46;t&#46; &#41; @ 14, 08 BUTTON "&Modificar" OF oDlg SIZE 35, 12; ACTION CtrDatos&#40; oLbx, &#46;f&#46; &#41; @ 14, 15 BUTTON "&Borrar" OF oDlg SIZE 35, 12; ACTION Borrar&#40; oLbx &#41; @ 14, 22 BUTTON "&Ordenar" OF oDlg SIZE 35, 12; ACTION Ordernar&#40; oLbx &#41; @ 14, 29 BUTTON "B&uscar" OF oDlg SIZE 35, 12; ACTION Buscar&#40; oLbx &#41; @ 14, 36 BUTTON "Listar" OF oDlg SIZE 35, 12; ACTION &#40; oLbx&#58;Report&#40; "Listado de la tabla", &#46;t&#46; &#41;, oDS&#58;GoTop&#40;&#41; &#41; @ 14, 57 BUTTON "&Salir" OF oDlg ; ACTION oDlg&#58;End&#40;&#41; SIZE 35, 12 ACTIVATE DIALOG oDlg CENTERED return //----------------------------------------------------------------------------// // Borra la fila actual static procedure Borrar&#40; oBrw &#41; local nRecNo &#58;= oDS&#58;RecNo&#40;&#41; if MsgYesNo&#40; "Realmente quiere borrar el registro " + StrNum&#40; oDS&#58;RecNo&#40;&#41; &#41; + "?" &#41; if oDS&#58;Delete&#40; , 1 &#41; MyMsgInfo&#40; "Borrado en el servidor" &#41; if MsgYesNo&#40; "Refresca la lista?" &#41; oDS&#58;Refresh&#40;&#41; oDS&#58;GoTo&#40; nRecNo &#41; oBrw&#58;Refresh&#40;&#41; endif endif else MyMsgInfo&#40; "No se ha borrado&#46;&#46;&#46;" &#41; endif return //----------------------------------------------------------------------------// // Establece un nuevo orden de visualizacion static procedure Ordernar&#40; oLbxPrincipal &#41; local oDlg, oLbx local i &#58;= oDS&#58;FieldCount&#40;&#41; local aFld &#58;= Array&#40; i &#41; local n, cValue FOR n &#58;= 1 TO i aFld&#91; n &#93; &#58;= oDS&#58;FieldName&#40; n &#41; NEXT n &#58;= 0 DEFINE DIALOG oDlg FROM 2, 2 TO 18, 30; TITLE "Eagle1, FW y ListBox" ; STYLE nOr&#40; DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 &#41; @ 1, 02 LISTBOX oLbx; VAR cValue; ITEMS aFld; SIZE 80, 70; OF oDlg @ 5, 02 BUTTON "&Seleccionar"; OF oDlg; SIZE 40, 12; DEFAULT; ACTION &#40; MyMsgInfo&#40; "Orden&#58; " + Str&#40; n &#58;= oLbx&#58;GetPos&#40;&#41; &#41; + ; + CRLF + "Nombre del campo&#58; " + cValue, "Has elegido" &#41;, ; oDlg&#58;End&#40;&#41; &#41; @ 5, 10 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg CENTERED if n != 0 &#46;and&#46; oDS&#58;SetOrder&#40; n &#41; oLbxPrincipal&#58;GoTop&#40;&#41; oLbxPrincipal&#58;Refresh&#40;&#41; else MyMsgInfo&#40; "No se ha establacido otro orden&#46;&#46;&#46;" &#41; endif return //----------------------------------------------------------------------------// static procedure Buscar&#40; oLb &#41; local oDlg local i &#58;= oDS&#58;FieldCount&#40;&#41; local n &#58;= 1 local oSay, cSay &#58;= "&Valor campo " local oGet, uVal DEFINE DIALOG oDlg FROM 2, 2 TO 12, 70; TITLE "Búsqueda de valores en el DataSet" ; STYLE nOr&#40; DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 &#41; @ 01, 01 SAY "&Numero de columna &#40; 1 - " + StrNum&#40; i &#41; + " &#41;&#58;" OF oDlg @ 01, 10 GET n PICTURE "999" ; VALID &#40; uVal &#58;= oDS&#58;FieldGet&#40; n &#41;, oGet&#58;Refresh&#40;&#41;, ; oSay&#58;SetText&#40; cSay + oDS&#58;FieldName&#40; n &#41; &#41;, n > 0 &#46;and&#46; n <= i &#41; ; OF oDlg @ 02, 01 SAY oSay VAR cSay OF oDlg @ 02, 10 GET oGet VAR uVal SIZE 160, 13 OF oDlg @ 3, 02 BUTTON "&Buscar"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; oDS&#58;Find&#40; n, uVal, &#46;t&#46; &#41;, ; MyMsgInfo&#40; "Valor encontrado" &#41;, ; MyMsgInfo&#40; "Valor no encontrado" &#41; &#41;, oLb&#58;Refresh&#40;&#41; &#41; @ 3, 10 BUTTON "S&iguiente"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; !oDS&#58;FindNext&#40;&#41;, MyMsgInfo&#40; "No hay más&#46; Se llegó al final" &#41;, &#41;, ; oLb&#58;Refresh&#40;&#41; &#41; @ 3, 18 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg return //----------------------------------------------------------------------------// static procedure CtrDatos&#40; oLb, lNuevo &#41; local oDlg local cQueHago if lNuevo cQueHago &#58;= "Altas" oDS&#58;Blank&#40;&#41; else cQueHago &#58;= "Modificación" oDS&#58;Load&#40;&#41; endif DEFINE DIALOG oDlg FROM 2, 2 TO 30, 80; TITLE "Mantenimiento de la tabla Test - " + cQueHago; STYLE nOr&#40; DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 &#41; @ 01, 01 SAY "First" OF oDlg @ 01, 05 GET oDS&#58;First PICTURE "@K" UPDATE OF oDlg @ 1&#46;8, 01 SAY "Last" OF oDlg @ 02, 05 GET oDS&#58;Last PICTURE "@K" UPDATE OF oDlg @ 2&#46;6, 01 SAY "Street" OF oDlg @ 03, 05 GET oDS&#58;Street PICTURE "@K" UPDATE OF oDlg @ 3&#46;5, 01 SAY "City" OF oDlg @ 04, 05 GET oDS&#58;City PICTURE "@K" UPDATE OF oDlg @ 4&#46;4, 01 SAY "State" OF oDlg @ 05, 05 GET oDS&#58;State PICTURE "@K" UPDATE OF oDlg @ 5&#46;2, 01 SAY "Zip" OF oDlg @ 06, 05 GET oDS&#58;Zip PICTURE "@K" UPDATE OF oDlg @ 6&#46;1, 01 SAY "Hiredate" OF oDlg @ 07, 05 GET oDS&#58;Hiredate PICTURE "@K" UPDATE OF oDlg @ 7&#46;0, 01 SAY "Married" OF oDlg @ 08, 05 GET oDS&#58;Married PICTURE "@K" UPDATE OF oDlg @ 7&#46;9, 01 SAY "Age" OF oDlg @ 09, 05 GET oDS&#58;Age PICTURE "@K" UPDATE OF oDlg @ 8&#46;9, 01 SAY "Salary" OF oDlg @ 10, 05 GET oDS&#58;Salary PICTURE "@K" UPDATE OF oDlg @ 9&#46;8, 01 SAY "Notes" OF oDlg @ 11, 05 GET oDS&#58;Notes PICTURE "@K" UPDATE OF oDlg @ 10, 02 BUTTON "&Vale"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; lNuevo, oDS&#58;Insert&#40; &#46;t&#46; &#41;, oDS&#58;Update&#40; &#46;t&#46; &#41; &#41;, ; oLb&#58;Refresh&#40;&#41;, oDlg&#58;End&#40;&#41; &#41; @ 10, 10 BUTTON "&Cancelar"; OF oDlg; SIZE 40, 12; ACTION &#40; if&#40; lNuevo, oDS&#58;Blank&#40;&#41;, oDS&#58;Load&#40;&#41; &#41;, oDlg&#58;Update&#40;&#41; &#41; @ 10, 18 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg return //----------------------------------------------------------------------------// [/code:2b91bdwm][/quote:2b91bdwm]
Como acceder a objeto en definicion del mismo.
Hola amigos: Me surge la siguiente duda, defino un objeto cualquiera , por ejemplo un SAY [code=fw:2vdjdn29]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Fivewin 19.06 last version"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">ADJUST</span> <br />&nbsp;</div>[/code:2vdjdn29] y en la definicion del mismo quiero que al hacer click por ejemplo me cambie el texto. pruebo [code=fw:2vdjdn29]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CLICK</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"FiveWin Power"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp;</div>[/code:2vdjdn29] [code=fw:2vdjdn29]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CLICK</span> <span style="color: #000000;">&#40;</span>oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"FiveWin Power"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> &nbsp;<br />&nbsp;</div>[/code:2vdjdn29] Ninguno de los dos me funciona, como seria para acceder al mismo objeto. en su definicion? Saludos. Jose.
Como acceder a objeto en definicion del mismo.
[url:2ouz0qj9]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=17900&p=125587&hilit=oSay%3AVarput#p125587[/url:2ouz0qj9]
Como acceder a objeto en definicion del mismo.
Gracias Joao, habia leído algo sobre eso pero no resuelve mi duda. En la definición acceder al objeto. Saludos Jose.
Como acceder a objeto en definicion del mismo.
Es posible que lo que necesites es utilizar la data bLClicked o bLDblClicked del objeto [code=fw:1bjybf7z]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;oSay:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">&#123;</span> || ..... &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:1bjybf7z]
Como acceder a objeto en definicion del mismo.
[quote="cnavarro":19qygkfe]Es posible que lo que necesites es utilizar la data bLClicked o bLDblClicked del objeto [code=fw:19qygkfe]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   oSay:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">&#123;</span> || .....  <span style="color: #000000;">&#125;</span><br /> </div>[/code:19qygkfe][/quote:19qygkfe] Hola Cristobal. entonces esto deberia funcionar. [code=fw:19qygkfe]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oSay:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Se ha pulsado click en el Say"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:19qygkfe] ¿Porque no funciona? Saludos.
Como acceder a objeto en definicion del mismo.
No funciona porque esa clase no tiene el METHOD LButtonDown que es donde se evalúa esa data Es decir, no se ha diseñado la clase para que tenga el evento bLClicked. Si lo necesitas crea una clase que herede de TSAy y le pones ese METHOD LButtonDown
Como acceder a objeto en definicion del mismo.
Hola Cristobal: Ahhh. Tienes toda la razon como siempre (Igual que mi mujer <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> ) Bueno bromas aparte gracias por tus aportaciones siempre y perdón por el lapsus. Hay que leer mas y preguntar menos(El primero yo). Pero sino preguntaramos los foros serian tan aburridos como los de nuestros "Xvecinos". Saludos. Jose.
Como acceder a objeto en definicion del mismo.
Jose, para eso se mantiene un foro. Aquí seguiremos
Como acceder a objeto en definicion del mismo.
Hola: En Fw1204 lo siguiente funciona. [code=fw:3orr2rie]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oDoc <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"CDiario #"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4013</span> <span style="color: #0000ff;">OF</span> oDlg <br />oDoc:<span style="color: #000000;">lWantClick</span> := .t.<br />oDoc:<span style="color: #000000;">blClicked</span> := <span style="color: #000000;">&#123;</span>|| oDoc:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Hola"</span><span style="color: #000000;">&#41;</span>, oDoc:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />*oDoc:<span style="color: #000000;">blClicked</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Hola"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3orr2rie]Saludos.
Como acceder a objeto en definicion del mismo.
[url:nuq4c80b]https&#58;//wiki&#46;fivetechsoft&#46;com/doku&#46;php?id=fivewin_commands_say[/url:nuq4c80b] [code=fw:nuq4c80b]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oDlg, oSay, oBrush<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> OBRUSH GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.4</span>, NRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">75</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">223</span> <span style="color: #000000;">&#41;</span>, ;<br />      NRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">41</span>, <span style="color: #000000;">85</span>, <span style="color: #000000;">145</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.6</span>, NRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">24</span>,  <span style="color: #000000;">61</span>, <span style="color: #000000;">118</span> <span style="color: #000000;">&#41;</span>, NRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">95</span>, <span style="color: #000000;">158</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TEST SAY WITH GRADIENT BRUSH"</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">BRUSH</span> oBrush TRANSPARENT<br /><br />   @ <span style="color: #000000;">25</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">SAY</span> OSAY <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"THIS A TEST"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">15</span> ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_WHITE <span style="color: #0000ff;">PIXEL</span> TRANSPARENT <span style="color: #0000ff;">ADJUST</span><br /><br />   oSay:<span style="color: #000000;">lWantClick</span> := .T.<br /><br />   oSay:<span style="color: #000000;">blClicked</span> := <span style="color: #000000;">&#123;</span> || oSay:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Hola Say"</span> <span style="color: #000000;">&#41;</span>, oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">120</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"TEST"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span>  OSAY:<span style="color: #000000;">SETTEXT</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CHANGE TEXT"</span> <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><br /><br />   oBrush:<span style="color: #000000;">End</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 /> </div>[/code:nuq4c80b]
Como acceder a objeto en definicion del mismo.
Hola: Gracias FranciscoA , Joao <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Jose
Como acelerar tus consultas en MySQL 300 veces
Hola, aquí tenéis el artículo de opensource [url:2iwjjreq]https&#58;//opensource&#46;com/article/17/5/speed-your-mysql-queries-300-times?sc_cid=70160000000xYIuAAM[/url:2iwjjreq] Saludos
Como acelerar tus consultas en MySQL 300 veces
Gracias por la info
Como acelerar tus consultas en MySQL 300 veces
No importa el lenguaje de programacion, el preformance de la Base de Datos siempre va a estar determinado por el uso apropiado de las consultas SQL
Como acertar o TIME do sistema com FWH?
Gente estou utilizando o comando SETTIME() do FWH, para acertar a hora do sistema, mais não está funcionando. EX: var:="17:00" SETTIME(LEFT(VAR,2),SUBSTR(VAR,4,5)) Estou fazendo assim, mais ele não acerta a hora... Acaba colocando uma hora que não tem nada haver... FIQUEM COM DEUS AOKISANTOS
Como acertar o TIME do sistema com FWH?
Menos elegante, pero efectiva: cTime := "17:00" WINEXEC("time "+cTime)
Como acertar o TIME do sistema com FWH?
Aokisantos, var:="17:00" SetTime( Val( Left( var, 2 ) ), Val( SubStr( var, 4, 2 ) ) )
Como acertar o TIME do sistema com FWH?
DEU CERTO AMIGOS... MUITO OBRIGADO ANTONIO GRACIAS MESTRE... AOKISANTOS <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Como activo el teclado numerico desde el codigo??
Hola a todos amigos del foro.. alguno de uds sabe como puedo activar y desactivar el NUMLOCK del teclado virtual en el pocket?? lo q quiero con esto es que al ingresar datos numericos solo se activara el teclado virtual numerico y viceversa para los datos alfanumericos, muchas gracias de antemano...
Como actualizar a Windows 10
Buenos días, [url:rg5c2goe]http&#58;//www&#46;microsoft&#46;com/es-es/windows/windows-10-upgrade?ocid=win10_auxapp_LearnMore_win10[/url:rg5c2goe] Saludos
Como actualizar la pantalla leyendo el puerto comm ???
Hola sigo con la lectura de los puertos comm.. estoy utilizando un reloj-lector de huella digital.. que usa el puerto usb y un controlador para accesarlo atravez de un puerto comm.. la lectura de los datos y acceso al lector todo bien.. pero.. quiero pintar una barra de progreso cada vez que me lee el puerto pero la app se queda congelada.. aguien ha hecho algo parecido que me un tip.. pongo codigo de lectura del puerto.. Saludos [code:3v0lcw3t] /*----------------------------------------------------------------------------------------------------*/ STATIC FUNCTION ReadBufferComm&#40; oLector, oBarra &#41; LOCAL oDlg, oLbx LOCAL hDatos, nBytes, cBuffer, cLinea, aRecords, nRecCount LOCAL lPrimeraVez, cBuffTemp, nPos hDatos&#58;= OutChr&#40; "&#40;"+ oLector&#58;ps_NOSERIE + ",kqdata&#41;" &#41; cBuffer&#58;= "" nBytes &#58;= 200 cLinea &#58;= "" aRecords&#58;= &#123;&#125; lPrimeraVez&#58;= &#46;T&#46; DO WHILE &#46;T&#46; nBytes &#58;= InbufSize&#40;&#41; cBuffer&#58;= InChr&#40; nBytes &#41; IF At&#40; "kqdata,ok", cBuffer &#41; > 0 IF lPrimeraVez cBuffTemp&#58;= cBuffer cBuffTemp&#58;= SubStr&#40; cBuffTemp, 1, 22 &#41; nRecCount&#58;= Val&#40; SubStr&#40; cBuffTemp, 16, 6 &#41; &#41; lPrimeraVez&#58;= &#46;F&#46; oBarra&#58;SetRange&#40; 1, nRecCount &#41; ENDIF ENDIF IF At&#40; "kqdataend,ok", cBuffer &#41; > 0 IF Len&#40; AllTrim&#40; cBuffer &#41; &#41; > 0 cLinea+= BufferClean&#40; cBuffer &#41; aRecords&#58;= str2a &#40; cLinea, CRLF &#41; oBarra&#58;SetPos&#40; Len&#40; aRecords &#41; &#41; // Aqui se supone que actualiza la barra de progreso SysRefresh&#40;&#41; ENDIF EXIT ELSE IF Len&#40; AllTrim&#40; cBuffer &#41; &#41; > 0 cLinea+= BufferClean&#40; cBuffer &#41; aRecords&#58;= str2a &#40; cLinea, CRLF &#41; oBarra&#58;SetPos&#40; Len&#40; aRecords &#41; &#41; SysRefresh&#40;&#41; ENDIF ENDIF SysRefresh&#40;&#41; cBuffer&#58;= "" ENDDO RETURN NIL [/code:3v0lcw3t] Saludos
Como actualizar los controles de un dialogo.
Hola a todos. En FW con oDlg:Update() se actualizaban todos los controles de un dialogo. En FWPPC parece no existir esa función en la clase. Hay alguna alternativa que no sea recorrer con un bucle, oDlg:Acontrols[x]:Refresh(), ya que esta es lenta y muestra un feo efecto en pantalla. Gracias.
Como actualizar los controles de un dialogo.
Salvador, Prueba con oDlg:Refresh()
Como actualizar los controles de un dialogo.
Seguramente hay algo que no acabo de entender por mi inexperiencia con FWPPC. Pero el siguiente codigo, no refresca los controles si no cogen el foco, el get numérico aparece centrado, y el spinner no se ven los botones. Que hago mal ?. Gracias. [code:2i56s1ru]#include "FWCE&#46;ch" STATIC oWnd, oDlg ,cTexto, nNumero, nNumero2 Function Main&#40;&#41; DEFINE WINDOW oWnd ; DEFINE DIALOG oDlg RESOURCE "DlgTest"; STYLE WS_CHILD OF oWnd REDEFINE GET oGet VAR cTexto ID 200 OF oDlg UPDATE; PICTURE "@x" REDEFINE GET oGet VAR nNumero ID 201 OF oDlg UPDATE; PICTURE "9999999"; REDEFINE GET oGet VAR nNumero2 ID 202 OF Odlg UPDATE; PICTURE "999"; SPINNER MIN 0 MAX 255; ACTIVATE DIALOG oDlg NOWAIT; ON INIT &#40;MoveWindow&#40; oDlg&#58;hWnd, 0, 0&#41;, UpdateVars&#40;&#41;, oDlg&#58;Refresh&#40;&#41;&#41;; VALID &#46;f&#46; ACTIVATE WINDOW oWnd ; ON INIT oDlg&#58;SetFocus&#40;&#41;; VALID &#40;oDlg&#58;End&#40;&#41;, &#46;t&#46; &#41; return nil Function UpdateVars&#40;&#41; cTexto &#58;= "Mi texto" nNumero &#58;= 9 nNumero2 &#58;= 10 oDlg&#58;Refresh&#40;&#41; return &#46;t&#46; // el RC #ifdef _CE #include "c&#58;\vce\include\arm\windows&#46;h" #include "c&#58;\vce\include\arm\commctrl&#46;h" #define I_IMAGENONE &#40;-2&#41; #define IDS_HELP 104 102 RCDATA BEGIN 102, 2, I_IMAGENONE, 202, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 202, 0, 0, I_IMAGENONE, 203, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 203, 0, 1, END #endif DLGTEST DIALOG 48, 28, 166, 180 STYLE 0x4L | WS_CHILD FONT 8, "system" &#123; EDITTEXT 200, 34, 8, 42, 11, ES_RIGHT | WS_BORDER | WS_TABSTOP EDITTEXT 201, 35, 26, 42, 11, ES_RIGHT | WS_BORDER | WS_TABSTOP EDITTEXT 202, 36, 45, 34, 11, ES_RIGHT | WS_BORDER | WS_VSCROLL | WS_TABSTOP RTEXT "Texto", -1, 2, 10, 28, 10 RTEXT "Número", -1, 6, 28, 28, 10 RTEXT "Spinner", -1, 4, 45, 28, 10 &#125;[/code:2i56s1ru]
Como actualizar los controles de un dialogo.
Salvador, Hemos implementado el método Update() para FWPPC. Te enviamos por email la LIB modificada. Ahora tu ejemplo funciona bien. Los números no es que aparezcan centrados, sino que debes modificar su ancho ó variar su PICTURE. La claúsula SPINNER parece que no la acepta Windows Mobile.
Como actualizar variables desde la clausula on init...
Hola a todos... Vamos a ver, tengo el siguiente codigo: ********************************* FUNCTION Selecciona_proveedor(odlg6) ********************************* LOCAL hBmp := ReadBitmap( CurDir() + "\go.bmp" ),cSearch:='',nKey,oTmr,num_compra:='' LOCAL NumD ..... SELECT 0 USE (CURDIR()+"\proveedor.dbf") VIA "DBFCDX" new INDEX ON codigo TO codigo proveedor->(OrdSetFocus( "codigo")) DEFINE dialog odlg10 resource "seleccion_proveedor" redefine LISTBOX oBrw; &&nos creamos un brows para la muestra FIELDS hBmp, proveedor->codigo, proveedor->nombre; HEADERS "","Código", "Nombre" ID 500 OF oDlg10 oBrw:aActions := {{|| NIL},{|| MsgBeep(),ordenar_por_codigo(aux,oBrw),oBrw:Upstable(),oBrw:Refresh()}, {|| MsgBeep(),ordenar_por_nombre(aux,oBrw),oBrw:Upstable(),oBrw:Refresh()}} obrw:bKeyChar = { | nKey, nFlags | busca_proveedor( nKey, @cSearch ),oBrw:Refresh(),oSay:REFRESH()} redefine say oSay prompt cSearch id 130 of odlg10 COLOR CLR_BLACK, CLR_WHITE redefine button id 140 of odlg10 action MsgBeep(),( nRecno := proveedor->( Recno() ),oDlg10:End(),Compras(num_compra,NumD,FecD)) redefine button id 150 of odlg10 action MsgBeep(),odlg10:end() redefine get oNumD var NumD id 4002 of odlg10 ACTIVATE dialog odlg10; on init calendario(odlg10,FecD) odlg6:end() RETURN nil ************************ FUNCTION calendario(odlg10,FecD) ************************ LOCAL oFecha FecD:=DATE() @ 202, 132 DTPICKER oFecha VAR FecD OF oDlg10 SIZE 90, 20 PIXEL COLOR CLR_BLACK, CLR_WHITE RETURN nil El tema es el siguiente. Cuando llamo a la funcion Selecciona_proveedor(odlg6), en la clausula on init del dialogo me llama a la funcion Calendario(). Hasta ahi todo correcto. El DtPicker me muestra el dia correcto y me lo almacena en la variable FecD (que por defecto coge el dia actual). El problema que tengo es que esta variable se inicializa en el init y luego aunque yo le cambie la fecha en el calendario esta variable no se actualiza. He probado con la clausula on change en la funcion calendario() pero tampoco me actualiza la variable. Alguien puede indicarme como puedo hacerlo... Saludos y gracias. Elías Torres.
Como actualizar variables desde la clausula on init...
Elías, Tienes que pasar la variable por "referencia": on init calendario(odlg10, @FecD)
Como actualizar variables desde la clausula on init...
Gracias Antonio, yo habia optado por crearme una variable public y actualizarla en la ejecucion de un boton y me funcionaba pero de esta otra forma me ahorro esa declaracion publica. Gracias y saludos. Elías Torres.
Como adicionar o eliminar elementeo a un grafico
Hola Compañeros Como puedo adicionar o eliminar elemento en grafico para actualizarlos ? Saludos erick almanza
Como adicionar o eliminar elementeo a un grafico
Erick, Te refieres a la Clase TGraph ?
Como agregar BMP a Columna en Xbrowse ???
Amigos buen dia. Tengo un problema, estoy tratando de poner unos BMP en una columna de Xbrowse el cual cambiara según valor de una variable tipo de atención. En este caso es con coordenadas y no logro hacerlo, anteriormente lo hacia con Dialog desde recurso y funcionaba muy bien. Muchos saludos. Antonio Dejo el código : [code=fw:20kuybr1]<div class="fw" id="{CB}" style="font-family: monospace;"><br />                @ <span style="color: #000000;">45</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">SAY</span> otitu2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"PROCEDIMIENTOS"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> COLORS RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>   <span style="color: #0000ff;">FONT</span> oFont9   TRANSPARENT<br /><br />            @ <span style="color: #000000;">55</span>,<span style="color: #000000;">05</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">368</span>,<span style="color: #000000;">-55</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> DATASOURCE <span style="color: #ff0000;">"DAdm"</span> <span style="color: #0000ff;">FONT</span> oFont2;<br />                     HEADERS <span style="color: #ff0000;">'Fecha'</span>, <span style="color: #ff0000;">'Administración'</span>,<span style="color: #ff0000;">'Profesional'</span>, <span style="color: #ff0000;">'Jeringas'</span>,<span style="color: #ff0000;">'Val.Unita'</span>,<span style="color: #ff0000;">'Total...'</span>;<br />               COLUMNS <span style="color: #ff0000;">"Fec_Adm"</span>,<span style="color: #ff0000;">"MProc->Nom_Proc"</span>,<span style="color: #ff0000;">"Trim(Profe->Nom_Prof)"</span>,<span style="color: #ff0000;">"Can_Jer"</span>,<span style="color: #ff0000;">"Val_Uni"</span>,<span style="color: #ff0000;">"Val_Tot"</span>;<br />                     COLSIZES <span style="color: #000000;">90</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">60</span>;<br />                        PICTURES <span style="color: #ff0000;">'@d'</span>,<span style="color: #ff0000;">'@!'</span>,<span style="color: #ff0000;">"@!"</span>,<span style="color: #ff0000;">'999'</span>,<span style="color: #ff0000;">'9,999,999'</span>,<span style="color: #ff0000;">'999,999,999'</span>;<br />               CELL LINES AUTOSORT NOBORDER;<br />                                            <span style="color: #B900B9;">// oBrw:nFreeze       := 3</span><br />                                        oBrw:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /><br />                                         oBrw:<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_INSET<br />                                         oBrw:<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_INSET<br />                                             oBrw:<span style="color: #000000;">bClrHeader</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">140</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />                                             oBrw:<span style="color: #000000;">nOpacity</span>    := <span style="color: #000000;">230</span><br />                                             oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bFooter</span>   := <span style="color: #000000;">&#123;</span> || Ltrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" / "</span> + LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />                                             oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nDataStrAlign</span> := AL_RIGHT<br />                                             oBrw:<span style="color: #000000;">bClrStd</span>             := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> 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>, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">248</span>,<span style="color: #000000;">220</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />                                             oBrw:<span style="color: #000000;">bClrSelFocus</span>        := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">9</span>, <span style="color: #000000;">11</span>, <span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">73</span>, <span style="color: #000000;">250</span>, <span style="color: #000000;">202</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />                                             oBrw:<span style="color: #000000;">bClrSel</span>       := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">0</span>,  <span style="color: #000000;">0</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, nRGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">241</span>,<span style="color: #000000;">222</span>,<span style="color: #000000;">088</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>  <span style="color: #B900B9;">// para barra de linea selecc cuando el control no tiene el foco</span><br />                                             oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cEditPicture</span>    := <span style="color: #ff0000;">"999,999,999"</span><br />                                       oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nFooterType</span>    := AGGR_TOTAL<br />                    <br />                     oCol := oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                     oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"#10"</span><span style="color: #000000;">&#41;</span>           <span style="color: #B900B9;">// Control</span><br />                     oCol:<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"#50"</span><span style="color: #000000;">&#41;</span>           <span style="color: #B900B9;">// Administra</span><br />                     oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Tip.Ate."</span><br />                     oCol:<span style="color: #000000;">bBmpData</span>   :=  <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>DAdm->Est_Adm = <span style="color: #ff0000;">"A"</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />             <br />                                             oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                                             oBrw:<span style="color: #000000;">bChange</span> := <span style="color: #000000;">&#123;</span>|| oBrw:<span style="color: #000000;">Maketotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />                                             WITH OBJECT oBrw<br />                                                        :<span style="color: #000000;">lFooter</span> := .t.<br />                                                        oBrw:<span style="color: #000000;">lHScroll</span> := .f.<br />                                                oBrw:<span style="color: #000000;">lIncrFilter</span>      := .f.<br />                                                oBrw:<span style="color: #000000;">lSeekWild</span>        := .F.                   &&  .T. Busca Contenido, .F. Que comience con lo que digita<br />                                                        oBrw:<span style="color: #000000;">SetStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2018</span><span style="color: #000000;">&#41;</span><br />                                                        oBrw:<span style="color: #000000;">nColorPen</span> := CLR_RED<br /><br />                                                        :<span style="color: #000000;">bChange</span>    := <span style="color: #000000;">&#123;</span> || oBrw1:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,otitu2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>          <span style="color: #B900B9;">// Aqui Filtra el Xbrowse de Zonas</span><br /><br />                                                        <span style="color: #B900B9;">// :bChange    := { || oBrw2:GoTop(), oBrw2:Refresh(),otitu3:Refresh() }          // Aqui Filtra el Xbrowse de Zonas</span><br /><br />                                                        oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                                             END<br /><br /> </div>[/code:20kuybr1]
Como agregar BMP a Columna en Xbrowse ???
Hola Antonio. Mira estos ejemplos de Nageswaragunupudi: <!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=39704#p236824">viewtopic.php?f=3&t=39704#p236824</a><!-- l -->
Como agregar BMP a Columna en Xbrowse ???
[quote="FranciscoA":1rpcg3rh]Hola Antonio. Mira estos ejemplos de Nageswaragunupudi: <!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=39704#p236824">viewtopic.php?f=3&t=39704#p236824</a><!-- l -->[/quote:1rpcg3rh] Hola Amigo Francisco. Como estas? Deseo que muy bien. Muchas gracias, funciono perfecto. Muchos saludos. Antonio. [code=fw:1rpcg3rh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oBrw<br />&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; WITH OBJECT :<span style="color: #000000;">Admi</span><br />&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 style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CONTROL"</span>, <span style="color: #ff0000;">"ADMI"</span> <span style="color: #000000;">&#125;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> &nbsp;DAdm->Tip_Adm=<span style="color: #ff0000;">"A"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; END<br /><br /><br />&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 style="color: #000000;">lFooter</span> := .t.<br />&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;oBrw:<span style="color: #000000;">lHScroll</span> := .f.<br />&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; oBrw:<span style="color: #000000;">lIncrFilter</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&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; oBrw:<span style="color: #000000;">lSeekWild</span> &nbsp; &nbsp; &nbsp; &nbsp;:= .F. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; && &nbsp;.T. Busca Contenido, .F. Que comience con lo que digita<br />&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; oBrw:<span style="color: #000000;">SetStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2018</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">nColorPen</span> := CLR_RED<br /><br />&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 style="color: #000000;">bChange</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oBrw1:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,otitu2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Aqui Filtra el Xbrowse de Zonas</span><br /><br />&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 style="color: #B900B9;">// :bChange &nbsp; &nbsp;:= { || oBrw2:GoTop(), oBrw2:Refresh(),otitu3:Refresh() } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// Aqui Filtra el Xbrowse de Zonas</span><br /><br />&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; oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br /><br />&nbsp;</div>[/code:1rpcg3rh]
Como agrego varios archivos recursos a mi .exe
Hola foro Hay alguna manera de agregar varios archivos de recursos en un mismo prg ?
Como agrego varios archivos recursos a mi .exe
Compuin: Así como agregaste el primero, agrega el segundo, obviamente deben tener nombres diferentes. Saludos
Como ajustar impresión por cambio en tamaño del papel
Mi Gente... Buen Día... Hace años desarrolle una aplicación que imprime, por medio de la clase tPrinter, una serie de formularios (diseño gubernamental) en papel Legal (8.5" x 14"... acá lo llamamos "extra-oficio")... hace poco menos de una semana la dependencia gubernamental en cuestion emitió una circular donde manda a que todos esos formularios se impriman ahora en un tamaño de papel de 8.5" x 13" (acá lo llamamos "oficio")... Como podrán ver, debo escalar verticalmente la impresión de los formularios para que se impriman completos en un papel que es 2.5cm mas corto... Ya le añadí a Windows un papel de 8.5" x 13" (Panel de Control ==> Herramientas Administrativas ==> Administrador de Impresión ==> Servidores de Impresion ==> [Equipo] ==> Formularios) Como hago para saber que constante aplicar al método :SetPage() para indicarle ese tamaño de papel, tomando en cuenta que al ser un tamaño definido por el usuario, puede que en distintos PC's esa constante puede tener diferentes valores... Ej... #define DMPAPER_LETTER 1 // Letter 8 1/2 x 11 in ... #define DMPAPER_LEGAL 5 // Legal 8 1/2 x 14 in ... #define DMPAPER_OFICIO [b:2tj9gf3i]????[/b:2tj9gf3i] // 8 1/2 x 13 in He probado el método :SetSize( nWidth, nHeight ) de la clase tPrinter... pero he estado tirando flechas porque no he encontrado documentación que me diga en que unidades pasan [b:2tj9gf3i]nWidth[/b:2tj9gf3i] y [b:2tj9gf3i]nHeight[/b:2tj9gf3i]... a duras penas logre que escalara de Legal (8.5" x 14") a Letter (Carta 8.5" x 11")... pero no logro otras medidas por mucho que cambie los valores de [b:2tj9gf3i]nWidth[/b:2tj9gf3i] y [b:2tj9gf3i]nHeight[/b:2tj9gf3i]... Agradecido de antemano por la ayuda y/o sugerencias que me puedan dar... Giancarlo Sabattino Valencia - Venezuela FW13.12+xH1.2001+BCC5.51
Como ajustar impresión por cambio en tamaño del papel
Ya lo intentaste asi? [code=fw:c1cynolp]<div class="fw" id="{CB}" style="font-family: monospace;">PrnSetSize<span style="color: #000000;">&#40;</span><span style="color: #000000;">2125</span>, <span style="color: #000000;">3250</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">//(8.50x2.5)x100 = 2125 mm (13*2.5)*100=3250 mm</span></div>[/code:c1cynolp] Saludos.
Como ajustar impresión por cambio en tamaño del papel
[code=fw:3byp3nat]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PAPEL_LEGAL<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oPrinter, aPaper<br /><br />&nbsp; &nbsp;oPrinter = TPrinter<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;">'Meu Documento'</span> , .F., .F., <span style="color: #00C800;">NIL</span>, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aPaper = PrnGetPaper<span style="color: #000000;">&#40;</span> oPrinter <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> .NOT. aPaper<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">'Legal'</span><br /><br />&nbsp; &nbsp; &nbsp; MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Por favor use papel legal, cambie impresora"</span>, <span style="color: #ff0000;">"Atencion"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .F. <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> .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> PrnGetPaper<span style="color: #000000;">&#40;</span> oPrn <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aPoint := PrnGetSize<span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">hDc</span> <span style="color: #000000;">&#41;</span>, aRecmm := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, nW := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nH := <span style="color: #000000;">0</span>, wx := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aPapers:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_LETTER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , &nbsp;<span style="color: #000000;">1</span> , <span style="color: #ff0000;">"Letter &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">279</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_LETTERSMALL &nbsp; &nbsp; &nbsp; "</span> , &nbsp;<span style="color: #000000;">2</span> , <span style="color: #ff0000;">"Letter Small &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">279</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_TABLOID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , &nbsp;<span style="color: #000000;">3</span> , <span style="color: #ff0000;">"Tabloid &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">280</span>,<span style="color: #000000;">432</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_LEDGER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , &nbsp;<span style="color: #000000;">4</span> , <span style="color: #ff0000;">"Ledger &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">432</span>,<span style="color: #000000;">280</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_LEGAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , &nbsp;<span style="color: #000000;">5</span> , <span style="color: #ff0000;">"Legal &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">356</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_STATEMENT &nbsp; &nbsp; &nbsp; &nbsp; "</span> , &nbsp;<span style="color: #000000;">6</span> , <span style="color: #ff0000;">"Statement &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">140</span>,<span style="color: #000000;">216</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_EXECUTIVE &nbsp; &nbsp; &nbsp; &nbsp; "</span> , &nbsp;<span style="color: #000000;">7</span> , <span style="color: #ff0000;">"Executive &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">184</span>,<span style="color: #000000;">257</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_A3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , &nbsp;<span style="color: #000000;">8</span> , <span style="color: #ff0000;">"A3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">297</span>,<span style="color: #000000;">420</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_A4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , &nbsp;<span style="color: #000000;">9</span> , <span style="color: #ff0000;">"A4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">210</span>,<span style="color: #000000;">297</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_A4SMALL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">10</span> , <span style="color: #ff0000;">"A4 Small &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">210</span>,<span style="color: #000000;">297</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_A5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">11</span> , <span style="color: #ff0000;">"A5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">148</span>,<span style="color: #000000;">210</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_B4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">12</span> , <span style="color: #ff0000;">"B4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">250</span>,<span style="color: #000000;">354</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_B5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">13</span> , <span style="color: #ff0000;">"B5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">182</span>,<span style="color: #000000;">257</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_FOLIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">14</span> , <span style="color: #ff0000;">"Folio &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">330</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_QUARTO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">15</span> , <span style="color: #ff0000;">"Quarto &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">215</span>,<span style="color: #000000;">275</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_10X14 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">16</span> , <span style="color: #ff0000;">"10x14 in &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">254</span>,<span style="color: #000000;">356</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_11X17 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">17</span> , <span style="color: #ff0000;">"11x17 in &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">280</span>,<span style="color: #000000;">432</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_NOTE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">18</span> , <span style="color: #ff0000;">"Note &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">279</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">19</span> , <span style="color: #ff0000;">"Envelope #9 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">098</span>,<span style="color: #000000;">225</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">20</span> , <span style="color: #ff0000;">"Envelope #10 &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">105</span>,<span style="color: #000000;">241</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_11 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">21</span> , <span style="color: #ff0000;">"Envelope #11 &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">114</span>,<span style="color: #000000;">264</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">22</span> , <span style="color: #ff0000;">"Envelope #12 &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">109</span>,<span style="color: #000000;">279</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_14 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">23</span> , <span style="color: #ff0000;">"Envelope #14 &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">127</span>,<span style="color: #000000;">292</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_DL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">27</span> , <span style="color: #ff0000;">"Envelope DL &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">110</span>,<span style="color: #000000;">220</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_C5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">28</span> , <span style="color: #ff0000;">"Envelope C5 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">162</span>,<span style="color: #000000;">229</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_C3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">29</span> , <span style="color: #ff0000;">"Envelope C3 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">324</span>,<span style="color: #000000;">458</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_C4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">30</span> , <span style="color: #ff0000;">"Envelope C4 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">229</span>,<span style="color: #000000;">324</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_C6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">31</span> , <span style="color: #ff0000;">"Envelope C6 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">114</span>,<span style="color: #000000;">162</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_C65 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">32</span> , <span style="color: #ff0000;">"Envelope C65 &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">114</span>,<span style="color: #000000;">229</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_B4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">33</span> , <span style="color: #ff0000;">"Envelope B4 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">250</span>,<span style="color: #000000;">353</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_B5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">34</span> , <span style="color: #ff0000;">"Envelope B5 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">176</span>,<span style="color: #000000;">250</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_B6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">35</span> , <span style="color: #ff0000;">"Envelope B6 &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">176</span>,<span style="color: #000000;">125</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_ITALY &nbsp; &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">36</span> , <span style="color: #ff0000;">"Envelope &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">110</span>,<span style="color: #000000;">230</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_MONARCH &nbsp; &nbsp; &nbsp; "</span> , <span style="color: #000000;">37</span> , <span style="color: #ff0000;">"Envelope Monarch &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">098</span>,<span style="color: #000000;">191</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_ENV_PERSONAL &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">38</span> , <span style="color: #ff0000;">"6 3/4 Envelope &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">092</span>,<span style="color: #000000;">165</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_FANFOLD_US &nbsp; &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">39</span> , <span style="color: #ff0000;">"US Std Fanfold &nbsp; &nbsp; &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">378</span>,<span style="color: #000000;">279</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_FANFOLD_STD_GERMAN"</span> , <span style="color: #000000;">40</span> , <span style="color: #ff0000;">"German Std Fanfold &nbsp;"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">305</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"DMPAPER_FANFOLD_LGL_GERMAN"</span> , <span style="color: #000000;">41</span> , <span style="color: #ff0000;">"German Legal Fanfold"</span> , <span style="color: #000000;">&#123;</span><span style="color: #000000;">216</span>,<span style="color: #000000;">330</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;aRecmm = oPrn:<span style="color: #000000;">Pix2Mmtr</span><span style="color: #000000;">&#40;</span>aPoint<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, aPoint<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 /><br />&nbsp; &nbsp;nW = <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>aRecmm<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nH = <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>aRecmm<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> wx=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aPapers<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> aPapers<span style="color: #000000;">&#91;</span>wx,<span style="color: #000000;">4</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = nW .AND. aPapers<span style="color: #000000;">&#91;</span>wx,<span style="color: #000000;">4</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = nH<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span>aPapers<span style="color: #000000;">&#91;</span>wx,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,aPapers<span style="color: #000000;">&#91;</span>wx,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,aPapers<span style="color: #000000;">&#91;</span>wx,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">""</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">""</span><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3byp3nat] 
Como ajustar impresión por cambio en tamaño del papel
Francisco... Gracias por tu sugerencia... Te comento que no funcionó... el formato se imprime igual como si se tratara de papel Legal (8.5" x 14")... no se escala verticalmente que es lo que estoy buscando, y lógicamente al ser el papel 2.5cm mas corto se corta el final de la impresión... de todas formas, por si estoy haciendo algo incompatible con lo que necesito, te copio un resumen del código... PRINT oPlanilla:oPrn DOC cText; PREVIEW MODAL oPlanilla:oPrn:SetPage( DMPAPER_LEGAL ) // Quitando esta linea la clase asume papel carta (8.5" x 11") oPlanilla:oPrn:SetPortrait() ... ... PrnSetSize( 2159, 3302 ) // Los valores para nWidth y nHeight están calculados en base a 2.54 cm x pulgada oPlanilla:oPrn:Preview() oPlanilla:oPrn:End()
Como ajustar impresión por cambio en tamaño del papel
[code=fw:15k1shhw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Sample showing how to manage the printer object</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<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> oPrn, oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRowStep, nColStep<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">0</span>, nCol := <span style="color: #000000;">0</span>, n, m<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//oPrn := PrnSetSize( 2100, 1200 ) // To adjust a different printer paper size!</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//oPrn := PrnSetSize( 216, 356 ) // To adjust a different printer paper size!</span><br /><br />&nbsp; &nbsp;oPrn := PrnSetSize<span style="color: #000000;">&#40;</span> <span style="color: #000000;">202</span> * <span style="color: #000000;">10</span>, <span style="color: #000000;">289</span> * <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// To adjust a different printer paper size!</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Testing the printer object from FiveWin"</span> PREVIEW<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> oPrn:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Printer was not installed or ready</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-12</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br />&nbsp; &nbsp; &nbsp; nRowStep = oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">20</span> &nbsp; <span style="color: #B900B9;">// We want 20 rows</span><br />&nbsp; &nbsp; &nbsp; nColStep = oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">15</span> &nbsp; <span style="color: #B900B9;">// We want 15 cols</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PAGE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">SayBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\f</span>ivewin.bmp"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">20</span> &nbsp;<span style="color: #B900B9;">// rows</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol = <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nRow, nCol, Str<span style="color: #000000;">&#40;</span> n, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>, oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol += nColStep<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> m = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">15</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> nRow, nCol, <span style="color: #ff0000;">"+"</span>, oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nCol += nColStep<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRow += nRowStep<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oPrn:<span style="color: #000000;">Line</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, nRow, nCol <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDPAGE</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPRINT</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Destroy the font object</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />procedure AppSys &nbsp;<span style="color: #B900B9;">// XBase++ requirement</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:15k1shhw] 
Como ajustar impresión por cambio en tamaño del papel
Giancarlo: Talvez este trozo de codigo pueda ayudarte. Lo he usado en formatos de distintos tamaños de papel. [code=fw:2ktx6f6b]<div class="fw" id="{CB}" style="font-family: monospace;">   PrnSetSize<span style="color: #000000;">&#40;</span> nAnchPapel, nAltoPapel <span style="color: #000000;">&#41;</span> <br /><br />  <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Documento"</span> <br /><br />      oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br />      nRowStep := oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / nMaxLineas <span style="color: #B900B9;">// Lineas deseadas  PRUEBA CON ESTOS CAMBIANDO RESOLUCION</span><br />      nColStep := oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">80</span>        <span style="color: #B900B9;">// Columnas deseadas</span><br /> </div>[/code:2ktx6f6b] Saludos.
Como ajustar impresión por cambio en tamaño del papel
Upps!! Mientras escribía, Karinha lo posteaba.
Como ajustar impresión por cambio en tamaño del papel
chicos... parece que no me he sabido explicar... jeje el formato ya esta dibujado para papel Legal (8.5" x 14")... y eso tiene varios años funcionando así... con la nueva normativa el problema no es en si definir el tamaño del papel... yo diría que ese es el problema menor... lo que quiero evitar es el tener que hacer de nuevo el formato para que encaje en un papel de 8.5" x 13"... y es allí a donde me gustaría llegar... escalar el formato, que ya esta hecho, para que se imprima en un papel que es 2.5cm mas corto... claro que si eso no es posible, ni modo... a hacer el formato de nuevo... jeje Sin embargo, Karinha, con ese ultimo código que posteastes me distes una idea para otra cosa... Mil Gracias a los dos... y a ver que otra idea surge...
Como anula la Tecla Alt F4 para impedir cerrar la ventana
Como anula la Tecla Alt F4 para impedir cerrar la ventana Tipo Dialogo o Windows
Como anula la Tecla Alt F4 para impedir cerrar la ventana
Ruben,lExit = .F.ACTIVATE WINDOW oWnd VALID lExit // ó DIALOG en vez de WINDOWCambiando el valor de lExit podrás salir <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Como anula la Tecla Alt F4 para impedir cerrar la ventana
[quote="Antonio Linares":2ua3ru9k]Ruben, lExit = .F. ACTIVATE WINDOW oWnd VALID lExit // ó DIALOG en vez de WINDOW Cambiando el valor de lExit podrás salir <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:2ua3ru9k]Funciono Muchas Gracias Antonio
Como apagar computadores?
Desde un programa hecho con fivewin y harbour, como puedo apagar todos los equipos que estan en la red?? Salu2
Como apagar computadores?
Hola, Puedes hacer un : run "shutdown ...." no me acuerdo de los parametros pero en la linea de comandos puedes escribir shutdown /? Atte., Lautaro Moreira
Como apagar computadores?
Yo hago asi: cExec := "C:\Windows\System32\ShutDown.exe" ShellExecute( 0, "Open", cExec, " -s", 0, 1 ) Muchos saludos
Como asignar un nombre aleatorio
Saludos al Forum Como asigno un nombre alaetorio. en Visual Foxpro se hace asi. tcPatht = "C:\TEMPREP\TEMP\" lcTabla = tcPatht+sys(2015)+ ".DBF" &&devuelte un nombre aleatolrio emprsando _54J12323 Como se haria en Harbour
Como asignar un nombre aleatorio
FWH function cTempFile( cDir, cExt )
Como asignar una impresora
Hola hasta hace poco en una rutina usabamos matriz de punto y la clase tdosprn para los remitos y la clase tprinter para facturar en impresoras laser. Tuvimos que cambiar la forma de imprimir a tprinter. Para eso quiero asignar una impresora exclusiva para los remitos. Hice los siguiente: [code=fw:1dtr4gvl]<div class="fw" id="{CB}" style="font-family: monospace;">   SetPrintDefault<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">impremito</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"REMITO"</span> <span style="color: #B900B9;">///PREVIEW</span><br /><br />   oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetCopies</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br /><br /> etc,etc<br /><br />   <span style="color: #0000ff;">PAGE</span></div>[/code:1dtr4gvl] Y funciona correctamente pero el problema es que me setea la impresora como predeterminada. Como hago para que esta impresora se utilize exclusivamente en esta rutina. Gracias por vuestra atención
Como asignar una impresora
Perdón por no seguir el hilo en el otro mensaje, pensé en hacer otro [code=fw:5mwb1xvg]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   SetPrintDefault<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">impremito</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"REMITO"</span> <span style="color: #B900B9;">///PREVIEW</span><br /><br />   oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />   oPrn:<span style="color: #000000;">SetCopies</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br /><br /><br />   <span style="color: #0000ff;">PAGE</span><br /><br /><br />   oPrn:<span style="color: #000000;">Cmsay</span><span style="color: #000000;">&#40;</span>   <span style="color: #000000;">2.1</span>, <span style="color: #000000;">13.4</span>, <span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span>Transform<span style="color: #000000;">&#40;</span>dfec,<span style="color: #ff0000;">"@D"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oFont,, RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">11</span>,<span style="color: #000000;">41</span>,<span style="color: #000000;">90</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />   oPrn:<span style="color: #000000;">CmSay</span><span style="color: #000000;">&#40;</span>  <span style="color: #000000;">7</span>, <span style="color: #000000;">3.2</span>,    AllTrim<span style="color: #000000;">&#40;</span> acliente:<span style="color: #000000;">napea</span> <span style="color: #000000;">&#41;</span>, oFont,, RGB<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> <span style="color: #000000;">&#41;</span><br />   etc, etc<br /><br /><br /><br />   <span style="color: #0000ff;">ENDPAGE</span><br /><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /> </div>[/code:5mwb1xvg] y después del endprint hacer otro SetPrintDefault( AllTrim( oApp:impdefecto ) ) Quería saber vuestra opinión o si hay otra forma mas elegante de hacerlo Luis
Como asignar una impresora
Surgom: Intenta retirando el código [code=fw:1fjtnz7x]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> SetPrintDefault<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">impremito</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:1fjtnz7x] Y modifica el código siguiente [code=fw:1fjtnz7x]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"REMITO"</span> <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"El nombre de la impresora deseada"</span><br /> </div>[/code:1fjtnz7x] Saludos
Como asignar una impresora
Gracias Armando el lunes lo implemento y comento Luis
Como asignar una impresora
Armando funcionó correctamente. Nuevamente Gracias Luis
Como ativar scanner do MC1000 (WINDOWS CE)?
Como ativar via PRG o scanner do MC1000 (WINDOWS CE)? Obrigado
Como ativar scanner do MC1000 (WINDOWS CE)?
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=88165#p88165">viewtopic.php?p=88165#p88165</a><!-- l -->
Como ativar scanner do MC1000 (WINDOWS CE)?
Obrigado Sr. Antonio
Como avanzar de registro en registro....
Hola a todos... Me gustaría saber que función se emplea para ir saltando de registro en registro e ir mostrando la información de cada uno. En fox se utiliza un skip() o se juega con el recno() pero aquí no se como es... Saludos y gracias... Elías Torres.
Como avanzar de registro en registro....
Elias, DbSkip( <nRegistros> ) puedes anteponer el nombre del área de trabajo: ( Alias )->( DbSkip( <nRegistros> ) )
Como avanzar de registro en registro....
Elias, El mostrar el contenido de los registros depende de como estés diseñando una determinada pantalla de tu aplicación. Tienes GETs en pantalla ? SAYs ? Estas mostrando información ó estás capturando información ?
Como avanzar de registro en registro....
Gracias Antonio... Vale, te cuento lo que pretendo.... Tengo dos tablas, clientes y articulos, y he creado un filtro para relacionar un cliente con todos sus articulos. Lo que pretendo es teniendo un cliente que pueda ir avanzando por sus articulos.... Para ello estoy utilizando unos Get's donde muestro la información de la tabla y unos botones que me permitan ir al primer registro, al siguiente, al anterior y al último. He puesto unos Get's porque quiero dar opcion a introducir un articulo nuevo para ese cliente. Saludos y gracias Elías Torres.
Como avanzar de registro en registro....
Elías, Puedes capturar una imagen de tu pantalla y ponerla aquí ? Usa <!-- w --><a class="postlink" href="http://www.imageshack.us">www.imageshack.us</a><!-- w --> y copia aqui el link que te proporciona. Puedes proporcionar un pequeño ejemplo en PRG para que veamos como lo estás planteando ?
Como avanzar de registro en registro....
Hola Antonio. En este link está la imagen de lo que te comentaba <!-- m --><a class="postlink" href="http://img124.imageshack.us/my.php?image=dibujomg1.gif">http://img124.imageshack.us/my.php?image=dibujomg1.gif</a><!-- m --> Lo que pretendo es que con los botones de direccion me mueva solamente por los registros de la tabla de articulos. Esto lo he conseguido pero cada vez que me muevo hacia un registro me crea un dialogo nuevo, con lo que si pretendo salir tengo que ir cerrando una por una todas las pantallas que me ha abierto..... El código que utilizo para esta pantalla es el siguiente: FUNCTION Registros() DEFINE dialog odlg resource "Cliente_articulos" REDEFINE GET clientes->Nomcli id 500 OF odlg REDEFINE GET clientes->Apecli id 510 OF odlg redefine get articulos->cod_art id 100 of odlg redefine get articulos->nom_art id 200 of odlg redefine get articulos->cant id 300 of odlg redefine get articulos->precio id 400 of odlg ACTIVATE dialog odlg; on init barra_desplazamiento(odlg) RETURN nil barra_dezplazamiento(odlg) es una funcion que contiene los iconos de desplazamiento... FUNCTION barra_desplazamiento(odlg) LOCAL aux:=1 @ 0, 0 BTNBMP NAME "primero" SIZE 32, 32 of odlg @ 0, 32 BTNBMP NAME "anterior" SIZE 32, 32 of odlg @ 0, 64 BTNBMP NAME "siguiente" SIZE 32, 32 of odlg action avanza_articulos(odlg) @ 0, 96 BTNBMP NAME "ultimo" SIZE 32, 32 of odlg @ 0, 178 BTNBMP NAME "buscar" size 32, 32 of odlg action odlg:end(),busca_cliente(aux) @ 0, 210 BTNBMP NAME "salir" SIZE 32, 32 of odlg action odlg:end() RETU nil funcion avanza_articulos(odlg) la utilizo para comprobar el final de los articulos (para que solo me muestre los que tiene) FUNCTION avanza_articulos(odlg) IF !EOF() articulos->(dbskip(1)) registros() ELSE MsgInfo( "El Cliente no tiene más articulos relacionados" ) endif RETURN nil Saludos y gracias... Elías Torres.
Como avanzar de registro en registro....
Elías, Gracias por la imagen, ahora está claro como lo quieres hacer. Aqui tienes tu código modificado: [code:31lebvsb] FUNCTION Registros&#40;&#41; local oDlg, oGetCod, oGetNom, oGetCant, oGetPrecio DEFINE dialog odlg resource "Cliente_articulos" REDEFINE GET clientes->Nomcli id 500 OF odlg REDEFINE GET clientes->Apecli id 510 OF odlg redefine get oGetCod VAR articulos->cod_art id 100 of odlg redefine get oGetNom VAR articulos->nom_art id 200 of odlg redefine get oGetCant VAR articulos->cant id 300 of odlg redefine get oGetPrecio VAR articulos->precio id 400 of odlg ACTIVATE dialog odlg; on init barra_desplazamiento&#40; odlg, oGetCod, oGetNom, oGetCant, oGetPrecio &#41; RETURN nil FUNCTION barra_desplazamiento&#40; odlg, oGetCod, oGetNom, oGetCant, oGetPrecio &#41; LOCAL aux&#58;=1 @ 0, 0 BTNBMP NAME "primero" SIZE 32, 32 of odlg @ 0, 32 BTNBMP NAME "anterior" SIZE 32, 32 of odlg @ 0, 64 BTNBMP NAME "siguiente" SIZE 32, 32 of odlg action avanza_articulos&#40;odlg, oGetCod, oGetNom, oGetCant, oGetPrecio &#41; @ 0, 96 BTNBMP NAME "ultimo" SIZE 32, 32 of odlg @ 0, 178 BTNBMP NAME "buscar" size 32, 32 of odlg action odlg&#58;end&#40;&#41;,busca_cliente&#40;aux&#41; @ 0, 210 BTNBMP NAME "salir" SIZE 32, 32 of odlg action odlg&#58;end&#40;&#41; RETU nil FUNCTION avanza_articulos&#40;odlg, oGetCod, oGetNom, oGetCant, oGetPrecio &#41; IF !EOF&#40;&#41; articulos->&#40;dbskip&#40;1&#41;&#41; // registros&#40;&#41; NO!!! oGetCod&#58;Refresh&#40;&#41; // repinta los contenidos de los GETs oGetNom&#58;Refresh&#40;&#41; oGetCant&#58;Refresh&#40;&#41; oGetPrecio&#58;Refresh&#40;&#41; ELSE MsgInfo&#40; "El Cliente no tiene más articulos relacionados" &#41; endif RETURN nil [/code:31lebvsb]
Como avanzar de registro en registro....
Gracias Antonio, era lo que buscaba.... Saludos... Elías Torres.
Como añadir tus PRGs desde Visual Studio
[b:u71a3h0z]1.[/b:u71a3h0z] Añade un PRG ya existente a tu proyecto: [img:u71a3h0z]http&#58;//imageshack&#46;us/a/img706/8996/captureyqd&#46;png[/img:u71a3h0z] [b:u71a3h0z]2.[/b:u71a3h0z] Haz click derecho en él y selecciona "properties". Selecciona "Custom Build tool": [img:u71a3h0z]http&#58;//imageshack&#46;us/a/img696/1347/capturegxv&#46;png[/img:u71a3h0z] [b:u71a3h0z]3.[/b:u71a3h0z] Vuelve a hacer click derecho en él y configúralo de esta forma: [b:u71a3h0z]Copia los textos en negrita desde aqui:[/b:u71a3h0z] c:\harbour\bin\harbour %(FullPath) /n /ic:\harbour\include /ic:\fwh\include .\%(Filename).c [img:u71a3h0z]http&#58;//imageshack&#46;us/a/img713/600/capturetoy&#46;png[/img:u71a3h0z] [b:u71a3h0z]4.[/b:u71a3h0z] Vuelve a hacer click derecho en él y compílalo, y añade el fichero C resultante al proyecto tambien. Establece los caminos correctos a la carpeta include de Harbour y que no use los "Windows runtime extensions": [b:u71a3h0z]Copia el texto en negrita desde aqui:[/b:u71a3h0z] c:\harbour\include;%(AdditionalIncludeDirectories) [img:u71a3h0z]http&#58;//imageshack&#46;us/a/img341/6575/capturenve&#46;png[/img:u71a3h0z] Funcionando <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [img:u71a3h0z]http&#58;//imageshack&#46;us/a/img692/2971/capturejtvhh&#46;png[/img:u71a3h0z]
Como añado un columna checkbox a TCBROWSE
Hola, la cuestión es bien simple, muchos de mis programas siguen utilizando tcbrowse como visor de la base de datos, hasta ahora nunca había necesitado poner un check box. He seguido algunos ejemplos que hay en el foro y no lo he logrado. Creo que la única solución según he visto es mediante muestra de un bmp, pero si sigo los ejemplos solo me muestra un numero que según supongo es el manejador. He hecho lo siguiente. [code=fw:1rzkm8w2]<div class="fw" id="{CB}" style="font-family: monospace;"><br />     <span style="color: #00C800;">private</span> hBmpLon  := ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"r:/bmp/mnu/checkon.bmp"</span> <span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">private</span> hBmpLoff := ReadBitmap<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #ff0000;">"r:/bmp/mnu/checkoff.bmp"</span> <span style="color: #000000;">&#41;</span><br />     <br /><br />    ......<br />    *******************************************************************************<br />    *                                                                             *<br />    *            Este sistema de <span style="color: #0000ff;">listbox</span> corresponde al TCBROWSE. objeto oBrow    *<br />    *                                                                             *<br />    *******************************************************************************<br /><br />    <br />    @ <span style="color: #000000;">-1</span>, <span style="color: #000000;">16</span> COLUMN BROWSE oBrw <span style="color: #0000ff;">OF</span> oWndEdit ;<br />             <span style="color: #0000ff;">FONT</span> oFont ;<br />             <span style="color: #0000ff;">SIZE</span> oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;  <span style="color: #B900B9;">//Ancho y lago posilbe               COLOR CLR_BLACK, 14481663;</span><br />             <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> aMantStack<span style="color: #000000;">&#91;</span>nLen, <span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> := str<span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, oMsgRecNo:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Registro: "</span>+ alltrim<span style="color: #000000;">&#40;</span> str<span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"/"</span> + alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>lastrec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oWndEdit:<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 />    <br />     <span style="color: #B900B9;">//Añado columna si esta borrado el registro para eliminacion</span><br />     ADD COLUMN <span style="color: #0000ff;">TO</span> BROWSE oBrw ;<br />         HEADER <span style="color: #ff0000;">"D."</span> OEM ;<br />         <span style="color: #00C800;">DATA</span>  iif<span style="color: #000000;">&#40;</span>deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'>>'</span>, <span style="color: #ff0000;">' '</span><span style="color: #000000;">&#41;</span>;<br />         NOBAR <span style="color: #0000ff;">CENTER</span> ;<br />         COLORS CLR_WHITE , <span style="color: #000000;">9129488</span>  ;  <span style="color: #B900B9;">//nRGB( 190, 215, 190 )</span><br />         <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span><br /><br />    <span style="color: #B900B9;">//Añadir columna si tiene croquis, diligencias, fotos (AQUI LOS CHECKBOX) <<<<<<<<<<<<<<<<<<<<<<<<<</span><br />    <span style="color: #B900B9;">//Verificado es un campo logico t o f</span><br /><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> BROWSE oBrw ;<br />         HEADER <span style="color: #ff0000;">"Verificado"</span> ;<br />         <span style="color: #00C800;">DATA</span>  iif<span style="color: #000000;">&#40;</span>verificado,hBmpLon, hBmpLoff<span style="color: #000000;">&#41;</span>;<br />         NOBAR <span style="color: #0000ff;">CENTER</span> ;<br />         COLORS CLR_WHITE , <span style="color: #000000;">9129488</span>  ;  <span style="color: #B900B9;">//nRGB( 190, 215, 190 )</span><br />         <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span><br />    <br />    <br /><br />    <span style="color: #B900B9;">//Añado una columna por cada campo de la base de datos</span><br />    <span style="color: #00C800;">for</span> nPos := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span>f_expd<span style="color: #000000;">&#41;</span>                         <span style="color: #B900B9;">// Array con NOMBRE DE CAMPOS</span><br />      ADD COLUMN <span style="color: #0000ff;">TO</span> BROWSE oBrw;                         <span style="color: #B900B9;">//</span><br />          HEADER f_nomd<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span> OEM ;                      <span style="color: #B900B9;">// Array con TITULOS DE LAS COLUMNAS</span><br />          <span style="color: #00C800;">DATA</span> FieldWBlock<span style="color: #000000;">&#40;</span> f_expd<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span> , <span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>     <span style="color: #B900B9;">// Aca se genera el CodeBlock para el CAMPO</span><br />    <span style="color: #00C800;">next</span><br /><br /> </div>[/code:1rzkm8w2] Lo único que me muestra en la columna es un numerajo largo.
Como añado un columna checkbox a TCBROWSE
Solucionado. Resulta que delante del DATA hay que poner BITMAP. [code=fw:2ekmfxw9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//Añado columna si esta borrado el registro para eliminacion</span><br />&nbsp; &nbsp; &nbsp;ADD COLUMN <span style="color: #0000ff;">TO</span> BROWSE oBrw ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEADER <span style="color: #ff0000;">"D."</span> OEM ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BITMAP <span style="color: #00C800;">DATA</span> &nbsp;iif<span style="color: #000000;">&#40;</span>deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,hBmpLon, hBmpLoff<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOBAR <span style="color: #0000ff;">CENTER</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLORS CLR_WHITE , <span style="color: #000000;">9129488</span> &nbsp;; &nbsp;<span style="color: #B900B9;">//nRGB( 190, 215, 190 )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">15</span></div>[/code:2ekmfxw9]
Como añado una rama a un determino HITEM?
Gustavo, oItem:Add( cPrompt, nImage, Cargo ) revisa FWH\samples\classtree.prg
Como añado una rama a un determino HITEM?
es que esa variable "cargo" nunca la entendi para que existe. en ese caso, "cargo" que seria? gracias.
Como añado una rama a un determino HITEM?
Hola. Tengo el hItem de una rama de un TREE y quiero agregar a esa rama otra mas, como hago? [quote:17auelrs]nRama:= 9222408 oItem:hitem(nRama):add("nueva rama") [/quote:17auelrs] se entiende? estoy re-construyendo un arbol con datos que obtengo e un mysql. gracias
Como añado una rama a un determino HITEM?
Por si quieres "guardar" algo en el item <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Esa es la idea de Cargo