topic
stringlengths
1
63
text
stringlengths
1
577k
Consulta sobre comunicacion serial
Javier si he inicializado el puerto, de hecho el mismo programa lo he compilado con clipper y con xharbour, y ambos funcionan solo es que el de 32 bits lee basura hasta que uso el puerto primero con otro programa, luego funciona perfecto. saludos y gracias por el interes.
Consulta sobre comunicacion serial
Simón, Veo que estás usando fwh (junio 2004), necesitas una versión más actualizada. Sí solo necesitas las comunicaciones, envíanos un email y te enviamos un comm.obj más actualizado.
Consulta sobre el API de windows
Hola a todos: Tengo el siguiente código: [code:2h041z48] #include "hbclass.ch" #include "fivewin.ch" //definiciones para la forma de llamar a la dll #DEFINE DC_CALL_CDECL 0x0010 #DEFINE DC_CALL_STD 0x0020 //definiciones para el apagado, rebooteo o cierre de sesión de windows #DEFINE EWX_LOGOFF 0 #DEFINE EWX_POWEROFF 0x00000008 #DEFINE EWX_REBOOT 0x00000002 #DEFINE EWX_RESTARTAPPS 0x00000040 #DEFINE EWX_SHUTDOWN 0x00000001 #DEFINE EWX_FORCE 0x00000004 #DEFINE EWX_FORCEIFHUNG 0x00000010 FUNCTION Main() LOCAL nResult /*nDll := DllLoad( "User32.dll" ) pFunc := GetProcAddress( nDll, "ExitWindowsEx" ) CallDll( pFunc, EWX_POWEROFF, EWX_FORCEIFHUNG ) DllUnload( nDll )*/ nResult:=DllCall( "User32.dll", DC_CALL_STD, "ExitWindowsEx", EWX_POWEROFF, EWX_FORCEIFHUNG) RETURN NIL [/code:2h041z48] El tema es que estoy intentando apagar el pc con esta rutina (como prueba) y no me funciona. Si alguien me puede ayudar se lo agradecería de antemano Mil gracias
Consulta sobre el API de windows
David, Prueba así: DLL FUNCTION ExitWindowsEx( nFlags AS LONG, nReserved AS LONG ) AS BOOL PASCAL LIB "user32.dll" aunque aqui no está funcionando. Quizá haya que codificarla en lenguaje C completamente.
Consulta sobre el API de windows
[quote="Antonio Linares":39giiuu9]David, Prueba así: DLL FUNCTION ExitWindowsEx( nFlags AS LONG, nReserved AS LONG ) AS BOOL PASCAL LIB "user32.dll" aunque aqui no está funcionando. Quizá haya que codificarla en lenguaje C completamente.[/quote:39giiuu9] [code:39giiuu9] #include "hbclass.ch" #include "fivewin.ch" //definiciones para la forma de llamar a la dll #DEFINE DC_CALL_CDECL 0x0010 #DEFINE DC_CALL_STD 0x0020 //definiciones para el apagado, rebooteo o cierre de sesión de windows #DEFINE EWX_LOGOFF 0 #DEFINE EWX_POWEROFF 8 //0x00000008 #DEFINE EWX_REBOOT 2 //0x00000002 #DEFINE EWX_RESTARTAPPS 40 //0x00000040 #DEFINE EWX_SHUTDOWN 1 //0x00000001 #DEFINE EWX_FORCE 4 //0x00000004 #DEFINE EWX_FORCEIFHUNG 10 //0x00000010 FUNCTION Main() LOCAL nResult /*nDll := DllLoad( "User32.dll" ) pFunc := GetProcAddress( nDll, "ExitWindowsEx" ) CallDll( pFunc, EWX_POWEROFF, EWX_FORCEIFHUNG ) DllUnload( nDll )*/ //nResult:=DllCall( "User32.dll", DC_CALL_STD, "ExitWindowsEx", EWX_POWEROFF, EWX_FORCEIFHUNG) IF MsgNoYes( "¿Desea apagar el equipo?", "Atención") nResult:=ExitWndEx( EWX_FORCEIFHUNG, 0) nResult:=ExitWndEx( EWX_SHUTDOWN, 0) ENDIF //nResult:=ExitWndEx( EWX_SHUTDOWN, 0) RETURN NIL DLL32 FUNCTION ExitWndEx( uFlags AS DWORD, dwRes AS DWORD ) AS BOOL PASCAL FROM "ExitWindowsEx" LIB "user32.dll" [/code:39giiuu9] Gracias por tu respuesta.... Ya lo había intentado A mi no me funciona....que podrá ser? Saludos y ojalá alguien me pueda ayudar.... Busqué la referencia del API de windows en microsoft. Estoy pasando bien los parámetros Mil gracias nuevamente[code:39giiuu9][/code:39giiuu9]
Consulta sobre el API de windows
David, Lo más sencillo es implementarla en lenguaje C completamente: [code:3dsffher] //definiciones para el apagado, rebooteo o cierre de sesión de windows #DEFINE EWX_LOGOFF 0 #DEFINE EWX_POWEROFF 8 //0x00000008 #DEFINE EWX_REBOOT 2 //0x00000002 #DEFINE EWX_RESTARTAPPS 40 //0x00000040 #DEFINE EWX_SHUTDOWN 1 //0x00000001 #DEFINE EWX_FORCE 4 //0x00000004 #DEFINE EWX_FORCEIFHUNG 10 //0x00000010 function Main&#40;&#41; ExitWindowsEx&#40; nOr&#40; EWX_SHUTDOWN, EWX_FORCEIFHUNG &#41; &#41; return nil #pragma BEGINDUMP #include <hbapi&#46;h> #include <windows&#46;h> HB_FUNC&#40; EXITWINDOWSEX &#41; &#123; hb_retl&#40; ExitWindowsEx&#40; hb_parnl&#40; 1 &#41;, hb_parnl&#40; 2 &#41; &#41; &#41;; &#125; #pragma ENDDUMP [/code:3dsffher] Usando EWX_LOGOFF funciona. Con otros valores parece que no.
Consulta sobre el API de windows
Antonio: Te agradezco enormemente tu ayuda. No funciona....quizás un detalle puede ser el SO (vista). Además vi el poder usar el rundll32.exe user32.exe,exitwindows y lamentablemente vista ya no lo trae al igual que el winhlp32.exe A ver si alguien más logra algo. Es comencé el desarrollo de una aplicación para un cyber y es obvio que debe dar la capacidad de poder realizar este tipo de acciones en los pc's clientes. Saludos
Consulta sobre el API de windows
Buen día para todos... Que tal metaldrummer, disculpa pero tiene que ser a traves de API???, porque puedes hacerlo utlizando el comando Shutdown.exe -s -t 0, que es propio de Windows
Consulta sobre el API de windows
Lo que ocurre es que por ser una aplicación que maneja una parte servidor y otra cliente, debo permitir el poder apagar o cerrar la sesión en forma remota. Voy a intentar lo que me dice de todos modos....gracias shutdown estás en todas las versiones de windows? Saludos
Consulta sobre el API de windows
Buen día para todos... [quote="metaldrummer":srifb3dm]Lo que ocurre es que por ser una aplicación que maneja una parte servidor y otra cliente, debo permitir el poder apagar o cerrar la sesión en forma remota. Voy a intentar lo que me dice de todos modos....gracias shutdown estás en todas las versiones de windows? Saludos[/quote:srifb3dm] Si amigo, habre una sesión de MS-Dos y tipea Shutdown y presiona la tecla enter, allí veras todos los parámetro y hay uno el -m \\equipo que sirve para hacerlo vía remota, claro tienes que tener permiso para hacerlo
Consulta sobre el API de windows
[quote="ARCC":8rh5huox]Buen día para todos... [quote="metaldrummer":8rh5huox]Lo que ocurre es que por ser una aplicación que maneja una parte servidor y otra cliente, debo permitir el poder apagar o cerrar la sesión en forma remota. Voy a intentar lo que me dice de todos modos....gracias shutdown estás en todas las versiones de windows? Saludos[/quote:8rh5huox] Si amigo, habre una sesión de MS-Dos y tipea Shutdown y presiona la tecla enter, allí veras todos los parámetro y hay uno el -m \\equipo que sirve para hacerlo vía remota, claro tienes que tener permiso para hacerlo[/quote:8rh5huox] Funciona a las mil maravillas, probé a apagar y cerrar sesión y funciona ok. Muchas gracias. Además lo probé directamente a través de un RUN desde la aplicación y funciona perfecto....claro que si no me funcionó via API me complica el tema ya que tengo que utilizar el API para poder determinar las impresoras que tiene instalado el pc y autorizar o no su impresión, ver si se conectan o no dispositivos usb....y por cierto supongo que con el api se debe poder detectar cuando se desconecta el teclado, mouse, etc (para controlar los robos en el local), setear el fondo de pantalla, etc. Debo seguir investigando rápidamente. Saludos
Consulta sobre el API de windows
Lo he probado poniendo CERO en el segundo parámetro y ¡¡¡ FUNCIONA !!! Los ejemplos que he visto por ahí lo ponen a CERO el 2º parámetro. Ejejmplo VB: [code:3k5nq9z1]'------------Declarar esta funcion en un modulo&#46;&#46;&#46; Declare Function ExitWindowsEx& Lib "user32" &#40;ByVal uFlags&, ByVal dwReserved&&#41; Public Const EWX_LOGOFF = 0 Public Const EWX_SHUTDOWN = 1 Public Const EWX_REBOOT = 2 Public Const EWX_FORCE = 4 '----------------------- lresult = ExitWindowsEx&#40;EWX_REBOOT, 0&&#41; '---- Reinicia el sistema lresult = ExitWindowsEx&#40;EWX_SHUTDOWN, 0&&#41; '---- Apaga el sistema[/code:3k5nq9z1] Otros ejemplos: [code:3k5nq9z1]Call ExitWindowsEX&#40;1,0&#41; --> Reinicia &#40;creo&#41; Call ExitWindowsEX&#40;2,0&#41; --> Apaga Call ExitWindowsEX&#40;6,0&#41; --> FOrzado[/code:3k5nq9z1][code:3k5nq9z1]Private Declare Function ExitWindowsEx& Lib "user32" &#40;ByVal uFlags&, ByVal dwReserved&&#41; i = ExitWindowsEx&#40;1, 0&&#41; i = ExitWindowsEx&#40;0, 0&&#41; i = ExitWindowsEx&#40;2, 0&&#41;[/code:3k5nq9z1] Como se puede ver el segundo parámetro esta siempre a CERO.
Consulta sobre el API de windows
JM, En Vista no funciona <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Consulta sobre el API de windows
[quote="Antonio Linares":2ozyspm5]En Vista no funciona <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->[/quote:2ozyspm5] Yo lo he probado en XP y Win2000.
Consulta sobre el API de windows
[quote="JmGarcia":a3v403fc][quote="Antonio Linares":a3v403fc]En Vista no funciona <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->[/quote:a3v403fc] Yo lo he probado en XP y Win2000.[/quote:a3v403fc] Gracias a Antonio, he conseguido que me funcione en Vista de la siguiente forma (solamente logoff): [code:a3v403fc] #include "hbclass&#46;ch" #include "fivewin&#46;ch" //definiciones para el apagado, rebooteo o cierre de sesión de windows #DEFINE EWX_LOGOFF 0 #DEFINE EWX_POWEROFF 8 //0x00000008 #DEFINE EWX_REBOOT 2 //0x00000002 #DEFINE EWX_RESTARTAPPS 40 //0x00000040 #DEFINE EWX_SHUTDOWN 1 //0x00000001 #DEFINE EWX_FORCE 4 //0x00000004 #DEFINE EWX_FORCEIFHUNG 10 //0x00000010 FUNCTION Main&#40;&#41; LOCAL nResult IF MsgNoYes&#40; "¿Desea apagar el equipo?", "Atención"&#41; ExitWindowsEx&#40; nOr&#40; EWX_LOGOFF, 0 &#41; &#41; ENDIF RETURN NIL #pragma BEGINDUMP #include <hbapi&#46;h> #include <windows&#46;h> HB_FUNC&#40; EXITWINDOWSEX &#41; &#123; hb_retl&#40; ExitWindowsEx&#40; hb_parnl&#40; 1 &#41;, hb_parnl&#40; 2 &#41; &#41; &#41;; &#125; #pragma ENDDUMP [/code:a3v403fc] Estudiando un poco al comando shutdown.exe veo que al darle el parámetro /r (reinicio) o /s (apagado) debe ir acompañado del parámetro /t xx (segundos a esperar para dicha acción). Supongo que en vista esto es obligatorio y claro está que con este procedimiento al no pasar parámetros obviamente que no lo ejecuta. Por el momento utilizando shutdown.exe con el comando RUN funciona perfecto. Sí un alcanze: se debe colocar toda la ruta a shutdown.exe ya que RUN no respeta la variable PATH del S.O. Saludos
Consulta sobre el API de windows
[quote="metaldrummer":2vqgpob7]Por el momento utilizando shutdown.exe con el comando RUN funciona perfecto. Sí un alcanze: se debe colocar toda la ruta a shutdown.exe ya que RUN no respeta la variable PATH del S.O. Saludos[/quote:2vqgpob7]Utiliza el RemoteShell. [code:2vqgpob7]oRemoteShell&#58;=CreateObject&#40;"WScript&#46;Shell"&#41; oRemoteShell&#58;Run&#40;"ShutDown -s -m \\NombrePC",0,&#46;F&#46;&#41; oRemoteShell&#58;=nil[/code:2vqgpob7] [quote="metaldrummer":2vqgpob7]...he conseguido que me funcione en Vista de la siguiente forma (solamente logoff):[/quote:2vqgpob7]Efectivamente, se me olvido decir que solo me funciona el LOGOFF.
Consulta sobre el API de windows
[quote="JmGarcia":iqscy0w8][quote="metaldrummer":iqscy0w8]Por el momento utilizando shutdown.exe con el comando RUN funciona perfecto. Sí un alcanze: se debe colocar toda la ruta a shutdown.exe ya que RUN no respeta la variable PATH del S.O. Saludos[/quote:iqscy0w8]Utiliza el RemoteShell. [code:iqscy0w8]oRemoteShell&#58;=CreateObject&#40;"WScript&#46;Shell"&#41; oRemoteShell&#58;Run&#40;"ShutDown -s -m \\NombrePC",0,&#46;F&#46;&#41; oRemoteShell&#58;=nil[/code:iqscy0w8] [quote="metaldrummer":iqscy0w8]...he conseguido que me funcione en Vista de la siguiente forma (solamente logoff):[/quote:iqscy0w8]Efectivamente, se me olvido decir que solo me funciona el LOGOFF.[/quote:iqscy0w8] El wscript.shell funciona de mil maravillas en vista y xp, y obviamente no aparece el pantallazo del run. Corre perfecto tanto para apagar, reiniciar, cerrar sesión, etc. De donde obtienes toda esta información? Algín link en particular? Saludos y gracias por tu ayuda
Consulta sobre el API de windows
[quote="metaldrummer":1rls13oq]...y obviamente no aparece el pantallazo del run...[/quote:1rls13oq]Por eso te lo he comentado. [quote="metaldrummer":1rls13oq]De donde obtienes toda esta información? Algín link en particular?[/quote:1rls13oq]Pues en MSDN LIBRARY de Microsoft ( <!-- m --><a class="postlink" href="http://msdn2.microsoft.com/es-es/library/default.aspx">http://msdn2.microsoft.com/es-es/library/default.aspx</a><!-- m --> ). Tambien busco en foros de VB (Visual Basic) y DELPHI. Casi todo lo encientro en GOOGLE. En concreto esto del "WScript.Shell" esta en <!-- m --><a class="postlink" href="http://support.microsoft.com/kb/278319/es">http://support.microsoft.com/kb/278319/es</a><!-- m --> Una ultima cosa: Si quieres tener la respuesta del copmando redirecciona a un fichero de texto. [color=red:1rls13oq]oRemoteShell:Run("ShutDown -s -m \\NombrePC [b:1rls13oq]> C:\tmp\Salida.txt[/b:1rls13oq]",0,.F.)[/color:1rls13oq] Te dará información del éxito o no del comando, sea el comando que sea.
Consulta sobre el uso de gráficos en filas de un xBrowse
Estimados Tengo un xBrowse donde en dos de la columnas tnego definido que el contenido sea un ráfico y texto, esto con los siguientes comandos [quote:3hrsut0c] WITH OBJECT <!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->Col(2) :AddBitmap(aGraphsL, ) :bBmpData := {|| oLbx:KeyNo() } // número del bitmap para cada fila :nBmpWidth := 22 // ancho de la franja donde se muestra el bitmap, png :bCellToolTip := { || AyudaEvtEsp(oLbx:aArrayData[oLbx:KeyNo(),2]) } END [/quote:3hrsut0c] Pero, como la necesidad hace que ese xBrowse sea dinámico, voy ingresando nuevas filas (rows) y se vuelve a ordenar el xBrowse, esto crea la necesidad de actualizar la matriz con los gráficos para cada fila, y ahí está mi problema, vuelvo a crear la matriz "aGraphsL" agregando los componentes requeridos, pero el xBrowse luego de actualizarse con oLbx:SetArray(aLineaTiempo,.F.) actualiza todo el contenido de texto correctamente, pero los gráficos siguen siendo los mismos, sin cambiar de fila, ni incrementarse. ¿Puedo resolver esto de alguna forma? Saludos Fernando Espinoza A.
Consulta sobre el uso de gráficos en filas de un xBrowse
Estimados; alguna idea sobre como resolver el problema descrito previamente. Saludos Fernando Espinoza A.
Consulta sobre el uso de gráficos en filas de un xBrowse
Hola Fernando, no entendí bien tu solicitud. A cada nueva fila le pones un nuevo grafico? O el grafico que muestras en cada fila tiene que ver con un estado o el valor de un campo del registro? Yo tengo un ejemplo de uso en que el grafico muestra un icono del estado de cada registro. [code=fw:ap84t5va]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'PEND.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'VISADA.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DISPO.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'NDISPO.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DEV.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'ACEPT.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'RECH.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'INGR.BMP'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddBitMap</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'RENU.BMP'</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bBmpData</span> := <span style="color: #000000;">&#123;</span>|| oQryBrw:<span style="color: #000000;">estado</span> &nbsp;<span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:ap84t5va] Cada vez que actualizo el xbrowse segun sea el dato de estado se muestra el bmp correspondiente. No se si eso te pueda servir
Consulta sobre el uso de gráficos en filas de un xBrowse
Estimado cmsoft Sería lo segundo, el grafico que se muestra en cada fila tiene que ver con el valor de un campo. El tema es que cuando agregó una nueva fila, ese nuevo valor no va al final, sino que se ordena de acuerdo a un índice, y ahí es donde no me funciona, porque si bien defino de nuevo toda la matriz con los gráficos (aGraphsL en mi ejemplo), cada adición al xBrowse no se muestra bien y las filas del final se quedan sin su gráfico y como el orden cambió, los gráficos no guardan relación (si agrego 2 filas, solo las primeras n-2 filas, muestran un gráfico y los únicos correctos serán los que coincidan por azar). Saludos Fernando Espinoza A.
Consulta sobre el uso de gráficos en filas de un xBrowse
If you please indicate the FWH version you are using, we can advise a solution most appropriate for the FWH version. [u:lmqblh5h][b:lmqblh5h]How oCol:AddBitmap( aArray ) works:[/b:lmqblh5h][/u:lmqblh5h] TXBrwColumn object internally maintains an array of bitmaps oCol:aBitmaps. When we first call oCol:AddBitmap( { bmp1, bmp2, bmp3 } ), oCol:aBitmaps is filed with { bmp1, bmp2, bmp3 }. If we call oCol:AddBitmap( { new1, new2, new3 } ) these new bitmaps are added to the existing oCol:aBitmaps but do not replace the existing bitmaps. Now the oCol:aBitmaps is { bmp1, bmp2, bmp3, new1, new2 new3 } So, If oCol:bBmpNo returns 1 it still shows bmp1 only not new1. If we want to replace existing bitmaps, then [code=fw:lmqblh5h]<div class="fw" id="{CB}" style="font-family: monospace;"><br />AEval<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">aBitmaps</span>, <span style="color: #000000;">&#123;</span> |b| PalBmpFree<span style="color: #000000;">&#40;</span> b <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />oCol:<span style="color: #000000;">aBitmaps</span> := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />oCol:<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> new1, new2, new3 <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// Now oCol:aBitmaps is { new1, new2, new3 }</span><br /> </div>[/code:lmqblh5h] So, oCol:AddBitmap() and oCol:bBmpNo are not suitable for dynamic arrays of images. [u:lmqblh5h][b:lmqblh5h]In such cases, we recommend an approach similar to the sample given below:[/b:lmqblh5h][/u:lmqblh5h] [code=fw:lmqblh5h]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br />   <span style="color: #00C800;">local</span> aData := ;<br />      <span style="color: #000000;">&#123;</span>  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"browse"</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\b</span>rowse.bmp"</span> <span style="color: #000000;">&#125;</span> ;<br />      ,  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"button"</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\b</span>utton.bmp"</span> <span style="color: #000000;">&#125;</span> ;<br />      ,  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"calc"</span>,   <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\c</span>alc.bmp"</span> <span style="color: #000000;">&#125;</span> ;<br />      ,  <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"copy"</span>,   <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\c</span>opy.bmp"</span> <span style="color: #000000;">&#125;</span> ;<br />      <span style="color: #000000;">&#125;</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;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">340</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">35</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />     DATASOURCE aData COLUMNS <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> ;<br />     HEADERS <span style="color: #ff0000;">"NAME"</span>, <span style="color: #ff0000;">"BMP"</span> ;<br />     CELL LINES NOBORDER AUTOSORT<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">nStretchCol</span>   := <span style="color: #000000;">1</span><br />      WITH OBJECT :<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />         :<span style="color: #000000;">cDataType</span>        := <span style="color: #ff0000;">"F"</span><br />         :<span style="color: #000000;">lBmpTransparent</span>  := .t.<br />         :<span style="color: #000000;">nDataBmpAlign</span>    := AL_CENTER<br />      END<br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"ADD-1"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"attach"</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\a</span>ttach.bmp"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br />               oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"ADD-2"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"floppy"</span>, <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\3</span>2x32<span style="color: #000000;">\f</span>loppy.bmp"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br />               oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:lmqblh5h] [url=https&#58;//imageshack&#46;com/i/pmjCophhg:lmqblh5h][img:lmqblh5h]https&#58;//imagizer&#46;imageshack&#46;com/img922/264/jCophh&#46;gif[/img:lmqblh5h][/url:lmqblh5h] If your requirement is different, please let us know and we will provide a suitable solution. Please indicate your FWH version.
Consulta sobre el uso de gráficos en filas de un xBrowse
Mi versión es FW xHarbour 1709. Saludos
Consulta sobre el uso de gráficos en filas de un xBrowse
Estimado Mr. Rao: Complementando la respuesta previa, le informo que la primera alternativa de solución dada por usted, funcionó correctamente de acuerdo a lo que necesito. xBrowse es muy bueno. Saludos Fernando Espinoza A.
Consulta sobre el uso de gráficos en filas de un xBrowse
Estimado Mr. Rao: Complementando la respuesta previa, le informo que la primera alternativa de solución dada por usted, funcionó correctamente de acuerdo a lo que necesito. xBrowse es muy bueno. Saludos Fernando Espinoza A.
Consulta sobre el uso de la ñ / Ñ en RTF o DOC SOLUCIONADO
Amigos Alguna sugerencia o definitivamente a nadie le a sucedido? Saludos Antonio
Consulta sobre el uso de la ñ / Ñ en RTF o DOC SOLUCIONADO
Amigos muy buen dia. Tengo un problema, cuando agrego o inserto un texto a un archivo RTF o DOC, desde codigo FWH. En el programa asigno un texto a una variable que contiene " Ñ o ñ, o cualquier acento ", luego lo agrego a este archivo RTF o DOC y me muestra caracteres extraños, haciendo muy fea la escritura del texto. Ejemplo: text1 = " No procede en menores de 46 años" Archivo RTF o DOC ressultado : No procede en menores de 46 a±os En espera de algun comentario, les saluda. Antonio.
Consulta sobre el uso de la ñ / Ñ en RTF o DOC SOLUCIONADO
Intente con OemToAnsi() ó AnsiToOem(). Saludos.
Consulta sobre el uso de la ñ / Ñ en RTF o DOC SOLUCIONADO
Hola Karinha Como estas? Como siempre Maestro, FUNCIONO PERFECTO. AnsiToOem() <----- Esta funciono. Muchos Saludos y Muy agradecido. Antonio
Consulta sobre falla de programa.... (RESUELTO)
Un cálido abrazo a los compañeros del foro y una feliz primavera a los del sur y otoño a los del norte <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Cuando un programa tiene un error, aparece la clásica ventanita donde se muestra toda la línea desde el origen hasta el código donde se produce el error on el botoncito que pregunta y si queremos guardar esta información. Tengo un programa que hace un conjunto de consultas a ws, elabora un informe en excel y lo envía por correo a varios destinatarios, el mismo se ejecuta en horarios específicos por un disparador que lo ejecuta, este disparador si el programa se ejecuta correctamente no hace nada, pero si falla me manda un e-mail indicando que el programa falló. Cuando se produce un fallo en mi programa, como se queda en la ventanita esperando que indique si grabo o "QUIT" ni recibo aviso de que falló, ni se puede volver a ejecutar en la siguiente hora porque está en ejecución aún. Mi pregunta es si se puede hacer que cuando el programa sufre un error simplemente se cierre sin quedarse en ese cartel. Gracias, espero haber sido claro.
Consulta sobre falla de programa.... (RESUELTO)
Estimado José, Prueba a hacer: ErrorBlock( { | oError | .F. } ) // Prueba con .T. también
Consulta sobre falla de programa.... (RESUELTO)
Muchas Gracias Antonio!! Lo pruebo y reporto <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Consulta sobre falla de programa.... (RESUELTO)
Funcionó perfecto tal como Ud. lo puso. Muchísimas gracias, ha resuelto mi problema <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Un abrazo
Consulta sobre fondo de recurso
Amigos. Buen dia. Tengo una duda. Es posible dejarla el Fondo de "DEFINE DIALOG oDlg2 SIZE 350,250 PIXEL TRUEPIXEL FONT oFont2 STYLE nOR(WS_POPUP) ", transparente y quitar el fondo gris? Muchos saludos Antonio
Consulta sobre fondo de recurso
Intenta con OPACITY ó NOOPACITY. Algo asi. Haga un busqueda porfa. Regards, saludos.
Consulta sobre fondo de recurso
remtec: Intenta con oDlg:nOpacity := 250 // Entre mas alto el valor es menos transparente (Más opaco) Saludos
Consulta sobre fondo de recurso
Hola Armando y João. Muchas gracias por su ayuda. Aplique: oDlg2:nOpacity := 180 Quedo super Muchas gracias Saludos. Antonio
Consulta sobre fwh9.08
Una Consulta, la version 9.08 incluye las librerias para mingw ?? Gracias, Lautaro Moreira
Consulta sobre fwh9.08
Lautaro, No, aun no las hemos publicado. Estamos en ello <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Consulta sobre fwh9.08
OK, Gracias Lautaro Moreira
Consulta sobre impresión y puertos LPTx
Déjame que mire algunos ejemplos con TPrinter, no sé por qué me suena de haber visto por algún lado una línea preguntando por el estado de la impresora. Te digo algo.
Consulta sobre impresión y puertos LPTx
Lo dicho, me sonaba de haber visto algo. Lo puedes encontrar en el directorio FWH\SAMPLES\TESTRTF.PRG. if Empty( oPrn:hDC ) MsgStop( "Printer not ready!" ) return nil endif
Consulta sobre impresión y puertos LPTx
Fernando, Muchas gracias por tus apuntes, de hecho había visto ese método en otro post de este foro. En principio estoy usando la clase TDosPrn y desconozco si tu ejemplo sirve para esa clase, en todo caso he hecho pruebas y no funciona, nunca marca que la impresora está "Off Line", tanto conectada directamente como en impresora compartida. He leido muchos hilos en este foro y no encuentro solución, a pesar de que se han hecho varios intentos como en este por ejemplo: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=3526&hilit=tdosprn+clipper">viewtopic.php?f=3&t=3526&hilit=tdosprn+clipper</a><!-- l --> Sin embargo encontré esa DLL y me he hecho demasiadas ilusiones creo yo, no obstante seguiré intentando por si obtengo algún resultado. Saludos!
Consulta sobre impresión y puertos LPTx
¿Cómo estás creando el objeto objeto oPrn?
Consulta sobre impresión y puertos LPTx
Fernando, [code=fw:1tiqufrb]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; oPrn := TDosPrn<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;">"lpt1"</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1tiqufrb]
Consulta sobre impresión y puertos LPTx
Ok, he estado probando con mi impresora, pero me da que lo que hacia bajo Clipper IsPrinter() no sirve bajo Windows/Harbour lo que sea. Lo siento.
Consulta sobre impresión y puertos LPTx
Estoy tratando de comenzar a migrar los primeros informes de una aplicación hecha en clipper, que trabaja fundamentalmente con impresoras matriciales. Por lo que me he podido documentar en estos foros, la clase que mejor se adapta sería la TdosPrn, pero me encuentro con el inconveniente de cómo han sido elaborados esos listados en clipper. El 99% de ellos estan escritos con el comando "?" y "??" para el envío de datos a la impresora, por lo que me interesaría saber si existe alguna clase que soporte el envío a impresora mediante esos comandos. Por otro lado, me gustaría saber si alguien ha conseguido resolver el problema de saber si una impresora conectada a un puerto LPTx está online. La función PrintReady() siempre devuelve .f. en todo caso, IsPrinter() siempre devuelve .t. y no encuentro manera ni función que hagan esto de forma fiable. Por lo que he leído, el problema está en que los sistemas basados en NT (XP en adelante), no permiten el acceso diréctamente a los puertos si no es a través de un driver de hardware o que la aplicación sea capaz de correr en modo "Kernel", en cuyo caso no tiene ninguna restricción para acceder a los puertos. Esto funciona así, por lo visto, por motivos de seguridad. <!-- m --><a class="postlink" href="http://logix4u.net/Legacy_Ports/Parallel_Port/Inpout32.dll_for_Windows_98/2000/NT/XP.html">http://logix4u.net/Legacy_Ports/Paralle ... NT/XP.html</a><!-- m --> de ahí he sacado la información y ahí hay una DLL (32/64 bits) que permite el acceso directo a los puertos, con código fuente, ejemplos, etc. libre de uso para aplicaciones no comerciales. El problema está en que mis conocimientos para hacer uso de esa DLL o entender el código C, es prácticamente nulo. Resumiendo, mi pregunta es si hay alguna manera de resolver este incoveniente. Pido disculpas si digo/pregunto alguna burrada pues soy bastante novato en todo esto. Saludos!
Consulta sobre impresión y puertos LPTx
Hola. Me tropecé con un problema muy similar al tuyo cuando migré de Clipper a Fivewin y tenia listados definidos para matriciales con papel de 6 pulgadas de alto, y no te queda otro remedio que TDosPrn(), aunque mis listados no estaban definidos en Clipper con ? y ??, sino con row(), col(). Si quieres te paso un ejemplo. En cuanto a lo de saber si la impresora está lista mi solución es la siguiente: siempre que mandas a imprimir lanzas un mensaje tipo "Compruebe que la impresora está encendida".
Consulta sobre impresión y puertos LPTx
Fernando, Gracias por tu ayuda. Respecto de los comandos "?" y "??", creo que no me queda más opción que ir listado a listado modificándolo por oPrn:Write y oPrn:NewLine según sea el caso. Así que se soluciona con paciencia <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> , eso que nos falta a muchos. Respecto del problema para saber si la impresora está lista o no, el inconveniente que veo es que con el paso del tiempo el usuario tiende a "pasar olímpicamente" del mensaje. Y claro, llega el día que la impresora no estaba encendida y el informe se perdió y tengo varios informes que una vez impresos, reimprimirlos es prácticamente imposible. Estoy pegándome con la DLL que comentaba en el primer post, pero mis conociminetos de C son nulos. Lo bueno de esa dll es que lleva enbebido un Driver en modo kernel, que haciendo uso de él, tendríamos acceso al puerto LPT en concreto y ahí sí sería posible preguntar si la impresora está lista. También teniendo el código fuente en C de la DLL creo que habría la posibilidad de escribir alguna rutina para poder usar con Harbour y FWH, pero eso ya tendría que ser algún gurú del C Gracias y saludos.
Consulta sobre impresión y puertos LPTx
Fernando, Muchas gracias por tu ayuda. A ver si alguien puede arrojar más luz... Saludos!
Consulta sobre impresión y puertos LPTx
David, Estoy revisando el ejemplo Test2.c que está en [url:1iyf1s01]http&#58;//www&#46;hytherion&#46;com/beattidp/comput/pport&#46;htm[/url:1iyf1s01] y parece que podemos adaptarlo facilmente a Harbour <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Aqui tienes Test2.prg compilando y funcionando bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [code=fw:1iyf1s01]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// Adaptado para funcionar con Harbour y FWH</span><br /><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 />&nbsp; &nbsp;TestPrn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP &nbsp; <br /><br /><span style="color: #B900B9;">/**************************************************/</span><br /><span style="color: #B900B9;">/*** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;***/</span><br /><span style="color: #B900B9;">/*** Test2.c &nbsp;-- test interface to inpout32.dll ***/</span><br /><span style="color: #B900B9;">/*** &nbsp;( <!-- m --><a class="postlink" href="http://www.logix4u.net/inpout32.htm">http://www.logix4u.net/inpout32.htm</a><!-- m --> ) &nbsp; ***/</span><br /><span style="color: #B900B9;">/*** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;***/</span><br /><span style="color: #B900B9;">/*** Copyright (C) 2005, Douglas Beattie Jr. &nbsp; &nbsp;***/</span><br /><span style="color: #B900B9;">/*** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;***/</span><br /><span style="color: #B900B9;">/*** &nbsp; &nbsp;<beattidp@ieee.org> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ***/</span><br /><span style="color: #B900B9;">/*** &nbsp; &nbsp;http://www.hytherion.com/beattidp/ &nbsp; &nbsp; &nbsp;***/</span><br /><span style="color: #B900B9;">/*** &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;***/</span><br /><span style="color: #B900B9;">/**************************************************/</span><br /><span style="color: #B900B9;">/*&nbsp; Last Update: 2006.05.14<br />&nbsp;*/</span><br /><br /><span style="color: #B900B9;">/*******************************************************/</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp;Builds with Borland's Command-line C Compiler &nbsp; &nbsp; &nbsp;*/</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp;(free for public download from Borland.com, at &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp;http://www.borland.com/bcppbuilder/freecompiler ) &nbsp;*/</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; Compile with: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; BCC32 -IC:\BORLAND\BCC55\INCLUDE &nbsp;TEST2.C &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp;Be sure to change PPORT_BASE (Port Base address) &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp;accordingly if your LPT port is addressed &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span><br /><span style="color: #B900B9;">/* &nbsp;elsewhere. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/*******************************************************/</span><br /><br /><br /><span style="color: #00D7D7;">#include</span> <stdio.h><br /><span style="color: #00D7D7;">#include</span> <conio.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><br /><span style="color: #B900B9;">/* Definitions in the build of inpout32.dll are: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</span><br /><span style="color: #B900B9;">/* &nbsp; short _stdcall Inp32(short PortAddress); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br /><span style="color: #B900B9;">/* &nbsp; void _stdcall Out32(short PortAddress, short data); &nbsp; &nbsp;*/</span><br /><br /><span style="color: #B900B9;">/* prototype (function typedef) for DLL function Inp32: */</span><br /><br />&nbsp; &nbsp; &nbsp;typedef short <span style="color: #000000;">&#40;</span>_stdcall *inpfuncPtr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>short portaddr<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;typedef void <span style="color: #000000;">&#40;</span>_stdcall *oupfuncPtr<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>short portaddr, short datum<span style="color: #000000;">&#41;</span>;<br /><br /><span style="color: #00D7D7;">#define</span> PPORT_BASE 0x378<br /><br /><br /><span style="color: #B900B9;">// Prototypes for Test functions</span><br />void test_read8<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />void test_write<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span>;<br />void test_write_datum<span style="color: #000000;">&#40;</span>short datum<span style="color: #000000;">&#41;</span>;<br /><br /><br /><span style="color: #B900B9;">/* After successful initialization, these 2 variables<br />&nbsp; &nbsp;will contain function pointers.<br />&nbsp;*/</span><br />&nbsp; &nbsp; &nbsp;inpfuncPtr inp32fp;<br />&nbsp; &nbsp; &nbsp;oupfuncPtr oup32fp;<br /><br /><br /><span style="color: #B900B9;">/* Wrapper functions for the function pointers<br />&nbsp; &nbsp; - call these functions to perform I/O.<br />&nbsp;*/</span><br />&nbsp; &nbsp; &nbsp;short &nbsp;Inp32 <span style="color: #000000;">&#40;</span>short portaddr<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span>inp32fp<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>portaddr<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp;void &nbsp;Out32 <span style="color: #000000;">&#40;</span>short portaddr, short datum<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span>oup32fp<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>portaddr,datum<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span> <br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> TESTPRN <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;HINSTANCE hLib;<br /><br />&nbsp; &nbsp; &nbsp;short x;<br />&nbsp; &nbsp; &nbsp;int i;<br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* Load the library */</span><br />&nbsp; &nbsp; &nbsp;hLib = LoadLibrary<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"inpout32.dll"</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>hLib == <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf<span style="color: #000000;">&#40;</span>stderr,<span style="color: #ff0000;">"LoadLibrary Failed.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// return -1;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* get the address of the function */</span><br /><br />&nbsp; &nbsp; &nbsp;inp32fp = <span style="color: #000000;">&#40;</span>inpfuncPtr<span style="color: #000000;">&#41;</span> GetProcAddress<span style="color: #000000;">&#40;</span>hLib, <span style="color: #ff0000;">"Inp32"</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>inp32fp == <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf<span style="color: #000000;">&#40;</span>stderr,<span style="color: #ff0000;">"GetProcAddress for Inp32 Failed.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// return -1;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp; &nbsp;oup32fp = <span style="color: #000000;">&#40;</span>oupfuncPtr<span style="color: #000000;">&#41;</span> GetProcAddress<span style="color: #000000;">&#40;</span>hLib, <span style="color: #ff0000;">"Out32"</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>oup32fp == <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf<span style="color: #000000;">&#40;</span>stderr,<span style="color: #ff0000;">"GetProcAddress for Oup32 Failed.<span style="color: #000000;">\n</span>"</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// return -1;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #B900B9;">/*******************************************************/</span><br /><span style="color: #B900B9;">/** IF WE REACHED HERE, INITIALIZED SUCCESSFUL &nbsp; &nbsp;******/</span><br /><span style="color: #B900B9;">/*******************************************************/</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* now test the functions */</span><br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** Read 8 bytes at I/O base address */</span><br />&nbsp; &nbsp; &nbsp;test_read8<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;Write 0x75 to data register and verify */</span><br />&nbsp; &nbsp; &nbsp;test_write<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;One more time, different value */</span><br />&nbsp; &nbsp; &nbsp;test_write_datum<span style="color: #000000;">&#40;</span>0xAA<span style="color: #000000;">&#41;</span>;<br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* finished - unload library and exit */</span><br />&nbsp; &nbsp; &nbsp;FreeLibrary<span style="color: #000000;">&#40;</span>hLib<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// return 0;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp;TEST: &nbsp;Read inputs of 8 registers from PORT_BASE address<br />&nbsp;*/</span><br />void test_read8<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br /><br />&nbsp; &nbsp; &nbsp;short x;<br />&nbsp; &nbsp; &nbsp;int i;<br />&nbsp; &nbsp; &nbsp;char buffer<span style="color: #000000;">&#91;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#93;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* Try to read 0x378..0x37F, LPT1: &nbsp;*/</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>i=PPORT_BASE; <span style="color: #000000;">&#40;</span>i<<span style="color: #000000;">&#40;</span>PPORT_BASE<span style="color: #000000;">+8</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>; i++<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x = Inp32<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sprintf<span style="color: #000000;">&#40;</span> buffer, <span style="color: #ff0000;">"Port read (%04X)= %04X<span style="color: #000000;">\n</span>"</span>,i,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp;TEST: &nbsp;Write constant 0x77 to PORT_BASE (Data register)<br />&nbsp;*/</span><br />void test_write<span style="color: #000000;">&#40;</span>void<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;short x;<br />&nbsp; &nbsp; &nbsp;int i;<br />&nbsp; &nbsp; &nbsp;char buffer<span style="color: #000000;">&#91;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#93;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;Write the data register */</span><br /><br />&nbsp; &nbsp; &nbsp;i=PPORT_BASE;<br />&nbsp; &nbsp; &nbsp;x=0x75;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;Write the data register */</span><br />&nbsp; &nbsp; &nbsp;Out32<span style="color: #000000;">&#40;</span>i,x<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;sprintf<span style="color: #000000;">&#40;</span>buffer, <span style="color: #ff0000;">"Port write to 0x%X, datum=0x%2X<span style="color: #000000;">\n</span>"</span> ,i ,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** And read back to verify &nbsp;*/</span><br />&nbsp; &nbsp; &nbsp;x = Inp32<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;sprintf<span style="color: #000000;">&#40;</span>buffer, <span style="color: #ff0000;">"Port read (%04X)= %04X<span style="color: #000000;">\n</span>"</span>,i,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;Set all bits high */</span><br />&nbsp; &nbsp; &nbsp;x=0xFF;<br />&nbsp; &nbsp; &nbsp;Out32<span style="color: #000000;">&#40;</span>i,x<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;Now, set bi-directional and read again */</span><br />&nbsp; &nbsp; &nbsp;Out32<span style="color: #000000;">&#40;</span>PPORT_BASE<span style="color: #000000;">+2</span>,0x20<span style="color: #000000;">&#41;</span>; &nbsp; &nbsp; <span style="color: #B900B9;">// Activate bi-directional</span><br />&nbsp; &nbsp; &nbsp;x = Inp32<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;sprintf<span style="color: #000000;">&#40;</span>buffer, <span style="color: #ff0000;">"Set Input, read (%04X)= %04X<span style="color: #000000;">\n</span>"</span>,i,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;Out32<span style="color: #000000;">&#40;</span>PPORT_BASE<span style="color: #000000;">+2</span>,0x00<span style="color: #000000;">&#41;</span>; &nbsp; &nbsp; <span style="color: #B900B9;">// Set Output-only again</span><br />&nbsp; &nbsp; &nbsp;x = Inp32<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;sprintf<span style="color: #000000;">&#40;</span>buffer, <span style="color: #ff0000;">"Reset Ouput, read (%04X)= %04X<span style="color: #000000;">\n</span>"</span>,i,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #B900B9;">/*<br />&nbsp; &nbsp;TEST: &nbsp;Write data from parameter<br />&nbsp;*/</span><br />void test_write_datum<span style="color: #000000;">&#40;</span>short datum<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp;short x;<br />&nbsp; &nbsp; &nbsp;int i;<br />&nbsp; &nbsp; &nbsp;char buffer<span style="color: #000000;">&#91;</span> <span style="color: #000000;">100</span> <span style="color: #000000;">&#93;</span>;<br /><br />&nbsp; &nbsp; &nbsp;i=PPORT_BASE;<br />&nbsp; &nbsp; &nbsp;x = datum;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** &nbsp;Write the data register */</span><br />&nbsp; &nbsp; &nbsp;Out32<span style="color: #000000;">&#40;</span>i,x<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;sprintf<span style="color: #000000;">&#40;</span>buffer, <span style="color: #ff0000;">"Port write to 0x%X, datum=0x%2X<span style="color: #000000;">\n</span>"</span> ,i ,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/***** And read back to verify &nbsp;*/</span><br />&nbsp; &nbsp; &nbsp;x = Inp32<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;sprintf<span style="color: #000000;">&#40;</span>buffer, <span style="color: #ff0000;">"Port read (%04X)= %04X<span style="color: #000000;">\n</span>"</span>,i,x<span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;MessageBox<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, buffer, <span style="color: #ff0000;">"OK"</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:1iyf1s01]
Consulta sobre impresión y puertos LPTx
Antonio, <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> magistral. Compilado y ejecutado, aparentemente no da error, todo ok y BIDIRECCIONAL!!! lectura/escritura, vamos, que es directo al puerto. Las pruebas que hace test2.prg dan todas ok. Ahora a ver si teniendo acceso directo al puerto LPT se puede hacer funcionar a IsPrinter() o PrintReady() con alguna adaptación. Saludos!
Consulta sobre impresión y puertos LPTx
Excelente.... y pa xHarbour??? Salu2
Consulta sobre la clase RepExcel
Hola gente del foro: Quiero hacerles una consulta, para aquellos que utilizan esta clase, para exportar los reportes a Excel. Tengo un problema, que me surge cuando el reporte generado, se basa en un filtro de una tabla o en un array. El reporte me lo genera correctamente, pero cuando pongo que exporte a Excel, el mismo sale sin ningún registro. Alguien ha tenido este problema, y por ende, lo ha solucionado? Agradecido de antemano
Consulta sobre la clase RepExcel
Hola Puedes poner como armas tu reporte
Consulta sobre la clase RepExcel
Hola RenOmans: Te paso acá el código que uso para los reportes que no se exportan bien al excel [code=fw:12azxshv]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">SELECT</span> movi02<br />DBSETRELATION<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"maes04"</span>,<span style="color: #000000;">&#123;</span>|| movi02->legajo <span style="color: #000000;">&#125;</span>  , <span style="color: #ff0000;">"movi02->legajo"</span>   <span style="color: #000000;">&#41;</span><br />DBSETRELATION<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"codi04"</span>,<span style="color: #000000;">&#123;</span>|| movi02->codigo <span style="color: #000000;">&#125;</span>  , <span style="color: #ff0000;">"movi02->codigo"</span>   <span style="color: #000000;">&#41;</span><br />movi02-><span style="color: #000000;">&#40;</span>DBSEEK<span style="color: #000000;">&#40;</span>DTOS<span style="color: #000000;">&#40;</span>mfecha<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />REPORT oRep <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Inasistencias de dia "</span> + ;<br />                  DTOC<span style="color: #000000;">&#40;</span>mfecha<span style="color: #000000;">&#41;</span> ;<br />       <span style="color: #0000ff;">FONT</span>  oFont1,oFont2,oFont3 ;<br />       HEADER OemToAnsi<span style="color: #000000;">&#40;</span>memvar->xnomb_emp<span style="color: #000000;">&#41;</span> , ;<br />       <span style="color: #ff0000;">"Inasistencias diarias"</span> <span style="color: #0000ff;">CENTER</span> ;<br />       FOOTER <span style="color: #ff0000;">"Hoja:"</span> + STR<span style="color: #000000;">&#40;</span>oRep:<span style="color: #000000;">npage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span> ,<span style="color: #ff0000;">"Fecha:"</span>+DTOC<span style="color: #000000;">&#40;</span>DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">CENTER</span>;<br />       PREVIEW CAPTION  <span style="color: #ff0000;">"Inasistencias diarias"</span><br /><br />COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Legajo"</span>    <span style="color: #00C800;">DATA</span> movi02->legajo  <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999999"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">06</span> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">2</span><br />COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Empleado"</span>  <span style="color: #00C800;">DATA</span> maes04->nombre  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">1</span><br />COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Codigo"</span>    <span style="color: #00C800;">DATA</span> movi02->codigo  <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"999"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">05</span> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">1</span><br />COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Tipo"</span>      <span style="color: #00C800;">DATA</span> codi04->nombre  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span> <span style="color: #0000ff;">FONT</span> <span style="color: #000000;">2</span><br /><span style="color: #B900B9;">// Digo que el titulo lo escriba con al letra 2</span><br />oRep:<span style="color: #000000;">oTitle</span>:<span style="color: #000000;">aFont</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span><br />END REPORT<br /><span style="color: #B900B9;">// Activo el reporte</span><br /><span style="color: #0000ff;">ACTIVATE</span> REPORT oRep <span style="color: #00C800;">WHILE</span> movi02->fecinasi = mfecha ;<br />         <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />         <span style="color: #0000ff;">ON</span> STARTPAGE oRep:<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;">"LOGO.BMP"</span>,<span style="color: #000000;">1.5</span>,.<span style="color: #000000;">5</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// Cierro los archivos</span><br />CLOSE maes04<br />CLOSE codi04<br />CLOSE movi02<br /> </div>[/code:12azxshv]
Consulta sobre la clase RepExcel
Hola, debes definir oPep:bPreInit := {|| movi02 -> ( DBGOTOP() ) } antes del ACTIVE REPORT saludos Marcelo
Consulta sobre la clase RepExcel
Hola Marcelo: Fantastico, funcionó perfecto. Muchisimas gracias.
Consulta sobre la clase TExcel
Estoy teniendo problemas para generar una función paramétrica que genere planillas con la clase TExcels, [i:en3o8z9j][b:en3o8z9j]la razón naturalmente no es un bug de la clase sino falta de ingenio.[/b:en3o8z9j][/i:en3o8z9j] Utilizo un array que contiene un block de código con los datos que deben colocarse en cada celda, cuando cargo la celda, si es una fórmula de excel no me funciona el block de código, creo porque no es una expresión válida para el block. Alguien me puede sugerir como resolverlo? Aqui va el código: .......... aTitulo[1]:="KGS.PIE" aTitulo[2]:="PROM." aDato[1]:={||LINCVH->PESO} aDato[2]:={||+( _CELL(nRow,19)/_CELL( nRow, 18) )} aAlign[1]:=3 aAlign[2]:=3 aAncho[1]:=13 aAncho[2]:=10 aPicture[1]:="#,##0" aPicture[2]:="#,##0" aFormula[1]:=.F. aFormula[2]:=.T. aTotal[1]:=.T. aTotal[2]:=.T. FOR i= 1 to len(aDato) DEFINE XLS FORMAT aFormat[i] PICTURE aPicture[i] NEXT //Creo objeto XLS XLS oXLS FILE &cNomFile AUTOEXEC //establezco ancho de columnas FOR i=1 TO len(aDato) XLS COL i WIDTH aAncho[i] OF oXLS NEXT //Escribo titulos en la primera Fila nRow=1 FOR i = 1 to LEN(aDato) @ nRow, i XLS SAY aTitulo[i] FONT aFnt[2] SHADED; BORDER 64 ALIGNAMENT 2 OF oXLS NEXT GO TOP DO WHILE !Eof() nRow++ FOR i to len(aDato) IF !aFormula[i] @ nRow, i XLS SAY EVAL(aDato[i]) FONT aFnt[3] FORMAT ; aFormat[i] ALIGNAMENT aAlign[i] OF oXls ELSE // aca da error <!-- s:arrow: --><img src="{SMILIES_PATH}/icon_arrow.gif" alt=":arrow:" title="Arrow" /><!-- s:arrow: -->@ nRow, 20 XLS FORMULA aDato[i] FONT aFnt[3] FORMAT ; aFormat[20] ALIGNAMENT aAlign[20] OF oXls ENDIF NEXT SKIP ENDDO nRow++ FOR I=1 TO len(aDato) //Pongo los totales @ nRow, i XLS FORMULA _SUM(2,i,nRow,i) FONT aFnt[2] FORMAT ; aFormat[i] ALIGNAMENT 3 BORDER 32 OF oXLS NEXT ENDXLS oXLS //Fin de la XLS .......
Consulta sobre la clase folderEx
Hay alguna manera de que un objeto TFolderEx no pinte las pestañas? La idea es hacer que la seleccion sea mediante un xbrowse a la izquierda, por ello no quiero ver las pestañas. He intentado con oFolder:nFolderHeight := 0 pero algo hace que se trabe y funcione con mucha lentitud y mal. Lo que deseo hacer es un dialogo con una serie de items a la izquierda en un xbrowse, que al ir cambiando de fila, a la derecha seleccione un TScrollPanel diferente que tendrá varios controles. Agradezco cualquier ayuda.
Consulta sobre la clase folderEx
Estimado Alejandro, Creas el diálogo desde código fuente ó usando recursos ?
Consulta sobre la clase folderEx
Antonio Creo el diálogo desde código. Muchas gracias
Consulta sobre la clase folderEx
Use Pages, instead of Folder or FolderEx.
Consulta sobre la clase folderEx
Estimado Alejandro, Aqui tienes un ejemplo funcionando: (Incluido en el próximo build de FWH) [code=fw:akabltrt]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oXBrw, oPages<br /> <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"XBrowse and Pages"</span><br /> <br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oXBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">160</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg;<br />      DATASOURCE <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"First"</span>, <span style="color: #ff0000;">"Second"</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">AUTOCOLS</span> ;<br />      HEADERS <span style="color: #ff0000;">"Page"</span> NOBORDER<br /> <br />   WITH OBJECT oXBrw<br />      :<span style="color: #000000;">nStretchCol</span>   := <span style="color: #000000;">1</span><br />      :<span style="color: #000000;">lHScroll</span>      := .f.<br />      :<span style="color: #000000;">bChange</span> = <span style="color: #000000;">&#123;</span> || oPages:<span style="color: #000000;">SetOption</span><span style="color: #000000;">&#40;</span> oXBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /> <br />   oPages = TPages<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;">10</span>, <span style="color: #000000;">200</span>, <span style="color: #000000;">380</span>, <span style="color: #000000;">580</span>, oDlg <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 />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BuildPages<span style="color: #000000;">&#40;</span> oPages <span style="color: #000000;">&#41;</span><br /> <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> BuildPages<span style="color: #000000;">&#40;</span> oPages <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oScrPanel1 := TScrollPanel<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;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span>, oPages <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oScrPanel2 := TScrollPanel<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;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">300</span>, oPages <span style="color: #000000;">&#41;</span><br /><br />   @  <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Hello"</span> <span style="color: #0000ff;">OF</span> oScrPanel1<br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Bye"</span>   <span style="color: #0000ff;">OF</span> oScrPanel1<br />   oScrPanel1:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oPages:<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span> oScrPanel1 <span style="color: #000000;">&#41;</span><br /><br />   @  <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Another page"</span> <span style="color: #0000ff;">OF</span> oScrPanel2<br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"End"</span>   <span style="color: #0000ff;">OF</span> oScrPanel2<br />   oScrPanel2:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oPages:<span style="color: #000000;">AddPage</span><span style="color: #000000;">&#40;</span> oScrPanel2 <span style="color: #000000;">&#41;</span><br /><br />   oPages:<span style="color: #000000;">SetOption</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> .T.    </div>[/code:akabltrt] [img:akabltrt]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/xbrwpages&#46;png?raw=true[/img:akabltrt]
Consulta sobre la clase folderEx
[quote="Antonio Linares":3uthvvla]Estimado Alejandro, Aqui tienes un ejemplo funcionando: (Incluido en el próximo build de FWH) [/quote:3uthvvla] Excelente Antonio, muchas gracias! Justo lo que necesitaba!
Consulta sobre la funcion FW_CopyToClipBoard()
Buena tarde Respetados miembros del foro Como se utiliza la funcion FW_CopyToClipBoard( { "video.prg" } ), para pegar un archivo al Whatsapp por ejemplo. En la version 21.11 logre hacerlo. Con esta version no puedo hacer el CTRL- V Saludos desde Panama Erick Almanza
Consulta sobre la funcion FW_CopyToClipBoard()
Can you please explain how did you do it with FWH2111 please? For now the only way I know is [code=fw:3m7a05mq]<div class="fw" id="{CB}" style="font-family: monospace;">FW_CopyToClipboard<span style="color: #000000;">&#40;</span> MEMOREAD<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"tutor01.prg"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:3m7a05mq] and then press Ctrl-V in WhatsApp.
Consulta sobre la funcion FW_CopyToClipBoard()
Buen dia Gracias por la respuesta maestro DEFINE WINDOW oWnd EmptyClipboard() OpenClipboard( oWnd:hWnd ) SetClipboardData( 3, { "cotizacion.pdf" } ) hDrop = GetClpData( 3 ) CloseClipboard() oWnd:End() Solo que es aleatorio a veces funcionaba Saludos, Desde Panama
Consulta sobre la funcion FW_CopyToClipBoard()
[quote:1pn9apkn]SetClipboardData( 3, { "cotizacion.pdf" } ) hDrop = GetClpData( 3 ) [/quote:1pn9apkn] CF_HDROP is 15. Not 3.
Consulta sobre la función PopupBrowse
Estimados Una consulta sencilla, con el uso de la función PopUpBrowse tanto en los Gets como en los xBrowse (:nEditType:=EDIT_BUTTON). Ya lo tengo funcionando bien con excepción de un detalle, el tamaño del control en ancho y altura es siempre el mismo, no se autoajusta de acuerdo a las columnas de la matriz que se visualiza y además cuando se hace el llamado y el control está muy cerca a los bordes por derecha o inferior de la pantalla, siempre aparece el xbrowse al lado derecho y debajo del control que lo contiene, por tanto queda fuera de la pantalla. ¿Hay forma de corregir esto? Saludos Fernando Espinoza A.
Consulta sobre la función PopupBrowse
Hope your FWH version is not too old. The following code automatically anchors the dialog to the current cell. This automatically takes care of keeping the dialog inside the screen. [code=fw:2zxvu1a8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">ACTIVATE</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oCol:<span style="color: #000000;">AnchorToCell</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2zxvu1a8]
Consulta sobre la función PopupBrowse
Estimado Mr. Rao Estoy con la versión 1709 de FiveWin xHabour. Intente su código de esta forma al activar el dialogo que contiene un xBrowse: ACTIVATE DIALOG oDlgED CENTER RESIZE16 ON INIT ( oDlgED:SetIcon(oApp:cIcono), ; oBrw:aCols[25]:oBtnElip:cToolTip:="Alineación de ambos equipos", ; oBrw:aCols[26]:oBtnElip:cToolTip:="Datos sobre penales errados", ; [b:12purb44]oBrw:aCols[37]:AnchorToCell( oDlgED[/b:12purb44] )) Y me sale este mensaje de error: Error description: Error BASE/1004 Message not found: TXBRWCOLUMN:ANCHORTOCELL Stack Calls =========== Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 ) Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:ANCHORTOCELL( 14819 ) Called from: c:\sicef_desarrollo\bin\Sicefwin.prg => (b)XEDITAR( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 714 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 906 ) Called from: => DIALOGBOX( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 ) Saludos Fernando Espinoza A.
Consulta sobre la función PopupBrowse
The method AnchorToCell() was introduced in the version 1805 (three years back). Your version seems to be much older.
Consulta sobre menues
Alguien sabe como activar y desactivar opciones de un menu. Lo que deseo hacer es que segun el nivel del usuario se activen o desactiven opciones del menu. De antemano muchas gracias y feliz navidad.
Consulta sobre menues
Gerardo, Por una parte puedes usar la claúsula WHEN con un MENUITEM: MENUITEM ... WHEN <condición lógica> Y de otra, puedes deshabilitarlo/habilitarlo tú directamente: MENUITEM oItem PROMPT ... ACTION ... oItem:Disable() ... oItem:Enable()
Consulta sobre picture en xBrowse
Creo que se trata de algo sencillo, pero lo voy a consultar. Quiero que dentro de un xbrowse se me presenten los números positivos con el más por delante. Es decir si es 4, debe mostrarse +4.Como sería el picture?; y aprovechando esta consulta alguien podría describir en su totalidad esta clausula con todas sus opciones. Saludos Fernando Espinoza
Consulta sobre picture en xBrowse
Hola, mira si te sirve esto: þ Cadena de funci¢n: Las cadenas de funci¢n de la cl usula PICTURE especifican reglas de formato que se aplican a todo el valor visualizado por SAY, y no a posiciones particulares de dicho valor. La cadena de funci¢n comienza con el car cter @ seguido de uno o m s caracteres adicionales, cada uno de los cuales tiene un significado particular (vea la tabla siguiente). La cadena de funci¢n no puede contener espacios. La cadena de funci¢n puede especificarse sola o acompa¤ada de una cadena de plantilla. Si se indican ambas, la cadena de funci¢n debe preceder a la cadena de plantilla y estar separada de ella por un espacio. Funciones de Formato para SAY y TRANSFORM() ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Funci¢n Acci¢n ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ B Muestra n£meros justificados a la izquierda C Muestra CR despu‚s de los n£meros positivos D Muestra fechas en el formato SET DATE E Muestra fechas y n£meros en formato europeo R Inserta caracteres que aparecen en la plantilla durante la visualizaci¢n X Muestra DB despu‚s de los n£meros negativos Z Muestra los ceros como espacios en blanco ( Sit£a los n£meros negativos entre par‚ntesis ! Convierte en may£sculas los caracteres alfab‚ticos ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ þ Cadena de plantilla: La cadena de plantilla de PICTURE especifica reglas de formato que se aplican car cter a car cter. La cadena de plantilla est  formada por una serie de caracteres, algunos de los cuales tienen significados especiales (ver tabla siguiente). Cada posici¢n de la cadena de plantilla corresponde a una posici¢n del valor SAY visualizado. Los caracteres de la cadena de plantilla que no tienen significados asignados, se copian textualmente en el valor visualizado. Si utiliza la funci¢n @R, entre los caracteres visualizados se insertan caracteres de la plantilla sin significado especial. En caso contrario, se sobrescriben los caracteres correspondientes del valor visualizado. Puede especificar una cadena de plantilla sola o acompa¤ada de una cadena de funci¢n. Si se utilizan ambas, la cadena de funci¢n debe preceder a la cadena de plantilla y ambas deben estar separadas por un espacio en blanco. S¡mbolos de Plantilla para SAY y TRANSFORM() ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Plantilla Acci¢n ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ A,N,X,9,# Muestra d¡gitos de cualquier tipo de datos L Muestra los valores l¢gicos como "T" o "F" Y Muestra los valores l¢gicos como "Y" o "N" ! Convierte en may£sculas los caracteres alfab‚ticos $ Muestra un signo de d¢lar en lugar de un espacio inicial * Muestra un asterisco en lugar de un espacio en blanco inicial . Especifica una posici¢n de punto decimal , Especifica una posici¢n de coma decimal ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Saludos
Consulta sobre puerto LPT
Hola a todos: Lo que hacíamos antiguamente con el isprinter() se puede hacer con xharbour+fw hacia un lpt en windows? Hay alguna manera que yo pueda consultar por los estados del puerto lpt antes de imprimir. Específicamente al utilizar tdosprn. saludos David Lagos S. Coquimbo-Chile
Consulta sobre puerto LPT
Hola yo uso lo siguiente clase tprinter : if Empty(oprn:hdc()) msgstop("impresora no preparada") return nil endif espero que sea de tu ayuda. pablo
Consulta sobre sentencia c/MariaDB Connection
Buenos dias Tengo esta situacion [code=fw:24l6iin0]<div class="fw" id="{CB}" style="font-family: monospace;">oSQL:= ::<span style="color: #000000;">oConn</span>:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT banco FROM Bancos WHERE banco='Cajas'"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">if</span> oSQL:<span style="color: #000000;">RecCoutn</span> == <span style="color: #000000;">0</span><br />   ...<br /><span style="color: #00C800;">endif</span><br />oSQL:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:24l6iin0] Luego, tambien puedo hacer [code=fw:24l6iin0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">oConn</span>:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT banco FROM Bancos WHERE banco='Cajas'"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">RecCoutn</span> == <span style="color: #000000;">0</span><br />   ...<br /><span style="color: #00C800;">endif</span><br /> </div>[/code:24l6iin0] Dado que no tengo como hacer :End(); no es sugerible hacerlo de esta última forma? gracias
Consulta sobre sentencia c/MariaDB Connection
In this case, I think you should to do this by this way: [code=fw:3jgbpj8f]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ::<span style="color: #000000;">oConn</span>:<span style="color: #000000;">QueryResult</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT banco FROM Bancos WHERE banco='Cajas' LIMIT 1"</span> <span style="color: #000000;">&#41;</span> = <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;...<br /><span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:3jgbpj8f] Sorry for answer in english.
Consulta sobre sentencia c/MariaDB Connection
Many Thanks Vilian! Good proposition My explanation was very confusing... thanks for understanding me
Consulta sobre sentencia c/MariaDB Connection
Para solo saber si hay tuplas que cumplan una condicion es mejor usar sentencias del tipo "SELECT count( * ) FROM Bancos WHERE banco='Cajas'" Son muy rapidas y penalizan muy poco la respuesta del servidor Pero si ademas quieres tratar el resultado yo me quedaria con la primera que propones PD: Mario como esta la familia y tu?
Consulta sobre sentencia c/MariaDB Connection
Hola Manu! Gracias por tu aporte O.T. Me encuentro muy bien!... uno de mis hijos SUPER... pues se fue a vivir a Alemania (Berlin); aunque por estos dias guardados como todos! Te deseo lo mejor!!
Consulta sobre software ERP
Hola: Alguien que haya o esté desarrollando un ERP me pueda orientar sobre la materia. Como afrontar un proyecto de esta naturaleza y como desarrollar e implementar los procedimientos ERP para luego plasmarlos en un software. Ayudas, sugerencias o comentarios favor hacerlos llegar a: <!-- e --><a href="mailto:dlagoss@manejatuvida.cl">dlagoss@manejatuvida.cl</a><!-- e --> Gracias
Consulta sobre tDolphin
Hola a todos, estaba usando la revisión 269 de la clase tDophin que la descargaba antiguamente por SVN. Hace un tiempo (por setiembre de 2014), cuando Daniel anunció una actualización de la clase, la descargué y no la había probado aún. Ahora estoy intentando actualizarla, pero en determinados lugares, donde la 269 funcionaba correctamente, ahora me tira un error "Error description: Error BASE/1118 Error de argumento: DTOC", y he validado, y efectivamente se trata de una fecha, que la convierto en caracter, la sintaxis es correcta, que debería cambiar o agregar para que me funcione correctamente? Muchas gracias Roberto
Consulta sobre tDolphin
Saludos, inicializa la VAR de tipo fecha asi [b:1cm8j3ig]tu_var := date()[/b:1cm8j3ig], a mi me resolvio el problema, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Consulta sobre tDolphin
Hola, es que aparentemente el error no sólo da con el ctod, sino con todas los datos que están como null, habrá algún otra solución o tendré que volver a la revisión 269? Daniel... perdón que te moleste.... estás por ahí? Roberto
Consulta sobre tDolphin
Hola por favor publica con mas detalle el error, clase donde se genera, linea, etc, si es posible parte del codigo fuente
Consulta sobre tDolphin
Daniel, lo que hago es simple: AADD(VECTOR,{oQuery:CONDUC_1,oQuery:NOTAMODU,oQuery:COLOQUIO,oQuery:COMPLEMENT,DTOC(oQuery:FECHAEXA)}) y he detectado, que cuando "oQuery:FECHAEXA" es null, el valtype devuelve "C", entonces cuando hago el DTOC(oQuery:FECHAEXA), aparece el siguiente error: "Error description: Error BASE/1118 Error de argumento: DTOC". Puede ser un error de concepto? En la tabla tengo definido el campo FECHAEXA como Date y Allow null tildado, o sea, q me permite el dato nulo. Repito, con la revisión 269 funciona, no sé que puedo estar haciendo mal... Mil gracias... Roberto
Consulta sobre tDolphin
SET LOGICALVALUE ON SET DEFAULTCLPVALUE ON por favor intenta
Consulta sobre tDolphin
en las ultimas versione de fwh en la carpeta include viene incluido un tdolphin.ch que no tiene una de estas definiciones, por favor apunta el tdolphin.ch de la ultima version de tdolphin.
Consulta sobre tDolphin
Carlos, siempre hago: #INCLUDE "D:\TDOLPHIN\INCLUDE\TDOLPHIN.CH" tomando el fichero de cabecera de la carpeta actualizada de Dolphin... Hice el cambio que tú me dices y tampoco logro hacerlo funcionar... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
Consulta sobre tDolphin
Hola, que conviene usar, la dolphin.lib que viene en la versión 15.01 o la que bajamos y generamos desde el link que nos pasa Daniel? Ahí probé con la que viene con FWH 15.01 y funciona correctamente... Gracias! Roberto
Consulta sobre tamaño de imagen
Hola Gente! Existe alguna función, FW o Harbour, que me devuelva el tamaño en ancho y alto de una imagen? muchas gracias
Consulta sobre tamaño de imagen
[code=fw:36ryacx3]<div class="fw" id="{CB}" style="font-family: monospace;">aImg    := FW_ReadImage<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, cImage <span style="color: #000000;">&#41;</span><br />nWidth  := aImg<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />nHeight := aImg<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span><br />PalBmpFree<span style="color: #000000;">&#40;</span> aImg <span style="color: #000000;">&#41;</span><br /> </div>[/code:36ryacx3] If you have already read the image into a bitmap handle (hBitmap) [code=fw:36ryacx3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />? nBmpWidth<span style="color: #000000;">&#40;</span> &nbsp;hBitmap <span style="color: #000000;">&#41;</span><br />? nBmpHeight<span style="color: #000000;">&#40;</span> hBitmap <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:36ryacx3]
Consulta sobre tamaño de imagen
Many Thanks Mr. Rao!!
Consulta sobre tamaño de pantallas
al ejecutar el exe en una pantalla mas pequeña los dialogos no se ajustan como si lo hace la ventana principal. se pueden ajustar automaticamente? como? Gracias
Consulta sobre tamaño de pantallas
Estimado José, La técnica habitual es diseñar los diálogos en distintas resoluciones y usar unos u otros en función de la resolución detectada