topic
stringlengths
1
63
text
stringlengths
1
577k
¿Qué me recomendais?
Compañeros, Un cliente mio tiene el aplicativo en red local funcionando desde hace 10 años sin problemas. Ahora abrirá una 2ª delegación en otra población y quiere que le instale el mismo aplicativo en esta nueva delegación. El aplicativo maneja mucha información y DBF's con más de 300.000 registros. Todos los movimientos diarios que tenga en la 2ª delegación deben volcarse diariamente en la 1ª (sobre todo la BD de artículos, Facturas y Notas) para estar todo centralizado y sincronizado en la 1ª delegación. La pregunta es: Suponiendo que añada en el aplicativo una opción de Importar/Exportar ¿ Como envio las DBF de un PC a otro ? ¿Cómo deben estar configurados ambos? ¿Deben pasar antes por un servidor? ... en fin... estoy perdido en este tema..... ¿me podeis ayudar? Mil gracias. Un saludo a todos. Desde Cádiz, España.
¿Qué me recomendais?
Bueno, puedes mirar si con ADS te soluciona el problema. Ojo, puede que pique un poco el precio. Puedes crear un VPN, y montar una unidad remota. Ojo, al tema de la corrupción en caso de caida de red En ambos casos al menos una buena ADSL. También, cosas tonta y que la gente desconoce , es poder hace que la 2 delegación trabajen por terminal en un servidor que esta en la 1 delegación, que es donde actualmente lo tienes. Esto te cuesta licencias de termina. Si todos trabajan sobre la misma dbf , no vas a tener que replicar nada <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> Para que vayas teniendo opciones.
¿Qué me recomendais?
Loren, como menciona Rafa en el segundo ejemplo tienes el tema de las licencias de terminal, nosotros usamos un producto que se llama XpUnlimited es mas comodo que el terminal server de Windows y funciona muy bien, claro todo 100% via internet, tambien mencionan ADS, hablan bien de El, nunca lo he usado, Yo trabajo con MySQL en varios casos con clientes que tienen oficinas remotas conectadas con XpU y todo funciona bien, ahi tienes otra idea.
¿Qué me recomendais?
como tu app estan con dbf, entonces la opc. 2 es la indicada, WINDOWS TERMINAR SERVER, si instalas ADS en el servidor tu aplicacion es muy rapido, necesitas windows server 2003 saludos...
¿Qué me recomendais?
Hagas lo que hagas el tema es complejo. Yo tengo funcionando una aplicación antigua (mas de diez años) con mas de 15 delegaciones. En las dbf llevan un campo de ESTADO que puede tener los valores A=alta M=modificado ó B=Baja. Diariamente las sucursales realizan al final del dia un EXPORTA numerado que incluye las dbf con solo los registros que tengan en el campo ESTADO A,M,B. La mañana siguiente la central realiza un IMPORTA (comprueba la numeración de cada paquete para ver que no falta ninguno intermedio) y posteriormente realiza un EXPORTA a todas las sucursales. Obviamente, los datos se actualizan en los servidores. El envio de los ficheros zip y la bajada, se realiza por FTP. Pero claro, este sistema se diseñó asi hace mas de diez años. Hoy me lo plantearía de otra forma, teniendo las tablas compartidas (articulos, pedidos, etc) con MYSQL y ADO, en un hosting en internet (coste 3 euros al mes) o una IP fija en el servidor de la empresa y las que no sean necesarias, continuar con dbf en local. Por supuesto ADS propuesta anteriormente por otros foristas es la mas fácil para tí, pero dependes de una licencia de pago "esclava".
¿Qué me recomendais?
Compañeros Se trata de un Supermercado donde la búsqueda de artículos en la linea de caja a través de código de barras debe ser rapidísimo, pues el cliente no puede esperar o se formarían colas en los terminales punto de venta. Pienso que acceder constantemente a la BD de articulos que está remota me parece una locura pues podría fallar la conexión a internet y el supermercado se colapsaría. Por ello soy partidario de que tendría que tener un servidor local con todas las BD y este a una hora programada volcara a través de FTP toda la información nueva en el servidor de la Delegación 1ª. Utilizaré índices CDX + ADS Local, marcaré los registros nuevos y a través de FTP con una autoalización automática (vease blog de nuestro compañero Biel: [url:sk5poi0k]http&#58;//bielsys&#46;blogspot&#46;com/2009_02_01_archive&#46;html[/url:sk5poi0k] exportaré/importaré esos registros... Creo que es la solución mejor. Gracias a todos. Un saludo. LORENZO:
¿Qué me recomendais?
L, Tal como planteas el problema yo lo veo sencillo, si necesidad de cambiar toda la aplciacion. Como son datos estaticos q pueden variar solo de un dia para otro (como por ejmplo precios, nuevos articulos,...) , generar un proceso diario de importacion y q actualize todo lo necesario. Como hacerlo ?. Cada dia se envia a las diferentes sedes el fichero, no hace falta via ftp, puede ser via email y despues un simple proceso de importacion de datos. Los banco funcionan asi, se les envia un ficherete para q tramitan recibos y ellos diariamente los procesan, y listos... Que puedes hacer la aplicacion C/S, MySql, Ads, WS, ... Siiiii , pero analiza el problema en si y la problematica de hacerlo tan bonito... Mi simple opinion <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
¿Qué me recomendais?
Hola, Estando de acuerdo en que, segun el modelo del negocio, es suficiente con transmitir en diferido la informacion, habrá que matizar que: 1º Hace falta un sistema que marque los registros como que son "traspasables"; es decir un campo que lleve si es Alta/Baja o Modificacion. Tambien es conveniente que lleve una numeracion de "traspaso" para saber en que traspaso se traspaso para asi permitir retraspasar un traspaso anterior. 2º La numeracion de tickets, clientes y otros han de ser distintas en un local y en otro. Saludos
¿Qué me recomendais?
Tambien lo que puedes hace es crear un Servidor con MySql y crear la tabla a traspasar luego le haces un boton de traspaso de informacion y otro boton recuperar informacion y con esto tienen suficiente asi lo hago yo Saludos
¿Qué me recomendais?
Yo lo hago asi: - Paso toda la B.D. completa (comprimida por FTP) de la sucursal a la central - En la central tengo 2 bases de datos distintas una para la central y otra para la sucursal - Tengo una tercera B.D. que consolida/junta las 2 B.D. pero solo para sacar reportes. (sea como sea, no se debería modificar los datos de la sucursal en la central) - Al ingresar al programa se le puede indicar a que B.D. acceder, y se puede indicar cual es de solo lectura. Atentamente, Rolando
¿Qué opciones tengo para accesar a bases de Access?
[quote="fleal":1aebum5c]Me pasaron una base de access con una sola tabla, viene tambien un informe. Me he pasado unas horas y he podido accesar a la tabla y ejecutar el informe. Pero lo hize con Visual Basic, un pequeño programa para accesar a la tabla de access y ejecutar el informe. ¿Hay alguna forma de hacerlo con fivewin?. Tengo un programa casi terminado para operar toda la administración y si no encuentro la forma de usar ese informe.... tendré que programarlo completo en VB. ¿Qué opciones tengo para ejecutar el informe? Gracias Fernando[/quote:1aebum5c] Fer, Para acceso a access con ADO es excelente. Para lo del informe ni idea Saludos
¿Qué opciones tengo para accesar a bases de Access?
De momento me sirve si la conexión a la base se hace con ADO para recorrer los registros.... ¿Pero como se hace? En cuanto al informe, vere si me lo puedo rehacer a código. Gracias
¿Qué opciones tengo para accesar a bases de Access?
[quote="fleal":3nx03m8h]De momento me sirve si la conexión a la base se hace con ADO para recorrer los registros.... ¿Pero como se hace? En cuanto al informe, vere si me lo puedo rehacer a código. Gracias[/quote:3nx03m8h] [url:3nx03m8h]http&#58;//incos&#46;sytes&#46;net/files/taller&#46;zip[/url:3nx03m8h] Se llama taller, no es mio, pero creo no hay problema si lo comparto, lo bajé de algun lado y no recuerdo de donde, lo que si dice en los créditos: Miguel Angel Cortes. Espero les funcione. PD. Mi msn es: <!-- e --><a href="mailto:wmormar@hotmail.com">wmormar@hotmail.com</a><!-- e --> Saludos
¿Qué opciones tengo para accesar a bases de Access?
Eso esta chupao <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> [code:2tld5qku]LOCAL oConexionAdo &#58;= TOLEAUTO&#40;&#41;&#58;New&#40;"adodb&#46;connection"&#41; PRIVATE oRecordset &#58;= TOLEAUTO&#40;&#41;&#58;New&#40;"adodb&#46;recordset"&#41; oConexionAdo&#58;Open&#40;"Provider= MicroSoft&#46;Jet&#46;OLEDB&#46;4&#46;0;Data Source=&#46;\taller&#46;mdb;"&#41; oRecordSet&#58;LockType &#58;= adLockOptimistic oRecordSet&#58;CursorType &#58;= adOpenKeyset oRecordSet&#58;ActiveConnection&#40;oConexionAdo&#41; oRecordSet&#58;Source &#58;= "Select * from clientes" // tu query aqui oRecordSet&#58;Open&#40;&#41; oRecordSet&#58;MoveFirst&#40;&#41; aDatos &#58;= &#123;&#125; DO WHILE ! oRecordSet&#58;eof&#40;&#41; aReng &#58;= &#123;&#125; FOR x &#58;= 1 TO oRecordSet&#58;Fields&#58;Count&#40;&#41; AADD&#40;aReng,oRecordSet&#58;Field&#40;x-1&#41;&#58;Value NEXT AADD&#40;aDatos,aReng&#41; oRecordSet&#58;MoveNext ENDDO oRecordSet&#58;Close&#40;&#41; oConexionAdo&#58;Close&#40;&#41; [/code:2tld5qku]
¿Qué opciones tengo para accesar a bases de Access?
[url:1x6m3mt3]http&#58;//incos&#46;sytes&#46;net/fwh/taller&#46;zip[/url:1x6m3mt3] Sorry, link equivocado, este es el correcto. Se llama taller, no es mio, pero creo no hay problema si lo comparto, lo bajé de algun lado y no recuerdo de donde, lo que si dice en los créditos: Miguel Angel Cortes. Espero les funcione. PD. Mi msn es: <!-- e --><a href="mailto:wmormar@hotmail.com">wmormar@hotmail.com</a><!-- e --> Saludos
¿Qué opciones tengo para accesar a bases de Access?
Tentei usar o ADO diz que nao tem o Provider intalado, Provider=Microsoft.Jet.OlEDB.4.0 ?? Ari
¿Qué problema hay con este código?
Error description: Error TOleAuto/65535 : TOLEAUTO:NEW Args: [ 1] = C Excel.Application Stack Calls =========== Called from: => THROW( 0 ) Called from: source\rtl\win32ole.prg => TOLEAUTO:NEW( 0 ) Called from: teste.prg => MAIN( 13 ) [code=fw:3dj5sbcu]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// INCIDENCIA....</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> NL Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> + Chr<span style="color: #000000;">&#40;</span> <span style="color: #000000;">13</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Function</span> MAin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oExcel, oHoja, nRows, nCols<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aCampos:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, nRow, nCol<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cTexto := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, xValue<br /><br />&nbsp; &nbsp;oExcel := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Excel.Application"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oExcel:<span style="color: #000000;">Visible</span> := .T. <span style="color: #B900B9;">// por si quieres ver la hoja abierta</span><br />&nbsp; &nbsp;oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> cGetFile32<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"*.XLS"</span>, <span style="color: #ff0000;">"Seleccione Fichero"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oHoja := oExcel:<span style="color: #0000ff;">Get</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ActiveSheet"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nRows := oHoja:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Rows</span>:<span style="color: #0000ff;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCols := oHoja:<span style="color: #000000;">UsedRange</span>:<span style="color: #000000;">Columns</span>:<span style="color: #0000ff;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/*USE <tu dbf><br />&nbsp; &nbsp;FOR nRow := 2 TO nRows<br />&nbsp; &nbsp; &nbsp; APPEND BLANKFOR<br />&nbsp; &nbsp; &nbsp; nCol := 1 TO nCols<br />&nbsp; &nbsp; &nbsp; xValue := oHoja:Cells(nRow,nCol):Value<br />&nbsp; &nbsp; &nbsp; FieldPut(nCol,xValue)<br />&nbsp; &nbsp; &nbsp; SysRefresh()<br />&nbsp; &nbsp;NEXT<br /><br />&nbsp; &nbsp;DBCOMMIT()<br />&nbsp; &nbsp;Memory(-1)<br />&nbsp; &nbsp;NEXT<br />&nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> nRow := <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> nRows<br /><br />&nbsp; &nbsp; &nbsp; cTexto := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">FOR</span> nCol := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCols<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xValue := oHoja:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nRow,nCol<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// MsgInfo( ValType( xValue ) )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cTexto += xValue + NL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// SysRefresh()</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cTexto <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;Memory<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oHoja:End()</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oHoja:Quit()</span><br />&nbsp; &nbsp;oExcel:<span style="color: #000000;">Quit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oExcel:End()</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:3dj5sbcu] 
¿Qué problema hay con este código?
João, Parece que Excel no está instalado ó disponible
¿Qué problema hay con este código?
Por lo general el llamado a excel se pone entre TRY / CATCH / END tambien debes tener claro que para usar excel como objeto COM, Excel debe estar instalado en la app. [code=fw:9a33zpr5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> PROCEDURE Excel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oExcel, oAS, oError<br /><br />   <span style="color: #00C800;">TRY</span><br />      oExcel := GetActiveObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Excel.Application"</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// aca intenta levantar una instancia de excel si ya esta en ejecucion</span><br />   CATCH<br />      <span style="color: #00C800;">TRY</span><br />         oExcel := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Excel.Application"</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// si falla, levanta una nueva instancia</span><br />      CATCH oError<br />         Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ERROR! Excel not avialable. ["</span> + Ole2TxtError<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">"]"</span> + oError:<span style="color: #000000;">description</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">RETURN</span><br />      END<br />   END<br /><br />   oExcel:<span style="color: #000000;">WorkBooks</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oAS := oExcel:<span style="color: #000000;">ActiveSheet</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oAS:<span style="color: #000000;">Cells</span>:<span style="color: #0000ff;">Font</span>:<span style="color: #0000ff;">Name</span> := <span style="color: #ff0000;">"Arial"</span><br />   oAS:<span style="color: #000000;">Cells</span>:<span style="color: #0000ff;">Font</span>:<span style="color: #0000ff;">Size</span> := <span style="color: #000000;">12</span><br /><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"Text:"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"Here is some text"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"Numeric:"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">NumberFormat</span> := <span style="color: #ff0000;">"#.##0,00"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #000000;">1234.50</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"Logical:"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := .T.<br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"Date:"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oAS:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Font</span>:<span style="color: #000000;">Bold</span> := .T.<br />   oAS:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">HorizontalAlignment</span> := <span style="color: #000000;">-4152</span>  <span style="color: #B900B9;">// xlRight</span><br /><br />   oAS:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oAS:<span style="color: #000000;">Columns</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := <span style="color: #ff0000;">"OLE from xHarbour"</span><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Font</span>:<span style="color: #0000ff;">Size</span> := <span style="color: #000000;">16</span><br />   oAS:<span style="color: #000000;">Range</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A1:B1"</span> <span style="color: #000000;">&#41;</span>:<span style="color: #000000;">HorizontalAlignment</span> := <span style="color: #000000;">7</span><br /><br />   oAS:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oExcel:<span style="color: #000000;">Visible</span> := .T.<br /><br /><span style="color: #00C800;">RETURN</span><br /> </div>[/code:9a33zpr5]
¿Qué problema hay con este código?
Gracias mi querido amigo Carlos vargas. Saludos.
¿Qué problema hay con este código?
Buen dia, aprovechando el tema, sera que podrian compartir la clase TExcel o ponerla en las contribuciones.? estoy manejando excel desde FW pero guiandome como se hace con VB, espero su prontta y satisfactoria respuesta, aca dejo mi correo, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- e --><a href="mailto:joseluisy@hotmail.com">joseluisy@hotmail.com</a><!-- e -->
¿Qué problema hay con este código?
[quote="joseluisysturiz":pmjszmpa]Buen dia, aprovechando el tema, sera que podrian compartir la clase TExcel o ponerla en las contribuciones.? estoy manejando excel desde FW pero guiandome como se hace con VB, espero su prontta y satisfactoria respuesta, aca dejo mi correo, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- e --><a href="mailto:joseluisy@hotmail.com">joseluisy@hotmail.com</a><!-- e -->[/quote:pmjszmpa] José, mira si ayuda: <!-- m --><a class="postlink" href="http://fivewin.com.br/index.php?/topic/21673-usando-o-createobject-excelapplication/">http://fivewin.com.br/index.php?/topic/ ... plication/</a><!-- m --> saludos,
¿Qué problema hay con este código?
[quote="karinha":mokbp7nj][quote="joseluisysturiz":mokbp7nj]Buen dia, aprovechando el tema, sera que podrian compartir la clase TExcel o ponerla en las contribuciones.? estoy manejando excel desde FW pero guiandome como se hace con VB, espero su prontta y satisfactoria respuesta, aca dejo mi correo, gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- e --><a href="mailto:joseluisy@hotmail.com">joseluisy@hotmail.com</a><!-- e -->[/quote:mokbp7nj] José, mira si ayuda: <!-- m --><a class="postlink" href="http://fivewin.com.br/index.php?/topic/21673-usando-o-createobject-excelapplication/">http://fivewin.com.br/index.php?/topic/ ... plication/</a><!-- m --> saludos,[/quote:mokbp7nj] Karinha, ya lo he conseguido y he usado muy bien la clase EXCEL, igual gracias, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
¿Qué tan seguro es un .EXE Harbour?
Hola a todos, amigos... Solo por curiosidad; ¿qué tan seguro es un .exe compilado con harbour + BCC ? Suponiendo que se deje dentro del codigo fuente algun dato sensible, como variable char, por ejemplo el usuario y clave de conexion a mysql. cUser:="xxx" Passw:="yyyy" ¿Hay posibilidad que de alguna manera alguien pueda verlo? Con un editor de ejecutables, por ejemplo, o de otra manera. Gracias.
¿Qué tan seguro es un .EXE Harbour?
holá my dear. Se usas: [url:39alq6yy]https&#58;//bitsum&#46;com/portfolio/pecompact/[/url:39alq6yy] No és posible nada. Super seguro. Regards, saludos.
¿Qué tan seguro es un .EXE Harbour?
También Puede usar UPX [url:c3k6druf]https&#58;//github&#46;com/upx/upx/releases/tag/v4&#46;0&#46;1[/url:c3k6druf]
¿Qué tan seguro es un .EXE Harbour?
[quote="JoseAlvarez":kmw7e381]Hola a todos, amigos... Solo por curiosidad; ¿qué tan seguro es un .exe compilado con harbour + BCC ? Suponiendo que se deje dentro del codigo fuente algun dato sensible, como variable char, por ejemplo el usuario y clave de conexion a mysql. cUser:="xxx" Passw:="yyyy" ¿Hay posibilidad que de alguna manera alguien pueda verlo? Con un editor de ejecutables, por ejemplo, o de otra manera. Gracias.[/quote:kmw7e381] Prueba lo siguiente, bien al principio y al final de tu prg o en las zonas donde consideres que tienes constantes o datos sensibles y prueba [code=fw:kmw7e381]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#pragma</span> TEXTHIDDEN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />.../...<br /><br /><span style="color: #00D7D7;">#pragma</span> TEXTHIDDEN<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:kmw7e381] Tampoco es mala idea adicional usar un compresor de EXEs ( UPX por ejemplo ), pero mi experiencia es que estos compresores me han producido que algunas veces los .EXEs sean detectados por los antivirus como que contienen "código maligno".
¿Qué tan seguro es un .EXE Harbour?
Maestro Navarro, no si usa PECOMPACT. Firma el ejecutable o si es un antivirus muy molesto o malo, simplemente ponga el .EXE en las excepciones. No recomiendo UPX.exe en absoluto. Regards, saludos.
¿Qué tan seguro es un .EXE Harbour?
[quote="karinha":2mgat1x2]Maestro Navarro, no si usa PECOMPACT. Firma el ejecutable o si es un antivirus muy molesto o malo, simplemente ponga el .EXE en las excepciones. No recomiendo UPX.exe en absoluto.[/quote:2mgat1x2] Why not? It wotks perfectly. PECOMPACT is a dead project.
¿Qué tan seguro es un .EXE Harbour?
[quote="Enrico Maria Giordano":38nht0ue][quote="karinha":38nht0ue]Maestro Navarro, no si usa PECOMPACT. Firma el ejecutable o si es un antivirus muy molesto o malo, simplemente ponga el .EXE en las excepciones. No recomiendo UPX.exe en absoluto.[/quote:38nht0ue] Why not? It wotks perfectly. PECOMPACT is a dead project.[/quote:38nht0ue] Good morning Master Enrico. When I used UPX.exe, I had many problems with several anti-viruses, which would not let the .EXE run, or simply send it to quarantine. We stopped using it and started using PECOMPACT, we never had any problems again. It may be that today there is a new version of it that works well, I don't know. Buenos días Maestro Enrico. Cuando usaba UPX.exe, tenía muchos problemas con varios antivirus, que no dejaban ejecutar el .EXE o simplemente lo enviaban a cuarentena. Dejamos de usarlo y comenzamos a usar PECOMPACT, nunca más tuvimos problemas. Puede ser que hoy haya una nueva versión que funcione bien, no lo sé. I really didn't like UPX.exe. More is my personal taste. Realmente no me gustó UPX.exe. Más es mi gusto personal. Regards, saludos.
¿Qué tan seguro es un .EXE Harbour?
[quote="karinha":5oesa77w]Good morning Master Enrico. When I used UPX.exe, I had many problems with several anti-viruses, which would not let the .EXE run, or simply send it to quarantine. We stopped using it and started using PECOMPACT, we never had any problems again. It may be that today there is a new version of it that works well, I don't know.[/quote:5oesa77w] I tried PECOMPACT recently and found the very same problem with the antiviruses (but keep in mind that this is a problem with the antiviruses not with the compressors). And, as I said, PECOMPACT is a dead project. And UPX, with the --lzma option, compresses more than PECOMPACT. I don't see any reason to use PECOMPACT instead of UPX.
¿Qué tan seguro es un .EXE Harbour?
[quote="Enrico Maria Giordano":lbhslv6z][quote="karinha":lbhslv6z]Good morning Master Enrico. When I used UPX.exe, I had many problems with several anti-viruses, which would not let the .EXE run, or simply send it to quarantine. We stopped using it and started using PECOMPACT, we never had any problems again. It may be that today there is a new version of it that works well, I don't know.[/quote:lbhslv6z] I tried PECOMPACT recently and found the very same problem with the antiviruses (but keep in mind that this is a problem with the antiviruses not with the compressors). And, as I said, PECOMPACT is a dead project. And UPX, with the --lzma option, compresses more than PECOMPACT. I don't see any reason to use PECOMPACT instead of UPX.[/quote:lbhslv6z] Master Enrico, I respect your opinion. Mine is that PECOMPACT even in older versions is much safer than UPX.exe. Only my opinion. I'm very happy with it, and I won't go back to UPX.exe at all. hahahahahaha. Maestro Enrico, respeto su opinión. La mía es que PECOMPACT incluso en versiones anteriores es mucho más seguro que UPX.exe. Solo mi opinión. Estoy muy contento con él y no volveré a UPX.exe en absoluto. jajajajajaja Regards, saludos.
¿Qué tan seguro es un .EXE Harbour?
Master Enrico, how did you compact your .EXE using PECOMPACT, like this? Maestro Enrico, ¿cómo compactaste tu .EXE usando PECOMPACT, así? [code=fw:1kjbe3us]<div class="fw" id="{CB}" style="font-family: monospace;"><br />C:\PECOMPACT\PEC2 /NB /EMP:<span style="color: #000000;">Y</span> /TM:<span style="color: #000000;">Y</span> /CR:<span style="color: #000000;">Y</span> /MC MYPROGRAM.Exe<br />&nbsp;</div>[/code:1kjbe3us] Regards, saludos.
¿Qué tan seguro es un .EXE Harbour?
[quote="karinha":155thuum]Master Enrico, I respect your opinion. Mine is that PECOMPACT even in older versions is much safer than UPX.exe.[/quote:155thuum] What do you mean with "much safer". Much safer in what?
¿Qué tan seguro es un .EXE Harbour?
[quote="karinha":2uj0vlvt]Master Enrico, how did you compact your .EXE using PECOMPACT, like this? Maestro Enrico, ¿cómo compactaste tu .EXE usando PECOMPACT, así? [code=fw:2uj0vlvt]<div class="fw" id="{CB}" style="font-family: monospace;"><br />C:\PECOMPACT\PEC2 /NB /EMP:<span style="color: #000000;">Y</span> /TM:<span style="color: #000000;">Y</span> /CR:<span style="color: #000000;">Y</span> /MC MYPROGRAM.Exe<br /> </div>[/code:2uj0vlvt][/quote:2uj0vlvt] I don't remember but I wish to repeat the test. As the first thing, please give me the url of the correct PECOMPACT website.
¿Qué tan seguro es un .EXE Harbour?
João, thank you for the file but I just discovered that PECOMPACT is not free! So I'm not interested in it at all, sorry.
¿Qué tan seguro es un .EXE Harbour?
OK master. it was just for you to test. Regards, saludos.
¿Qué tan seguro es un .EXE Harbour?
Thank you, but I'm not interested in testing a pay product.
¿RAdio button no tiene lACTIVE?
eso. Gracias.
¿RAdio button no tiene lACTIVE?
[quote="goosfancito":2tpr9ibe]eso. Gracias.[/quote:2tpr9ibe] Goos, Todos los controles cuelgan de la TWindow, así que deben de contener la lActive.
¿Saber numero de columna del browse? (SOLUCIONADO)
Saludos al foro: Creí tener la solución pero veo que no es así, trataré de explicarme: Tengo un browse de 120 columnas 10 columnas por cada mes del año, en el dialogo solo muestro 10 aunque el browse tiene definidas las 120 y solo con scroll horizontal voy mostrando las columna de los otros meses. -----------------------------------------E N E R O ----------------------------------------------| -------------- F E B R E R O COL01 COL02 COL03 COL04 COL05 COL06 COL07 COL08 COL09 COL10 COL11 COL12 | COL13 COL14 COL15 COL16 <====== Encabezado de la columna FLD01 FLD02 FLD03 FLD04 FLD05 FLD06 FLD07 FLD08 FLD09 FLD10 FLD11 | FLD12 FLD13 FLD14 FLD15 FLD16<====== Nombre del campo de la tabla que contiene el valora a mostrar En el browse tengo definido un menú emergente con el siguiente código [code=fw:218bow4v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | MenuPop<span style="color: #000000;">&#40;</span>oBrw,oBrw:<span style="color: #000000;">nRowSel</span>,oBrw:<span style="color: #000000;">nColSel</span>,nRow,nCol<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />....<br />....<br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> MenuPop<span style="color: #000000;">&#40;</span>oBrw,nRow,nCol,nNumRow,nNumCol<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oMenu<br /><br />   <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span> <span style="color: #000000;">2007</span><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Registrar"</span>          <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ADD"</span> <span style="color: #0000ff;">ACTION</span> Registrar<span style="color: #000000;">&#40;</span>cShortField,cLongField,nCol<span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">SEPARATOR</span><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Salir"</span>              <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"EXI"</span> <span style="color: #0000ff;">ACTION</span> oMenu:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">POPUP</span> oMenu <span style="color: #00C800;">AT</span> nNumRow , nNumCol <span style="color: #0000ff;">OF</span> oBrw<br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /> </div>[/code:218bow4v] Hasta aquí todo bien, pero en la función Registrar() necesito conocer el número de la columna en la que el usuario dio el clic derecho del ratón, el problema se presenta así Ejemplo si el usuario da clic derecho en la primera columna, la variable nCol me da el número 01 que corresponde a la primera columna visible en el dialogo, ahora con scroll hacemos visibles las columnas de Febrero si damos clic sobre la primera columna, la variable nCol me repite el número 01 Y yo necesito tener la columna 11 (10 de enero más 1 de febrero). Por otro lado, si utilizo la variable nNumCol, me da valores mas altos como 470, 580 pero también es el mismo caso, se repiten los valores sin diferenciar el mes que se muestra en el dialogo. En otras palabras quiero obtener el nombre del campo que se muestra en el browse en función a la columna donde el usuario da clic y eso lo logro con el siguiente código [code=fw:218bow4v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>nCol<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cExpr</span><br /> </div>[/code:218bow4v] Pero como ven es imprescindible el número de columna. La razón de querer saber el nombre del campo es porque como son 120 columnas y quiero ahorrarme código al momento de actualizar la tabla, con el siguiente código actualizo sin importarme la columna en la que el usuario dió clic. [code=fw:218bow4v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   cCmdSql  := <span style="color: #ff0000;">"UPDATE "</span> +;<br />                  <span style="color: #ff0000;">"Pdfs "</span> +;<br />               <span style="color: #ff0000;">"SET "</span> +;<br />                  cLongField + <span style="color: #ff0000;">" = 1,"</span> +;<br />                  cShortField + <span style="color: #ff0000;">" = '"</span> + cPdfFile + <span style="color: #ff0000;">"' "</span> +;<br />               <span style="color: #ff0000;">"WHERE "</span> +;<br />                  <span style="color: #ff0000;">"PDF_NUM = "</span> + Str<span style="color: #000000;">&#40;</span>oRsPdf:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"PDF_NUM"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span>,<span style="color: #000000;">03</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" "</span> +;<br />               <span style="color: #ff0000;">"AND "</span> +;<br />                  <span style="color: #ff0000;">"PDF_AÑO = "</span> + Str<span style="color: #000000;">&#40;</span>nAmo,<span style="color: #000000;">04</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:218bow4v] Disculpen la perorata pero quise explicarme lo más posible. Muchas gracias
¿Saber numero de columna del browse? (SOLUCIONADO)
Puede servirte oBrw:aCols[nCol]:nCreationorder No se si te entendi bien igualmente....
¿Saber numero de columna del browse? (SOLUCIONADO)
César: Agradezco la respuesta, te muestro los resultados [code=fw:2aw4sg1f]<div class="fw" id="{CB}" style="font-family: monospace;"><br />:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> | nRow, nCol | MenuPop<span style="color: #000000;">&#40;</span>oBrw,oBrw:<span style="color: #000000;">nRowSel</span>,oBrw:<span style="color: #000000;">nColSel</span>,nRow,nCol<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <=== Clic sobre un renglón, celda<br />....<br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> MenuPop<span style="color: #000000;">&#40;</span>oBrw,nRowSel,nColSel,nRow,nCol<span style="color: #000000;">&#41;</span>                                             <=== Función donde recibimos los valores pasados<br /><span style="color: #B900B9;">// Estos son los valores recibidos dando clic sobre la primera columna de FEBRERO, te recuerdo que en el dialogo solo se muestra 10 columnas del mes</span><br />   ? nRowSel                                              <= <span style="color: #000000;">1</span><br />   ? nColSel                                              <= <span style="color: #000000;">3</span><br />   ? oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>nColSel<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nCreationOrder</span>                   <= <span style="color: #000000;">3</span>  El valor que espero en lugar de <span style="color: #000000;">3</span> debe ser <span style="color: #000000;">11</span><br />   ? nColSel                                              <= <span style="color: #000000;">3</span><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /> </div>[/code:2aw4sg1f] El menú se muestra en el renglón / Columna correctos pero los números de columna no Tal vez NO estoy haciendo bien las cosas ? Saludos
¿Saber numero de columna del browse? (SOLUCIONADO)
Amigos del foro: Con agrado les menciono que ya esta solucionado el tema gracias a la idea de César, muestro la solución por si a alguien más la necesita: [code=fw:1iadqw6s]<div class="fw" id="{CB}" style="font-family: monospace;"><br />AllTrim<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cExpr</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:1iadqw6s] Gracias estimado foro, saludos
¿Saber numero de columna del browse? (SOLUCIONADO)
[quote="Armando":2ht8s81p]Amigos del foro: Con agrado les menciono que ya esta solucionado el tema gracias a la idea de César, muestro la solución por si a alguien más la necesita: [code=fw:2ht8s81p]<div class="fw" id="{CB}" style="font-family: monospace;"><br />AllTrim<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">SelectedCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nCreationOrder</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cExpr</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:2ht8s81p] Gracias estimado foro, saludos[/quote:2ht8s81p] [url:2ht8s81p]https&#58;//www&#46;forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=14834[/url:2ht8s81p] Regards, saludos.
¿Saber numero de columna del browse? (SOLUCIONADO)
Karinha: Aunque ya esta resuelto el tema, te agradezco la respuesta, busque en el foro con oBrw:aCols[oBrw:SelectedCol():nCreationOrder] pero no mostraba resultados. Saludos
¿Se puede Salir de un dialogo y Retornar al mismo punto?
Hola a todos amigos y colegas. Tengo un dialogo donde se maneja el proceso de ventas y ahora el cliente me pide que se pueda salir de ese dialogo e ir a otras partes del sistema para luego retornar al mismo punto donde lo dejó No se como hacerlo. He logrado que funcione el boton de minimizar, pero no permite retornar al menu. Debo cerrar el dialogo obligatoriamente. Uso pelles c como editor de recursos, mariadb + fivewin 17.01 + harbour ¿como se podria hacer funcionar, si es que hay alguna manera? Gracias de antemano
¿Se puede Salir de un dialogo y Retornar al mismo punto?
HOla amigo,,, hazlo en una ventana MDI con el dialogo incrustado en ella. donde el dialogo "VENTAS" debe ser NOCAPTION y STYLE CHILD [code=fw:abufgza1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndA <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oWnd BORDER NONE NOSYSMENU NOCAPTION &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"VENTAS"</span> <br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCursor HAND<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"VENTAS"</span> <span style="color: #0000ff;">OF</span> oWndA &nbsp;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oSalVe ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SALIR"</span> <span style="color: #0000ff;">LEFT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oWndA:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><br /><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">NOWAIT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oWndA:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndA ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oWndA:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, oWndA:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">&#40;</span>oWndA:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp; <br /><br /><br />&nbsp;</div>[/code:abufgza1]
¿Se puede Salir de un dialogo y Retornar al mismo punto?
Hola Willi, gracias una vez mas por la ayuda. Hice lo que me indicaste pero tengo el siguiente error: Application =========== Path and name: C:\Neuro32\Neuro32.EXE (32 bits) Size: 9,236,992 bytes Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20170215) FiveWin Version: FWHX 14.06 Windows version: 6.2, Build 9200 Time from start: 0 hours 0 mins 5 secs Error occurred at: 13/10/2022, 08:40:42 Error description: Warning BASE/1004 Message not found: TWINDOW:OWNDCLIENT Stack Calls =========== Called from: source\rtl\tobject.prg => TWINDOW:ERROR( 0 ) Called from: source\rtl\tobject.prg => TWINDOW:MSGNOTFOUND( 0 ) Called from: source\rtl\tobject.prg => TWINDOW:OWNDCLIENT( 0 ) Called from: c:\fwh\source\classes\mdichild.prg => TMDICHILD:NEW( 150 ) Called from: .\prg\NewVentas.PRG => FNCT_REGISTRARVENTAS( 316 ) Called from: .\prg\Menus.PRG => (b)FBARRADEBOTONES( 529 ) Called from: c:\fwh\source\classes\btnbmp.prg => TBTNBMP:CLICK( 477 ) Called from: c:\fwh\source\classes\btnbmp.prg => TBTNBMP:LBUTTONUP( 668 ) Called from: c:\fwh\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1723 ) Called from: c:\fwh\source\classes\btnbmp.prg => TBTNBMP:HANDLEEVENT( 1485 ) Called from: c:\fwh\source\classes\window.prg => _FWH( 3279 ) Called from: => WINRUN( 0 ) Called from: c:\fwh\source\classes\window.prg => TWINDOW:ACTIVATE( 1003 ) Called from: .\prg\Neuro32.PRG => NEURO32( 444 ) mi codigo: [code=fw:10rlr3dk]<div class="fw" id="{CB}" style="font-family: monospace;">    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndVenta <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> _oWnd BORDER NONE NOSYSMENU NOCAPTION   <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"VENTAS"</span><br /><br /><br />    <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Dialog</span> oDlgNewSell <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"oDlg_NewVenta"</span> <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">'Procesar Documentos de Ventas'</span> <span style="color: #0000ff;">of</span> oWndVenta  <span style="color: #B900B9;">//Brush oBrush</span><br />       oDlgNewSell:<span style="color: #000000;">lHelpIcon</span>:=.f.<br />       oDlgNewSell:<span style="color: #000000;">lTransparent</span>:=.t.<br />       oDlgNewSell:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span>_oFontDlgs<span style="color: #000000;">&#41;</span><br />...<br />...<br />...<br /><br />  <span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">dialog</span> oDlgNewSell <span style="color: #0000ff;">nowait</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">Init</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>oDlgNewSell:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oWndVenta:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">&#123;</span> || oDlgNewSell:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>,;<br />                                                oCbxMonedas :<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span>nPosiMonedas<span style="color: #000000;">&#41;</span> ,;<br />                                                Fnct_ResizeGets<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                 ,;<br />                                                oCbxDias:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                   ,;<br />                                                oDateImage:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                 ,;<br />                                                oSayText1:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                  ,;<br />                                                oGetRif:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>       ,;<br />                                                iif<span style="color: #000000;">&#40;</span>_lFacturaVzla,oGetNumeroDoc:<span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span>,;<br />                                               oBtn_Imprime:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>               ,;<br />                                               oGetNumeroDoc:<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;">Window</span> oWndVenta ;<br />   <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oWndVenta:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, oWndVenta:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlgNewSell:<span style="color: #000000;">nWidth</span>, oDlgNewSell:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />   <span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">&#40;</span>oWndVenta:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlgNewSell:<span style="color: #000000;">nWidth</span>, oDlgNewSell:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:10rlr3dk] Perdona mi ignorancia pero es primera vez que veo esto. alguna idea de que estoy haciendo mal o que me esta faltando?
¿Se puede Salir de un dialogo y Retornar al mismo punto?
HOla AMigo,,, aqui completo.... [code=fw:1ryai0pc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /># include <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br /><span style="color: #B900B9;">//-------------------------------------------------------------------------------------------------------------</span><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oBar, oCursor, oVentas, oSalir<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span> &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"PRUEBA"</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">90</span>, <span style="color: #000000;">45</span> ; <span style="color: #B900B9;">// &nbsp;70, 50</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">CURSOR</span> oCursor 3DLOOK <span style="color: #000000;">2015</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBar:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span>||Nil<span style="color: #000000;">&#125;</span> &nbsp;<span style="color: #B900B9;">// para no mover</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oVentas <span style="color: #0000ff;">OF</span> oBar;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ventas"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> Ventas<span style="color: #000000;">&#40;</span>oWnd<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oSalir <span style="color: #0000ff;">OF</span> oBar;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">MAXIMIZED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">cPortIp</span> := GetIp<span style="color: #000000;">&#40;</span>oWnd<span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oApp:<span style="color: #000000;">nNumSer</span> := VerSerieFact<span style="color: #000000;">&#40;</span>oCn<span style="color: #000000;">&#41;</span> , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">nTServ</span> = <span style="color: #000000;">1</span>, oCSunat:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oCSunat:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;<br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIl</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//--------------------------------------------------------</span><br /><span style="color: #00C800;">Function</span> Ventas<span style="color: #000000;">&#40;</span>oWnd<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oWndA, oCursor, oDlg, oSalir<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndA <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">2</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oWnd BORDER NONE NOSYSMENU NOCAPTION &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"VENTAS"</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCursor HAND<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"VENTAS"</span> <span style="color: #0000ff;">OF</span> oWndA &nbsp;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oSalir ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SALIR"</span> <span style="color: #0000ff;">LEFT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oWndA:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /><span style="color: #B900B9;">// aqui van los controles que desees &nbsp;XBROWSE, SAY, GET ect.</span><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">NOWAIT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, oWndA:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndA ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oWndA:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, oWndA:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">&#40;</span>oWndA:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;<br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">NIl</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp;</div>[/code:1ryai0pc]
¿Se puede Salir de un dialogo y Retornar al mismo punto?
Simples asi: use MDI. [code=fw:26rmsjih]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\ALVAREZ\ALVAREZ.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Usando MDICHILD objects"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W/BG"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">OF</span> oWnd<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> Alvarez<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Usando MDICHILD objects"</span> NOINSET CLOCK DATE KEYBOARD<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Alvarez<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oFont, oFnt, cTitle, oWndChild, oLbx, oDbf<br /><br />   cTitle := <span style="color: #ff0000;">"PLENOIND: USANDO MDICHILD PARA JOSE ALVAREZ"</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;">"Ms Sans Serif"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt   <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />   CLOSE DATABASE<br /><br />   USE Customer <span style="color: #00C800;">NEW</span><br /><br />   DATABASE oDbf<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">TITLE</span> cTitle <span style="color: #0000ff;">MDICHILD</span>  <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">00</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">36.7</span>, <span style="color: #000000;">127.9</span> ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_CYAN, CLR_WHITE BORDER NONE NOMAXIMIZE <span style="color: #B900B9;">// NOZOOM</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> <span style="color: #0000ff;">OF</span> oWndChild _3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">33</span>, <span style="color: #000000;">33</span> _2007  <span style="color: #B900B9;">// O DIALOGO</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oWndChild:<span style="color: #000000;">oBar</span> GROUP NOBORDER                      ;<br />      <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oWndChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh1905<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\e</span>xit.bmp"</span> ;<br />      <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Real compatibility of oWndChild"</span> TOOLTIP <span style="color: #ff0000;">"Exit"</span><br /><br />   @ <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">LISTBOX</span> oLbx FIELDS <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">CLICK</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oLbx:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>    ;<br />      <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">200</span><br /><br />   oWndChild:<span style="color: #000000;">SetControl</span><span style="color: #000000;">&#40;</span> oLbx <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">20</span>, <span style="color: #000000;">0</span> TABS oWndChild:<span style="color: #000000;">oBottom</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Action 1"</span>, <span style="color: #ff0000;">"Action 2"</span> ;<br />      <span style="color: #0000ff;">OF</span> oWndChild<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">CENTERED</span><br /><br />   oWndChild:<span style="color: #000000;">ReSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oFnt:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br /> </div>[/code:26rmsjih] Regards, saludos.
¿Se puede Salir de un dialogo y Retornar al mismo punto?
[quote="karinha":35q3ccez]Simples asi: use MDI. [code=fw:35q3ccez]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\ALVAREZ\ALVAREZ.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Usando MDICHILD objects"</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W/BG"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar _3D <span style="color: #0000ff;">OF</span> oWnd<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> Alvarez<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Usando MDICHILD objects"</span> NOINSET CLOCK DATE KEYBOARD<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Alvarez<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> oFont, oFnt, cTitle, oWndChild, oLbx, oDbf<br /><br />   cTitle := <span style="color: #ff0000;">"PLENOIND: USANDO MDICHILD PARA JOSE ALVAREZ"</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;">"Ms Sans Serif"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt   <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />   CLOSE DATABASE<br /><br />   USE Customer <span style="color: #00C800;">NEW</span><br /><br />   DATABASE oDbf<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">TITLE</span> cTitle <span style="color: #0000ff;">MDICHILD</span>  <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">00</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">36.7</span>, <span style="color: #000000;">127.9</span> ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_CYAN, CLR_WHITE BORDER NONE NOMAXIMIZE <span style="color: #B900B9;">// NOZOOM</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> <span style="color: #0000ff;">OF</span> oWndChild _3D <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">33</span>, <span style="color: #000000;">33</span> _2007  <span style="color: #B900B9;">// O DIALOGO</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oWndChild:<span style="color: #000000;">oBar</span> GROUP NOBORDER                      ;<br />      <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oWndChild:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> FILENAME <span style="color: #ff0000;">"c:<span style="color: #000000;">\f</span>wh1905<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\e</span>xit.bmp"</span> ;<br />      <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Real compatibility of oWndChild"</span> TOOLTIP <span style="color: #ff0000;">"Exit"</span><br /><br />   @ <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">LISTBOX</span> oLbx FIELDS <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">CLICK</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oLbx:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>    ;<br />      <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">200</span><br /><br />   oWndChild:<span style="color: #000000;">SetControl</span><span style="color: #000000;">&#40;</span> oLbx <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">20</span>, <span style="color: #000000;">0</span> TABS oWndChild:<span style="color: #000000;">oBottom</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Action 1"</span>, <span style="color: #ff0000;">"Action 2"</span> ;<br />      <span style="color: #0000ff;">OF</span> oWndChild<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndChild <span style="color: #0000ff;">CENTERED</span><br /><br />   oWndChild:<span style="color: #000000;">ReSize</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oFnt:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br /> </div>[/code:35q3ccez] Regards, saludos.[/quote:35q3ccez] Hola Joao, como estas amigo? Por lo que veo en tu codigo, parece que estan incrustanto una ventana dentro de otra ventana, lo que necesito es un DIALOG dentro de una ventana, que se puede minimizar, maximizar, para salir a otras opciones del sistema y volver al dialogo al mismo punto donde estaba cuando se minimizo. Willi, no me funciona aun... estoy intentando.
¿Se puede Salir de un dialogo y Retornar al mismo punto?
te basta poner un DIALOGO en la ventana hija con NOWAIT. Regards, saludos.
¿Se puede Salir de un dialogo y Retornar al mismo punto?
Jose: Yo lo hago de recursos Y funciona bien [code=fw:9y3h35e8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// oApp:oWnd es una ventana MDI</span><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Jose"</span> <span style="color: #0000ff;">OF</span> oApp:<span style="color: #000000;">oWnd</span> NOZOOM <span style="color: #0000ff;">ICON</span> oApp:<span style="color: #000000;">oIco</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">OF</span> oWnd1 <span style="color: #000000;">2010</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SALE"</span> <span style="color: #0000ff;">OF</span> oBar;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TOOLTIP <span style="color: #ff0000;">"Cerrar Ventana"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> oWnd1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cerrar"</span> TOP<br />&nbsp; &nbsp;oWnd1:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oWnd1:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || Incrusta<span style="color: #000000;">&#40;</span> oWnd1, oDlg, .t.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ABMS"</span> <span style="color: #0000ff;">OF</span> oWnd1<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw DATASOURCE oQry;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">"Codigo"</span>,<span style="color: #ff0000;">"Nombre"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"Codigo"</span>,<span style="color: #ff0000;">"Nombre"</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZES <span style="color: #000000;">50</span>,<span style="color: #000000;">350</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg AUTOSORT <br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span>oWnd1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> Incrusta<span style="color: #000000;">&#40;</span> oWnd1, oDlg, .T.<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span>cerrar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//</span><br />******************************************************************************<br /><span style="color: #B900B9;">// Funcion &nbsp; : Incrusta</span><br /><span style="color: #B900B9;">// Proposito : Poner justo justo un dialogo en una ventana</span><br /><span style="color: #B900B9;">// Parametros: oWnd: Ventana donde se quiere poner el dialogo</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDlg: Dialogo que se quiere inscrustar</span><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lCentra: Si lo quiere centrado o no</span><br /><span style="color: #00C800;">FUNCTION</span> Incrusta<span style="color: #000000;">&#40;</span> oWnd, oDlg, lCentra<span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">STATIC</span> lActivo := .F.<br />&nbsp; <span style="color: #00C800;">LOCAL</span> &nbsp;aRect, nPosY, nPosX, nPosXX, oIco<br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIco <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"socie"</span><br />** &nbsp;<span style="color: #00C800;">DEFAULT</span> lCentra := .F.<br />&nbsp; <span style="color: #00C800;">IF</span> IsIconic<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> .T.<br />&nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; <span style="color: #00C800;">IF</span> !<span style="color: #000000;">&#40;</span>lActivo<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;lActivo = .T.<br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Muevo dialogo a 0,0 para que quede bien incrustado...</span><br />&nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Primero Seteo Como si Windows Fuera Estandar...</span><br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+8</span>, oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">+27</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Calculo diferencia !</span><br />&nbsp; &nbsp; &nbsp;aRect &nbsp;:= GetClientRect<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nPosY := <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>-aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nTop</span>-oWnd:<span style="color: #000000;">nBottom</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nPosX := <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>-aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nRight</span>-oWnd:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;nPosXX := INT<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nRight</span>-oWnd:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span> - ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nRight</span>-oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Ahora la pongo JUSTA, JUSTA...</span><br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nWidth</span>+nPosX,oDlg:<span style="color: #000000;">nHeight</span>+nPosY<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nTop</span><span style="color: #000000;">+5</span>,nPosXX<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;lActivo := .F.<br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #000000;">SetIcon</span><span style="color: #000000;">&#40;</span>oIco<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oWnd:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWndClient</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br />&nbsp;</div>[/code:9y3h35e8] Y el RC [code=fw:9y3h35e8]<div class="fw" id="{CB}" style="font-family: monospace;">ABMS <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">15</span>, <span style="color: #000000;">19</span>, <span style="color: #000000;">551</span>, <span style="color: #000000;">309</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">111</span>, <span style="color: #ff0000;">"TXBROWSE"</span>, WS_TABSTOP|0x00b000a1, <span style="color: #000000;">4</span>, <span style="color: #000000;">44</span>, <span style="color: #000000;">540</span>, <span style="color: #000000;">240</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Buscar=>:"</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">292</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">113</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">68</span>, <span style="color: #000000;">292</span>, <span style="color: #000000;">476</span>, <span style="color: #000000;">8</span><br /><span style="color: #000000;">&#125;</span></div>[/code:9y3h35e8] Espero te de una pista Saludos
¿Se puede Salir de un dialogo y Retornar al mismo punto?
[quote="karinha":21h30161]te basta poner un DIALOGO en la ventana hija con NOWAIT. Regards, saludos.[/quote:21h30161] Eso intento, siguiendo las indicaciones del colega willi quintana y las tuyas, pero no he logrado hacerlo funcionar. Tendra algo que ver que el dialogo viene desde recursos? Hecho con pelles C
¿Se puede Salir de un dialogo y Retornar al mismo punto?
[quote="cmsoft":82hrw0jm]Jose: Yo lo hago de recursos Y funciona bien [code=fw:82hrw0jm]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// oApp:oWnd es una ventana MDI</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">MDICHILD</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Jose"</span> <span style="color: #0000ff;">OF</span> oApp:<span style="color: #000000;">oWnd</span> NOZOOM <span style="color: #0000ff;">ICON</span> oApp:<span style="color: #000000;">oIco</span><br />         <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>,<span style="color: #000000;">60</span> <span style="color: #0000ff;">OF</span> oWnd1 <span style="color: #000000;">2010</span><br />         <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SALE"</span> <span style="color: #0000ff;">OF</span> oBar;<br />            TOOLTIP <span style="color: #ff0000;">"Cerrar Ventana"</span> ;<br />            <span style="color: #0000ff;">ACTION</span> oWnd1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />            <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cerrar"</span> TOP<br />   oWnd1:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#125;</span><br />   oWnd1:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || Incrusta<span style="color: #000000;">&#40;</span> oWnd1, oDlg, .t.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />     <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ABMS"</span> <span style="color: #0000ff;">OF</span> oWnd1<br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw DATASOURCE oQry;<br />              COLUMNS <span style="color: #ff0000;">"Codigo"</span>,<span style="color: #ff0000;">"Nombre"</span>;<br />              HEADERS <span style="color: #ff0000;">"Codigo"</span>,<span style="color: #ff0000;">"Nombre"</span>;<br />              SIZES <span style="color: #000000;">50</span>,<span style="color: #000000;">350</span>;<br />              <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg AUTOSORT <br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">OF</span> oDlg<br />     <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span>oWnd1:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> Incrusta<span style="color: #000000;">&#40;</span> oWnd1, oDlg, .T.<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span>cerrar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//</span><br />******************************************************************************<br /><span style="color: #B900B9;">// Funcion   : Incrusta</span><br /><span style="color: #B900B9;">// Proposito : Poner justo justo un dialogo en una ventana</span><br /><span style="color: #B900B9;">// Parametros: oWnd: Ventana donde se quiere poner el dialogo</span><br /><span style="color: #B900B9;">//             oDlg: Dialogo que se quiere inscrustar</span><br /><span style="color: #B900B9;">//             lCentra: Si lo quiere centrado o no</span><br /><span style="color: #00C800;">FUNCTION</span> Incrusta<span style="color: #000000;">&#40;</span> oWnd, oDlg, lCentra<span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">STATIC</span> lActivo := .F.<br />  <span style="color: #00C800;">LOCAL</span>  aRect, nPosY, nPosX, nPosXX, oIco<br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oIco <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"socie"</span><br />**  <span style="color: #00C800;">DEFAULT</span> lCentra := .F.<br />  <span style="color: #00C800;">IF</span> IsIconic<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">RETURN</span> .T.<br />  <span style="color: #00C800;">ENDIF</span><br /><br />  <span style="color: #00C800;">IF</span> !<span style="color: #000000;">&#40;</span>lActivo<span style="color: #000000;">&#41;</span><br />     lActivo = .T.<br /><br />     <span style="color: #B900B9;">// Muevo dialogo a 0,0 para que quede bien incrustado...</span><br />     oDlg:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #B900B9;">// Primero Seteo Como si Windows Fuera Estandar...</span><br />     oWnd:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">+8</span>, oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">+27</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #B900B9;">// Calculo diferencia !</span><br />     aRect  := GetClientRect<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span><br />     nPosY := <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>-aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nTop</span>-oWnd:<span style="color: #000000;">nBottom</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />     nPosX := <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>-aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>-<span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nRight</span>-oWnd:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />     nPosXX := INT<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">nRight</span>-oWnd:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span> - ;<br />               <span style="color: #0000ff;">ABS</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nRight</span>-oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nLeft</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #B900B9;">// Ahora la pongo JUSTA, JUSTA...</span><br />     oWnd:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nWidth</span>+nPosX,oDlg:<span style="color: #000000;">nHeight</span>+nPosY<span style="color: #000000;">&#41;</span>           <br />     oWnd:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span>oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">nTop</span><span style="color: #000000;">+5</span>,nPosXX<span style="color: #000000;">&#41;</span><br />     lActivo := .F.<br />     oWnd:<span style="color: #000000;">SetIcon</span><span style="color: #000000;">&#40;</span>oIco<span style="color: #000000;">&#41;</span><br />     oWnd:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />     oApp:<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oWndClient</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /> </div>[/code:82hrw0jm] Y el RC [code=fw:82hrw0jm]<div class="fw" id="{CB}" style="font-family: monospace;">ABMS <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">15</span>, <span style="color: #000000;">19</span>, <span style="color: #000000;">551</span>, <span style="color: #000000;">309</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">111</span>, <span style="color: #ff0000;">"TXBROWSE"</span>, WS_TABSTOP|0x00b000a1, <span style="color: #000000;">4</span>, <span style="color: #000000;">44</span>, <span style="color: #000000;">540</span>, <span style="color: #000000;">240</span><br />  CONTROL <span style="color: #ff0000;">"Buscar=>:"</span>, <span style="color: #000000;">-1</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">292</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">113</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">68</span>, <span style="color: #000000;">292</span>, <span style="color: #000000;">476</span>, <span style="color: #000000;">8</span><br /><span style="color: #000000;">&#125;</span></div>[/code:82hrw0jm] Espero te de una pista Saludos[/quote:82hrw0jm] ¡ Estimado amigo César! ¿cómo estás? Gracias por tu ayuda... con tu codigo y un par de retoques logré hacer lo que necesitaba. Excelente. Ahora bien... para todos los amigos del foro solicito su ayuda para solucionar tres detalles que me quedan por corregir: 1. Se ve un parpadero bastente feo al momento de crearse la ventana y el inscrustado del dialogo dentro. Puedes verlo aca: [url:82hrw0jm]http&#58;//www&#46;datanet&#46;space/fw/v01&#46;mp4[/url:82hrw0jm] 2. Al quedar el dialogo dentro de la ventana, se ve incompleto por causa de la Barra de botones o buttonbar. Buscando en el foro consegui la manera de ocultarla y mostrarla al entrar o salir al modulo, hasta alli perfecto, pero el detalle está en que necesito que se oculte o muestre tambien al minimizar o maximizar la ventana. Lo muestro aca: [url:82hrw0jm]http&#58;//www&#46;datanet&#46;space/fw/v02&#46;mp4[/url:82hrw0jm] 3. y Ultimo. En mi ventana principal de sistema coloco un fondo el cual el cliente puede cambiar a gusto. Al convertir la ventana en MDI no se muestra la imagen, aqui si no tengo idea del por que. [url:82hrw0jm]http&#58;//www&#46;datanet&#46;space/fw/V03&#46;mp4[/url:82hrw0jm] Se agradece la ayuda que puedan prestar !! Gracias !!
¿Se puede Salir de un dialogo y Retornar al mismo punto?
Jose Punto 1: Es por el move y el refresh y el center No se me ocurre como solucionarlo. Punto 2: Puedes hacer que cada vez que se minimize muestre la barra [code=fw:2ixg3suv]<div class="fw" id="{CB}" style="font-family: monospace;">oWnd:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span><span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">IsIconic</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oBar:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,<span style="color: #00C800;">nil</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #000000;">&#125;</span> &nbsp;</div>[/code:2ixg3suv] el punto 3 (la imagen de fondo) Prueba asi: [code=fw:2ixg3suv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />_oWnd:<span style="color: #000000;">bPainted</span> = <span style="color: #000000;">&#123;</span> | hDC | PonerFondo<span style="color: #000000;">&#40;</span> hDC, _oWnd , _oJpgMain <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />_oWnd:<span style="color: #000000;">bResized</span> = <span style="color: #000000;">&#123;</span> | hDC | PonerFondo<span style="color: #000000;">&#40;</span> hDC, _oWnd , _oJpgMain <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />*************************************************<br />** Poner una imagen de fondo<br />*************************************************<br /><span style="color: #00C800;">FUNCTION</span> PorerFondo<span style="color: #000000;">&#40;</span> hDC, oWnd, oBmp <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nWidth := oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nHeight := oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRow := <span style="color: #000000;">0</span>, nCol := <span style="color: #000000;">0</span>, n<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nBmpWidth &nbsp;:= oBmp:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, &nbsp;nBmpHeight := oBmp:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oBmp:<span style="color: #000000;">hBitmap</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;nCol := nWidth /<span style="color: #000000;">2</span> - nBmpWidth /<span style="color: #000000;">2</span><br />&nbsp; &nbsp;nRow := nHeight /<span style="color: #000000;">2</span> - nBmpHeight /<span style="color: #000000;">2</span><br />&nbsp; &nbsp;nRow = <span style="color: #000000;">0</span><br />&nbsp; &nbsp;PalBmpDraw<span style="color: #000000;">&#40;</span> hDC, nRow, nCol, oBmp:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2ixg3suv]
¿Se puede Salir de un dialogo y Retornar al mismo punto?
[quote:38h8a9v7]Al convertir la ventana en MDI no se muestra la imagen, aqui si no tengo idea del por que.[/quote:38h8a9v7] Sobre el punto 1: Hace tiempo también hice esa consulta. Sobre el punto 3, lo hago asi: (FW1204) [code=fw:38h8a9v7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//-----------------------------------------//</span><br /><span style="color: #00C800;">FUNCTION</span> PongaBmp<span style="color: #000000;">&#40;</span> hDC, oBmp, oWnd <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;PalBmpDraw<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>,oBmp:<span style="color: #000000;">hBitmap</span>,, oWnd:<span style="color: #000000;">oWndClient</span>:<span style="color: #000000;">nWidth</span>, oWnd:<span style="color: #000000;">oWndClient</span>:<span style="color: #000000;">nHeight</span>,, .t.<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:38h8a9v7] Saludos.
¿Se puede Salir de un dialogo y Retornar al mismo punto?
[quote="FranciscoA":3mc6suqk][quote:3mc6suqk]Al convertir la ventana en MDI no se muestra la imagen, aqui si no tengo idea del por que.[/quote:3mc6suqk] Sobre el punto 1: Hace tiempo también hice esa consulta. Sobre el punto 3, lo hago asi: (FW1204) [code=fw:3mc6suqk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//-----------------------------------------//</span><br /><span style="color: #00C800;">FUNCTION</span> PongaBmp<span style="color: #000000;">&#40;</span> hDC, oBmp, oWnd <span style="color: #000000;">&#41;</span><br />   PalBmpDraw<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>,oBmp:<span style="color: #000000;">hBitmap</span>,, oWnd:<span style="color: #000000;">oWndClient</span>:<span style="color: #000000;">nWidth</span>, oWnd:<span style="color: #000000;">oWndClient</span>:<span style="color: #000000;">nHeight</span>,, .t.<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3mc6suqk] Saludos.[/quote:3mc6suqk] Francisco, muy bien, con esto solucione el tema de la imagen de fondo en la ventana. Cesar, no logre solucionar lo referente a que se esconda o se muestre la barra de menu de la venta principal cuando la ventana hija cambia de tamaño. Logre hacerlo a medias pero aun le llego. Sigo Buscando la manera de que funcione. Gracias a Todos por la ayuda, agradecido.
¿Se puede cambiar el ancho del Caption de una ventana o dlg?
Solicito ayuda sobre como cambiar el ancho del Caption en una ventana oWnd o dialogo oDlg. ¿Se puede?, ¿Cómo hacerlo?Gracias
¿Se puede cambiar el ancho del Caption de una ventana o dlg?
Te refieres a la altura de la barra superior ?Si es eso, lo más sencillo es que cambies la configuración de apariencia de Windows para que use un font más grande para el título.Modificar las partes que Windows denomina "non client", se puede hacer, pero requiere dibujarlas completamente por nosotros, y es algo realmente complejo.Otra solución es no mostrar ningún título y usar un bitmap para mostrar una imagen. Revisa este topic:<!-- m --><a class="postlink" href="http://forums.fivetechsoft.com/viewtopic.php?t=12221">http://forums.fivetechsoft.com/viewtopic.php?t=12221</a><!-- m -->
¿Se puede cambiar el ancho del Caption de una ventana o dlg?
Muy agradecido por tu respuesta, Antonio.Saludos
¿Se puede centrar el Header de un Grupo en Treport?
¿Alguien me puede orientar sobre cómo centrar los Títulos de Grupo entre todas las columnas del reporte, utilizando Treport?Necesito centrar títulos de grupos no importando la cantidad de columnas, igual como se hace con el Title, Header o Footer del reporte mismo.Gracias de antemano.Francisco.
¿Se puede chequear si una tabla fue modificada?
Hola. Por comando de mysql, se puede chequear si una tabla o DB ha tenido modificaciones en los datos? gracias.
¿Se puede chequear si una tabla fue modificada?
gracias.
¿Se puede chequear si una tabla fue modificada?
Creo que en la web de William puedes encontrar la respuesta. (Triggers) Por otra parte, en dbfs siempre he usado un tabla donde guardo 1 registro con los datos antes de modificar +otro registro con los datos ya modificados. Saludos.
¿Se puede desactivar el botón ""X"" de cerrar una ve
Quisiera desactivar y que aparezca desactivado botón de cerrar ("X") de una ventana pero manteniendo activos el de minimizar y maximizar. Gracias, Rafael
¿Se puede desactivar el botón ""X"" de cerrar una ve
[code:22610lo1] SHOWTASKBAR&#40;&#41; //habilita HIDETASKBAR&#40;&#41; //desabilita TIRA_X&#40;&#41; // DESABILITA O X da janela PISCA_EXE&#40;&#41; // VAI PISCAR O SEU EXE NA BARRA #pragma BEGINDUMP #include "windows&#46;h" #include "shlobj&#46;h" #include "hbapi&#46;h" #include "math&#46;h" #include "hbvm&#46;h" #include "hbstack&#46;h" #include "hbapiitm&#46;h" #include "hbapigt&#46;h" HB_FUNC &#40; SHOWTASKBAR &#41; //Habilita o botao INICIAR &#123; HWND hWnd = FindWindow&#40;"Shell_TrayWnd", ""&#41;; ShowWindow&#40; hWnd, 1 &#41;; &#125; HB_FUNC &#40; HIDETASKBAR &#41; //Desabilita o botao Iniciar &#123; HWND hWnd = FindWindow&#40;"Shell_TrayWnd", ""&#41;; ShowWindow&#40; hWnd, 0 &#41;; &#125; HB_FUNC &#40; PISCA_EXE &#41; // VAI PISCAR O SEU EXE NA BARRA &#123; HWND Handle = GetForegroundWindow&#40;&#41;; FlashWindow&#40;Handle,TRUE&#41;; // VAI PISCAR O SEU EXE NA BARRA Sleep&#40;300&#41;; // TEMPO DE ESPERA &#125; HB_FUNC &#40; TIRA_X &#41; // DESABILITA O X da janela &#123; HMENU MenuH = GetSystemMenu&#40;GetForegroundWindow&#40;&#41;,FALSE&#41;; EnableMenuItem&#40;MenuH,SC_CLOSE,MF_GRAYED&#41;; &#125; #pragma ENDDUMP [/code:22610lo1]
¿Se puede desactivar el botón ""X"" de cerrar una ve
[code:2fohe13v] ACTIVATE WINDOW oWnd MAXIMIZED ; ON INIT&#40; TIRA_X&#40;&#41; &#41; [/code:2fohe13v]
¿Se puede desactivar el botón ""X"" de cerrar una ve
Funciona perfectamente. Muchas gracias, João!!! Rafael
¿Se puede desactivar el botón ""X"" de cerrar una ve
Rafael, Tambien podrías usar un VALID en la ventana ó en el diálogo, que impidan que puedan cerrarse
¿Se puede desactivar el botón ""X"" de cerrar una ve
Antonio: Sí; ya lo había probado pero es que la solución de Joao tiene la ventaja de que deja "Disabled" el botón "X", que es lo que yo quería. Gracias Rafael
¿Se puede desactivar el botón ""X"" de cerrar una ve
Si usas Pelles C lo puedes hacer desde el diseño del recurso.
¿Se puede desactivar el botón ""X"" de cerrar una ve
[quote="joseluisysturiz":2rh70175]Si usas Pelles C lo puedes hacer desde el diseño del recurso.[/quote:2rh70175] NO EN LA WINDOW PRINCIPAL. EN DIALOGOS, SI ÉS POSIBLE INCLUSIVE EN WORKSHOP. Saludos.
¿Se puede desactivar el botón ""X"" de cerrar una ve
Karinha, Perfecto! En el caso mio me interesa el hacer lo contrario de Rafael Clemente. Quisiera dejar activo el boton de cerrar [X]; pero quiero desactivar los botones de Minimizar y Maximizar el Window. Me podrias indicar como hacerlo? Saludos, George
¿Se puede desactivar el botón ""X"" de cerrar una ve
[quote="George":oqvq2kjs]Karinha, Perfecto! En el caso mio me interesa el hacer lo contrario de Rafael Clemente. Quisiera dejar activo el boton de cerrar [X]; pero quiero desactivar los botones de Minimizar y Maximizar el Window. Me podrias indicar como hacerlo? Saludos, George[/quote:oqvq2kjs] ESTO, FIVEWIN HACE POR DEFECTO, MIRA LA CLASSE WINDOW.PRG Saludos.
¿Se puede desactivar el botón ""X"" de cerrar una ve
Desculpa mi respuesta, por ejemplo: debes controlar via STYLE de la window principal [code:1sd8h6hs] nStyle = nOr&#40; WS_CLIPCHILDREN,; If&#40; cBorder == "NONE", WS_POPUP, 0 &#41;,; If&#40; cBorder == "SINGLE", WS_THICKFRAME, 0 &#41;,; If&#40; lCaption, WS_CAPTION, 0 &#41;,; If&#40; lSysMenu &#46;and&#46; lCaption, WS_SYSMENU, 0 &#41;,; If&#40; lMin &#46;and&#46; lCaption, WS_MINIMIZEBOX, 0 &#41;,; If&#40; lMax &#46;and&#46; lCaption, WS_MAXIMIZEBOX, 0 &#41;,; If&#40; lVScroll, WS_VSCROLL, 0 &#41;,; If&#40; lHScroll, WS_HSCROLL, 0 &#41; &#41; [/code:1sd8h6hs]
¿Se puede desactivar el botón ""X"" de cerrar una ve
Gracias karinha!
¿Se puede escanear documentos desde five?
Hola,Quisiera saber si hay funciones o librerías en FWH para poder hacer una pequeña aplicación de escaneo. Ya sabeis, escanear un documento y guardarlo.Saludos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
¿Se puede escanear documentos desde five?
La clase TSCANNER de Rafa CarmonaSalu2
¿Se puede escanear documentos desde five?
Willi,¿sabes donde puedo descargar la clase TScann de R. Carmona?Gracias,
¿Se puede escanear documentos desde five?
Hola de nuevo,Ya he conseguido bajarme la clase TScan de Rafa Carmona.Pero al ejecutar el TestHarbout, o un ejemplo con las líneas...[code:3t5tptzs] #include "FiveWin&#46;ch" function Main&#40;&#41; local oScan oScan &#58;= TScan32&#40;&#41;&#58;New&#40; "pepe&#46;jpg" &#41; oScan&#58;DigiToFile&#40;&#41; return nil [/code:3t5tptzs]Me devuelve un mensaje de error que dice, [img:3t5tptzs]http&#58;//www&#46;teleinformatica&#46;eu/img/error&#46;jpg[/img:3t5tptzs] <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
¿Se puede escanear documentos desde five?
Jfafive,Puedes tambien utlizar la clase de L. Gadaleta, funciona perfecta.[code:1fyk0chp] /*------------------------------------------------------------------------* ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Ûݳ ³ Ûݳ ProcName&#46;&#46;&#46;&#46;&#46;&#46;&#58; Scanner&#46;prg ³ Ûݳ Pourpose&#46;&#46;&#46;&#46;&#46;&#46;&#58; TWAIN standard device Class interface ³ Ûݳ Date&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#58; 05-11-96 ³ Ûݳ Author&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#58; &#40;c&#41;,L&#46;Gadaleta ³ Ûݳ ³ ÛÝÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ *------------------------------------------------------------------------*/ #include "FiveWin&#46;ch" #include "Image&#46;ch" #define STAND_ALONE #define TWAIN_DLL "EZTw32&#46;dll" #define CBM_INIT 4 // for freeimage&#46;dll #define DIB_RGB_COLORS 0 // for freeimage&#46;dll STATIC oWnd, oImage STATIC hLib // for freeimage&#46;dll #ifdef STAND_ALONE FUNCTION ScanID&#40;cFileRes, nInt&#41; LOCAL cFile, nRes, n cFile &#58;= cFileRes nRes &#58;= 100 if !cFileRes == NIL if &#40; n&#58;=AT&#40;",",cFileRes&#41; &#41; > 0 cFile &#58;= Alltrim&#40;Substr&#40;cFileRes,1,n-1&#41;&#41; nRes &#58;= Val&#40;Alltrim&#40;Substr&#40;cFileRes,n+1&#41;&#41;&#41; end end CursorWait&#40;&#41; DEFINE WINDOW oWnd FROM 1,1 TO 1,1 ACTIVATE WINDOW oWnd ON INIT &#40;oWnd&#58;Hide&#40;&#41;, ; RunScan&#40;cFile,oWnd&#58;hWnd,nRes&#41;&#41; if file&#40; cFile &#41; SaveImage&#40; cFile &#41; end CursorArrow&#40;&#41; RETURN NIL STATIC FUNCTION RunScan&#40;cFile,hWnd,nRes&#41; LOCAL oScanner &#58;= Scanner&#40;&#41;&#58;New&#40;hWnd&#41; DEFAULT nRes &#58;= 100 // Scanner resolution in Dpi nRes &#58;= 100 oScanner&#58;Choose&#40;&#41; oScanner&#58;Set&#40;&#46;T&#46;&#41; // Set User Interface Off oScanner&#58;DigiToFile&#40;cFile,nRes&#41; // Acquires //oScanner&#58;DigiToClip&#40;&#41; oScanner&#58;End&#40;&#41; oWnd&#58;End&#40;&#41; RETURN NIL #endif CLASS Scanner DATA hWnd AS NUMERIC // Handle of the window DATA hDll AS NUMERIC // Handle of the DLL DATA lLoad AS LOGICAL // &#46;T&#46; DLL & Driver Loaded DATA hDib AS NUMERIC // Current Dib handle * METHOD New&#40;&#41; CONSTRUCTOR METHOD End&#40;&#41; METHOD Set&#40;&#41; // Acquiring Dialog ON/OFF METHOD Choose&#40;&#41; // Select Image Device Source METHOD DigiToFile&#40;&#41; // Acquire Image and save to a file METHOD DigiToClip&#40;&#41; // Acquire Image and copy to ClipBoard METHOD SetResolution&#40;&#41; // Set Dpi for the scanner * PROTECTED &#58; METHOD Free&#40;&#41; // Release Dib's handle METHOD IsActive&#40;&#41; // Twain Driver Loaded METHOD Register&#40;&#41; // Register my application into Twain application METHOD DibToFile&#40;&#41; // Write to file Dib's handle in BMP format END CLASS METHOD New&#40;hWnd&#41; // Constructor &#58;&#58;hWnd &#58;= iif&#40; ValType&#40; hWnd &#41; == "N" , hWnd , 0 &#41; &#58;&#58;lLoad &#58;= &#46;T&#46; //msginfo&#40;&#58;&#58;hDLL&#41; &#58;&#58;hDLL &#58;= LoadLibrary&#40; TWAIN_DLL &#41; &#58;&#58;hDib &#58;= 0 if &#58;&#58;hDll <= 21 &#58;&#58;lLoad &#58;= &#46;F&#46; MsgAlert&#40; BuildError&#40;&#58;&#58;hDll&#41; , TWAIN_DLL &#41; RETU Self end if &#40; &#58;&#58;lLoad &#58;= &#58;&#58;IsActive&#40;&#41; &#41; &#58;&#58;Register&#40;&#41; end RETU Self METHOD End&#40;&#41; // Destructor if &#58;&#58;hDib != 0 &#58;&#58;Free&#40; &#58;&#58;hDib &#41; end FreeLibrary&#40; &#58;&#58;hDll &#41; RETU NIL METHOD DigiToFile&#40; cFile , nRes &#41; // Acquire Document & save to file LOCAL nPixType &#58;= 0 LOCAL cFarProc DEFAULT nRes &#58;= 100 nRes &#58;= 100 &#58;&#58;SetResolution&#40; nRes &#41; if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_AcquireNative",&#46;T&#46;, WORD,WORD,_INT &#41; &#58;&#58;hDib &#58;= CallDLL&#40; cFarProc,&#58;&#58;hWnd,nPixType &#41; if &#58;&#58;hDib == 0 MsgInfo&#40;"Cannot Load Image, Scanner not found",""&#41; else &#58;&#58;DibToFile&#40;&#58;&#58;hDib,cFile&#41; &#58;&#58;Free&#40; &#58;&#58;hDib &#41; end end RETU Self METHOD DigiToClip&#40;&#41; // Acquire document & copy to ClipBoard LOCAL nPixType &#58;= 0 LOCAL cFarProc LOCAL nResult nRes &#58;= 100 &#58;&#58;SetResolution&#40; nRes &#41; if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_AcquireToClipBoard",&#46;T&#46;, _INT,WORD,_INT &#41; nResult &#58;= CallDLL&#40; cFarProc,&#58;&#58;hWnd,nPixType &#41; end RETU Self METHOD SetResolution&#40; nDpi &#41; // NEW LOCAL cFarProc LOCAL uResult DEFAULT nDpi &#58;= 100 nDpi &#58;= 100 if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_SetResolution",&#46;T&#46;, VOID,_DOUBLE &#41; uResult &#58;= CallDLL&#40; cFarProc,nDpi &#41; end RETU Self METHOD Set&#40;lShow&#41; // Show-Hide Scanner's Dialog Box LOCAL nHide &#58;= 0 // Default&#58; Shows Scanner's Dialog Box LOCAL cFarProc LOCAL uResult DEFAULT lShow &#58;= &#46;T&#46; if &#58;&#58;lLoad nHide &#58;= iif&#40;lShow,0,1&#41; cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_SetHideUI",&#46;T&#46;, VOID,_INT &#41; uResult &#58;= CallDLL&#40; cFarProc,nHide &#41; end RETU Self METHOD Choose&#40;&#41; // Select Image Device Source LOCAL cFarProc LOCAL nResult if &#58;&#58;lLoad cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_SelectImageSource",&#46;T&#46;, _INT,WORD &#41; nResult &#58;= CallDLL&#40; cFarProc,&#58;&#58;hWnd &#41; end RETU Self //----------------------------------------- //---------- Protected Methods METHOD Free&#40;hDib&#41; // Release Dib's Handle LOCAL cFarProc LOCAL uResult cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_FreeNative",&#46;T&#46;, VOID,WORD &#41; uResult &#58;= CallDLL&#40; cFarProc,hDib &#41; RETU NIL METHOD DibToFile&#40;hDib,cFile&#41; // Write to File From DIB's handle LOCAL cFarProc LOCAL nResult LOCAL lRet cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_WriteNativeToFilename",&#46;T&#46;, _INT,WORD,LPSTR&#41; lRet &#58;= &#40; &#40;nResult&#58;=CallDLL&#40; cFarProc,hDib,cFile &#41;&#41;==0 &#41; DO CASE CASE nResult == -1 MsgInfo&#40;"Annullato dall'utente","File non registrato"&#41; CASE nResult == -2 MsgInfo&#40;"Errore durante la scrittura sul file "+cFile,"File non registrato"&#41; CASE nResult == -3 MsgInfo&#40;"Errore interno sul file DIB","File non registrato"&#41; CASE nResult == -4 MsgInfo&#40;"Errore durante la scrittura sul file "+cFile+", probabile spazio insufficiente sul disco !","File non registrato"&#41; ENDCASE RETU lRet METHOD IsActive&#40;&#41; // Is Twain driver loaded ? LOCAL cFarProc LOCAL nResult cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_IsAvailable",&#46;T&#46;, _INT &#41; if ! &#40;nResult &#58;= CallDLL&#40; cFarProc &#41;&#41; == 1 MsgAlert&#40;"Nessun driver per apparecchi TWAIN compatibili risulta disponibile !","Errore hardware"&#41; // Messaggio inviato direttamente da TWAIN&#46;DLL end RETU iif&#40;nResult==1,&#46;T&#46;,&#46;F&#46;&#41; METHOD Register&#40;&#41; // Register my application into Twain application LOCAL nMaiorNum &#58;= 1 LOCAL nMinorNum &#58;= 0 // Result -> 1&#46;0 LOCAL nLanguage &#58;= 0 LOCAL nCountry &#58;= 0 LOCAL cVersion &#58;= "1&#46;0" LOCAL cManifact &#58;= "The Genius" LOCAL cFamily &#58;= "Digitizer" LOCAL cProduct &#58;= StrTran&#40;cFileName&#40;GetModuleFileName&#40;GetInstance&#40;&#41;&#41;&#41;,"&#46;EXE",""&#41; LOCAL cFarProc LOCAL uResult cFarProc &#58;= GetProcAddress&#40; &#58;&#58;hDLL, "TWAIN_RegisterApp",&#46;T&#46;,; VOID,_INT,_INT,_INT,_INT,LPSTR,LPSTR,LPSTR,LPSTR &#41; uResult &#58;= CallDLL&#40; cFarProc,nMaiorNum,nMinorNum,nLanguage,nCountry,cVersion,cManifact,cFamily,cProduct &#41; RETU NIL //---------- END Protected Methods STATIC FUNCTION BuildError&#40;nError&#41; LOCAL cRet &#58;= "Errore nella libreria dinamica" DO CASE CASE nError == 0 cRet &#58;= "Memoria insufficiente ad eseguire il programma" CASE nError == 2 cRet &#58;= "File non trovato" CASE nError == 3 cRet &#58;= "Percorso non trovato" CASE nError == 5 cRet &#58;= "Tentantivo di collegarsi dinamicamente ad un task o errore di condivisione" CASE nError == 6 cRet &#58;= "La libreria richiede un segemento separato per ogni task" CASE nError == 8 cRet &#58;= "Memoria insufficiente ad avviare l'applicazione" CASE nError == 10 cRet &#58;= "Versione di MS Windows non corretta" CASE nError == 11 cRet &#58;= "Libreria non valida oppure non Š un'applicazione MS Windows" CASE nError == 12 cRet &#58;= "Applicazione disegnata per un sistema operativo diverso" CASE nError == 13 cRet &#58;= "Applicazione disegnata per MS-DOS 4&#46;0" CASE nError == 14 cRet &#58;= "Tipo di file eseguibile sconosciuto" CASE nError == 15 cRet &#58;= "Tentativo di caricare un'applicazione disegnata per funzionare in modalit… reale" CASE nError == 16 cRet &#58;= "Tentativo di caricare una seconda istanza dell'applicazione contenente segmenti di dati multipli non marcati per la sola lettura" ENDCASE RETU OemToAnsi&#40; cRet + "!" &#41; //------------------ Freeimage&#46;dll ------------------------// FUNCTION SaveImage&#40; cFile &#41; LOCAL nFormat, hDib, hInfoH, hInfo, hBits, hWnd, hDC, hBmp, lOk #ifdef __CLIPPER__ hLib = LOADLIB32&#40; "freeimage&#46;dll" &#41; #else hLib = LOADLIBRARY&#40; "freeimage&#46;dll" &#41; #endif if hLib <= 32 MsgStop&#40; "Cannot load FreeImage&#46;dll" &#41; return 0 endif nFormat &#58;= FIGETFILETYPE&#40; cFile, 0 &#41; hDib &#58;= FILOAD&#40; nFormat, cFile, 0 &#41; hInfoH &#58;= FIGETINFOHEADER&#40; hDib &#41; hInfo &#58;= FIGETINFO&#40; hDib &#41; hBits &#58;= FIGETBITS&#40; hDib &#41; hWnd &#58;= GETDESKTOPWINDOW&#40;&#41; #ifdef __CLIPPER__ hDC = GETDC32&#40; hWnd &#41; #else hDC = GETDC&#40; hWnd &#41; #endif lOk &#58;= fiSave&#40; 2 , hDib, cFile &#41; hBmp = CREATEDIBITMAP&#40; hDC, hInfoH, CBM_INIT, hBits, hInfo, DIB_RGB_COLORS &#41; #ifdef __CLIPPER__ RELEASEDC32&#40; hWnd, hDC &#41; #else RELEASEDC&#40; hWnd, hDC &#41; #endif FIUNLOAD&#40; hDib &#41; #ifdef __CLIPPER__ FREELIB32&#40; hLib &#41; #else FREELIBRARY&#40; hLib &#41; #endif RETURN hBmp DLL32 STATIC FUNCTION FIGETFILETYPE&#40; cFileName AS LPSTR, nSize AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetFileType@8" LIB hLib DLL32 STATIC FUNCTION FILOAD&#40; nFormat AS LONG, cFileName AS LPSTR, nFlags AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_Load@12" LIB hLib DLL32 STATIC FUNCTION FIUNLOAD&#40; hDib AS LONG &#41; AS VOID; PASCAL FROM "_FreeImage_Unload@4" LIB hLib DLL32 STATIC FUNCTION FIGETINFOHEADER&#40; hDib AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetInfoHeader@4" LIB hLib DLL32 STATIC FUNCTION FIGETINFO&#40; hDib AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetInfo@4" LIB hLib DLL32 STATIC FUNCTION FIGETBITS&#40; hDib AS LONG &#41; AS LONG; PASCAL FROM "_FreeImage_GetBits@4" LIB hLib DLL32 STATIC FUNCTION FISAVE&#40; nFormat AS LONG, hDib AS LONG, cFileName AS LPSTR, nFlags AS LONG &#41; AS BOOL; PASCAL FROM "_FreeImage_Save@16" LIB hLib DLL32 STATIC FUNCTION FIROTATE&#40; hDib AS LONG, nAngle AS _DOUBLE &#41; AS LONG; PASCAL FROM "_FreeImage_RotateClassic@12" LIB hLib DLL32 STATIC FUNCTION GETDC32&#40; hWnd AS LONG &#41; AS LONG; PASCAL FROM "GetDC" LIB "user32&#46;dll" DLL32 STATIC FUNCTION RELEASEDC32&#40; hWnd AS LONG &#41; AS LONG; PASCAL FROM "ReleaseDC" LIB "user32&#46;dll" DLL32 STATIC FUNCTION CREATEDIBITMAP&#40; hDC AS LONG, hInfoH AS LONG, nFlags AS LONG, hBits AS LONG, hInfo AS LONG, nUsage AS LONG &#41; AS LONG; PASCAL FROM "CreateDIBitmap" LIB "gdi32&#46;dll" DLL32 FUNCTION WOWHANDLE16&#40; nHandle AS LONG, nHandleType AS LONG &#41; AS LONG; PASCAL FROM "WOWHandle16" LIB "wow32&#46;dll" //Declare Function TWAIN_AcquireToClipboard Lib "EZTW32&#46;DLL" Alias "TWAIN_AcquireToClipboard" _ // &#40; ByVal hwndApp as Long, ByVal wPixTypes as Dword &#41; as Long DLL32 FUNCTION TWAIN_AcquireToClipboard &#40;hwndApp As LONG, wPixTypes as CHAR &#41;; AS LONG PASCAL FROM TWAIN_AcquireToClipboard Lib "EZTW32&#46;DLL" /* ' Like AcquireNative, but puts the resulting image, if any, into the system ' clipboard&#46; Under Windows, this will put a CF_DIB item in the clipboard ' if successful&#46; If this call fails, the clipboard is either empty or ' contains the old contents&#46; ' A return value of 1 indicates success, 0 indicates failure&#46; ' ' Useful for environments like Visual Basic where it is hard to make direct ' use of a DIB handle&#46; In fact, TWAIN_AcquireToClipboard uses ' TWAIN_AcquireNative for all the hard work&#46; */ [/code:1fyk0chp]
¿Se puede escanear documentos desde five?
Ok, voy a compilarlo y a ver que resultado me dá.Ya te comento.Gracias George, <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
¿Se puede escanear documentos desde five?
Hola George,Gracias, ya probé el metodo DigiToFile(...) y funcionó bien.Pero he visto que por defecto, invoca al software que trae instalado el scaner. ¿hay alguna forma de evitar que llame al software del escaner para mostrar el escaneado? Lo que quiero es hacerme mi propio soft de escaneo en five y así no depender del software que trae el escaner.Un saludo <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
¿Se puede escanear documentos desde five?
Hola de nuevo!Por cierto, ¿alguien sabe si se puede escanear directamente a PDF?Estoy usando la clase TScan de L.Gadaleta. <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
¿Se puede escanear documentos desde five?
HolaEstoy intentando compilar la clase de L.Gadeta que habeis posteado, y me da los siguientes warnings[list:2g7tc2o2] C:\NUEVAS_CLASES\Tscan32\SAMPLES\Scanner\scanner.prg(149) Warning W0001 Ambiguous reference: 'NRES' C:\NUEVAS_CLASES\Tscan32\SAMPLES\Scanner\scanner.prg(150) Warning W0001 Ambiguous reference: 'NRES' C:\NUEVAS_CLASES\Tscan32\SAMPLES\Scanner\scanner.prg(380) Warning W0001 Ambiguous reference: 'TWAIN_ACQUIRETOCLIPBOARD' C:\NUEVAS_CLASES\Tscan32\SAMPLES\Scanner\scanner.prg(380) Warning W0001 Ambiguous reference: 'TWAIN_ACQUIRETOCLIPBOARD' [/list:u:2g7tc2o2]El primero, que hace referencia a nRes, supongo que es que no se ha declarado ésta variable en el método DigitoClip(), pero el segundo, el que hace referencia a 'TWAIN_ACQUIRETOCLIPBOARD' no se como se puede corregir.SaludosJose Luis
¿Se puede escanear documentos desde five?
Hola JoseLuis,Lo ciertyo es que a mí tambien me da esos Warnings. Pero de momento la estoy usando sin prestarles mucha atención.Siento no poder ayudarte.
¿Se puede escanear documentos desde five?
Con relacion a los "warnings" si declaran las variables no salen los warnings. De todo modos son solos "warnings" y no afectan la ejecucion de programa.Con relacion al formato PDF, pienso se podria usar un sofware externo convertidor (BMPtoPDF) y llamarlo desde tu programa.Otra opcion mejor, y es la yo uso ahora, es el OCX 'TwainControlX" de la empresa <!-- m --><a class="postlink" href="http://www.ciansoft.com/">http://www.ciansoft.com/</a><!-- m --> este trabaja perfecto y te permite salvar los graficos en formato PDF y mas. Ademas te permite scanear multiple paginas. Si lo quieren probar tienen un demo totalmente funcional en el website mas arriba mencionado.Saludos,George
¿Se puede escanear documentos desde five?
Jfafive,El metodo Choose() debe presentarte una lista de todos los scanners instalados en tu computador y te permite elegir el de tu agrado con el software asociado al mismo. En el caso de desarrollar tu propio programa (o clase) para escanear asociado a diferentes tipos de scanners, (lo cual es factible y de verdad que me gustaria verlo si tu nos lo quisiera mostrar), me supongo que deberia aparecer en la lista del metodo Choose(); pero no se como le haria para que llame tu software por "default".George
¿Se puede escanear documentos desde five?
Gracias por la información George <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
¿Se puede escanear documentos desde five?
George,el OCX 'TwainControlX' que usas...¿podrias pasarme un ejemplo de como lo invocas desde FWH?Ya que en la documentación solo hace referencia a ejemplos en VB o VBScript. <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
¿Se puede escanear documentos desde five?
[code:2xx4ujy1] FUNCTION ScanOCX2&#40;cFilename&#41; oScan &#58;= TOleAuto&#40;&#41;&#58;New&#40;"TwainControlX&#46;Twain"&#41; // Aqui va el OCX "demo" que tu bajaste del website oScan&#58;Password &#58;= "AQUI VA TU PASSWORD" // No lo necesitas en la version de evaluacion oScan&#58;SelectDevice&#40;&#41; oScan&#58;Acquire&#40;&#41; oScan&#58;SaveToFile&#40; cFileName &#41; RETURN &#40;&#46;T&#46;&#41; [/code:2xx4ujy1]George
¿Se puede escanear documentos desde five?
Por cierto,Si compras la versión, ¿puedes instalarla en mas de un puesto?¿o tienes que pagar cada vez que la instales en otro puesto?
¿Se puede escanear documentos desde five?
Gracias George,Por cierto, cuando compras la versión de pago¿la puedes instalar en mas de un puesto? o tienes que comprar una por cada puesto en que la instales.
¿Se puede escanear documentos desde five?
El Control, con todos sus componentes y para fines de desarrollo, solo lo puedes instalar en tu computador.El OCX, por otra parte, lo puede distribuir con tus aplicaciones e instalarlo (registrarlo) en las computadoras de tus clientes "royalty free".A proposito si ordenas el control indicale que tu usas "[x]Harbour Programming Language" y que te envien la version controlada por PASSWORD dentro del programa (como esta en el ejemplo mas arriba copiado).La version normal que ellos envian no trabaja con [x]Harbour cuando solo se registra el OCX en otra computadora a menos que instalen todos los componentes lo cual seria una violacion al uso de la licencia.En resumen el OCX es bien facil de usar y puedes instalar el mismo en los computadores de tus clientes sin necesidad de pagos extras.Saludos,George
¿Se puede escanear documentos desde five?
Me ha quedado muy clara tu explicación,Gracias una vez mas George.
¿Se puede escanear documentos desde five?
George,Estoy haciendo pruebas con TWainControlXTrial(ocx)Intento hacer que la aplicación se detenga cuando está escaneando, y una vez finalizado, prosiga su curso.Para ello, según el manual, he implementado un código de ejemplo:[code:3i6usfiz] function mainI&#40;&#41; &#46;&#46;&#46;&#46;&#46; oScan&#58;WaitForAcquire &#58;= &#46;t&#46; REDEFINE BUTTON oBtnScan ID ID_ESCANEAR OF oDlg ; ACTION &#40; oScan&#58;SelectDevice&#40;&#41;,; MsgInfo&#40; "antes" &#41;,; oScan&#58;Acquire&#40;&#41;,; MsgInfo&#40; "despues" &#41; &#41; return nil [/code:3i6usfiz]El problema es que una vez ha escaneado, que sí lo hace, no prosigue con el código. Es decir, no hace el MsgInfo( "despues" ).¿tienes alguna idea? <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
¿Se puede escanear documentos desde five?
Realmente no se que puede estar pasando ahi.Si te puedo decir que el soporte tecnico del Sr. Ian Chester, el desarrollador de esta clase, es de primera. Lo puedes contactar via email: <!-- e --><a href="mailto:ianc@ciansoft.com">ianc@ciansoft.com</a><!-- e -->El me ayudo para que esta clase pudiera trabajar con [x]Harbour.Saludos,George
¿Se puede exportar de Metafile a Excel?
¿Existe alguna clase o codigo corriente para hacerlo?Agradeceré mucho su ayuda.Francisco