topic
stringlengths
1
63
text
stringlengths
1
577k
Continuous Progress Bar Work in Xp dont work in 7
[code=fw:29h29nxo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> PBS_MARQUEE &nbsp;<span style="color: #000000;">8</span><br /><span style="color: #00D7D7;">#define</span> PBM_SETMARQUEE &nbsp;WM_USER + <span style="color: #000000;">10</span><br /><span style="color: #00D7D7;">#define</span> GWL_STYLE <span style="color: #000000;">-16</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">function</span> MsgRun<span style="color: #000000;">&#40;</span> cCaption, cTitle, bAction <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oDlg, oMeter, oText, oBtn, oFont<br /><span style="color: #00C800;">local</span> nVal := <span style="color: #000000;">90</span>, Result := .T., oTmr := <span style="color: #00C800;">NIL</span><br /><span style="color: #00C800;">local</span> nHeight<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nAumento := <span style="color: #000000;">1</span>, nLength := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;cCaption := AllTrim<span style="color: #000000;">&#40;</span>cCaption<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nLength := Len<span style="color: #000000;">&#40;</span>cCaption<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">While</span> nLength > <span style="color: #000000;">70</span> <span style="color: #B900B9;">// 60</span><br /><br />&nbsp; &nbsp; &nbsp; nAumento++<br />&nbsp; &nbsp; &nbsp; nLength -= <span style="color: #000000;">70</span> <span style="color: #B900B9;">// 60</span><br /><br />&nbsp; &nbsp;end<br /><br />&nbsp; &nbsp;nAumento += StrCharCount<span style="color: #000000;">&#40;</span>cCaption,CRLF<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> nAumento > <span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; nAumento--<br />&nbsp; &nbsp;end<br /><br />&nbsp; &nbsp;nHeight := &nbsp;<span style="color: #000000;">7</span> + <span style="color: #000000;">&#40;</span> nAumento + <span style="color: #000000;">0.5</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> bAction &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cCaption := <span style="color: #ff0000;">"Processando..."</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTitle &nbsp; := <span style="color: #ff0000;">"Por favor, aguarde..."</span><br /><br />&nbsp; &nbsp; cTitle := cTitle<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> &nbsp; &nbsp; &nbsp;oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">NAME</span> &nbsp; &nbsp; &nbsp;GetSysFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">0</span>, <span style="color: #000000;">-8</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> &nbsp; &nbsp;oDlg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">5</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">TO</span> &nbsp;nHeight, <span style="color: #000000;">55</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> &nbsp; &nbsp;cTitle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FONT</span> &nbsp; &nbsp; oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">Timer</span> &nbsp; &nbsp; oTmr &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Of</span> &nbsp; &nbsp; &nbsp; &nbsp;oWnd&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">Interval</span> &nbsp;<span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Action</span> &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>SetWindowLong<span style="color: #000000;">&#40;</span>oMeter:<span style="color: #000000;">hWnd</span>, GWL_STYLE, nOr<span style="color: #000000;">&#40;</span> GetWindowLong<span style="color: #000000;">&#40;</span>oMeter:<span style="color: #000000;">hWnd</span>, GWL_STYLE<span style="color: #000000;">&#41;</span>, PBS_MARQUEE <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0.2</span>, <span style="color: #000000;">0.5</span> <span style="color: #0000ff;">SAY</span> &nbsp; &nbsp; &nbsp; oText;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VAR</span> &nbsp; &nbsp; &nbsp; cCaption;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">190</span>, <span style="color: #000000;">10</span>+<span style="color: #000000;">&#40;</span>nAumento*<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> &nbsp; &nbsp; &nbsp; &nbsp;oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0.4</span>+<span style="color: #000000;">&#40;</span>nAumento*<span style="color: #000000;">0.45</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0.7</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROGRESS</span> &nbsp;oMeter;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;POSITION &nbsp;nVal;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">190</span>,<span style="color: #000000;">10</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">OF</span> &nbsp; &nbsp; &nbsp; &nbsp;oDlg<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bStart</span> = <span style="color: #000000;">&#123;</span> || oTmr:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">Pause</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0.1</span><span style="color: #000000;">&#41;</span>, Result := Eval<span style="color: #000000;">&#40;</span> bAction<span style="color: #000000;">&#41;</span> , <span style="color: #00C800;">Pause</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0.1</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> &nbsp; oDlg &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">CENTERED</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> &nbsp;<span style="color: #000000;">&#40;</span>SendMessage<span style="color: #000000;">&#40;</span>oMeter:<span style="color: #000000;">hwnd</span>, PBM_SETMARQUEE, .T. , <span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMeter:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oTmr:<span style="color: #000000;">Deactivate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oTmr:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oTmr:= <span style="color: #00C800;">NIL</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> Result<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:29h29nxo]
Contour points
Hi, A closed contour(polygon) is drawn on the window (for example, blue). I need to get a list of coordinates of points of this contour. How to do it ?
Contrib harbour
Hola, Llevo ya mas de un día intentando encontrar en algún sitio la última versión de harbour y sus contribuciones. En la pagina, el ftp esta... , vamos no esta. El cvs es un infierno, si entras por http te lo tienes que descargar de uno en uno. Si entras con el cvs.exe a descargartelos por el nombre del módulo... con Tortoise no es mucho mejor. ¿Que puedo hacer para tener el último Harbour montado y las contribuciones con sus librerias montadas. Porque tambien es otro infierno el intentar construir hbzip.lib... <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> Un saludo
Contrib harbour
al final vamos a tener que tener en consideración el pasarnos a xHarbour, enfin...
Contrib harbour
Paco, En <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=2486">http://fivetechsoft.com/forums/viewtopic.php?t=2486</a><!-- m --> (sección "whatsnew" de estos foros) nosotros vamos publicando las versiones más recientes, probadas y estables.
Contrib harbour
¿incluye las contribuciones? Te lo digo porque no puedo comprobarlo desde el trabajo. No permiten descargar de hiperupload, no se porque
Contrib harbour
Gracias por estos enlaces pero lo que realmente necesito es hbzip.lib que esta en las contribuciones.
Contrib harbour
[quote="Paco Garcia":1nrcuzpx]Gracias por estos enlaces pero lo que realmente necesito es hbzip.lib que esta en las contribuciones.[/quote:1nrcuzpx] Paco, no estoy seguro, pero me parece que hbzlib solamente existe en xHarbour, y ademas, es una puta locura usar esta libreria fuera de los compiladores de MSV o Borland C. No se, pero seria interesante dotarse de otra libreria, como zlib, que creo que es LGPL. Yo estoy parado tambien por la culpa de esta libreria con Mingw, que dicen que funciona, pero yo he sido INCAPAZ de que funcione. Ademas, los de xHarbour.com, le da por cambiar el nombre a las cosas , y aunque COMERCIALMENTE se llama ziparchive, tiene los nombres diferentes, pero no deja de ser la hbzlib, alucinante, pero cierto. El motivo lo desconozco, pero... de momento... Y si, yo me pase a xHarbour por el tema de que hay mas contribuciones y soluciones a nuestros problemas, porque , no solamente del compilador vive la gente, hay muchas cosas alrededor que hace que valga la pena usar xHarbour, con Harbour, eso si, tendras un bonito compilador, pero nada mas. ( y mira que hasta hace muy poquito usaba Harbour ), pero me meti con sockets y demas historias, y el unico que me lo proporciona es xHarbour DIRECTAMENTE y multiplataforma, que era lo que necesitaba.
Contribucion al Foro
Buenos días Foro. durante este ultimo tiempo he estado desarrollando sobre Bases heredadas del tipo Base.mdb y en consecuencia he desarrollado varios módulos para agilizar la tarea. Estas funciones están a disposición del foro para quien crea que le puedan ser útil. mi correo particular es <!-- e --><a href="mailto:jcbellucci@cmdo.com.gov">jcbellucci@cmdo.com.gov</a><!-- e --> y <!-- e --><a href="mailto:juanca252@yahoo.com.ar">juanca252@yahoo.com.ar</a><!-- e --> para los que no usan correos privados. Entre los módulos hay funciones como. abrir, cerrar tablas, seleccionar y buscar registros, posicionarse etc, ademas uso en todos los casos arreglos de memoria para poder trabajar en red y hacer que los sistemas sean mas livianos. Esta experiencia esta hecha en un sistema gubernamental que trabaja con 250 pcs en red ...... Esta es una forma de darle al foro un granito de arena por todo lo que el foro ha hecho por mi. desde ya como siempre muchas gracias por estar cuando mas se lo precisa. desde argentina Ing. Bellucci Juan Carlos.
Contribucion al Foro
Juan Carlos, Lo idóneo sería que copies aqui el código que desees compartir, asi queda a disposición de todos. Gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Contribución al foro experiencia sobre Bases.mdb
//////////////////////////////////////////////////////////////////////////// // // // Modulo_____: Principal // // Autor______: Ing.Bellucci Juan Carlos // // Bases______: Acces xxx.mdb // // Tipo_______: Orientado a Objetos // // // //////////////////////////////////////////////////////////////////////////// #Include "Fivewin.ch" #Include "Ado.ch" #include 'FILEIO.CH' Static oCone ////////////////////////////////////////////////////////////////// // Ejemplo de uso ////////////////////////////////////////////////////////////////// // xBase = nombre de su base de datos que elija // CreaBases("xBase") // se creara una base.mdb de datos en la carpeta data // Si se trata de una base que tiene pasword // // oCone = Conexion tipo dsn para la base // AbreBase funcion de 2 parametros // 1 = nombre de la base // 2 = clave de no existir colocar "" // oCone := AbreBase("Caja","rm1952" ) // Una vez abierta la base se crean todas las tablas que desee pero // en forma individual obvio // CreaArticulos( oCone ) // creamos la tabla de articulos // Esta funcion ademas permite abrir una base existente y agregar o // borrar tablas. solo hay que colocar la base en la carpeta data. // agregar al su sistema el modulo funci.c de libre distribucion. //--------------------------------------------------------------------------// // Method Principal( ) //--------------------------------------------------------------------------// Function Main() Local Clave := "su_clave" Local cBase := "Archivo" Local Data1 ///////////////////////////////////////////////////////// // Primer paso Crear la Base ///////////////////////////////////////////////////////// CrearLaBase(cBase) // esta funcion crea la base si no existe ///////////////////////////////////////////////////////// // Segundo paso Abrir la Base para su uso ///////////////////////////////////////////////////////// oCone := AbreBase(cBase,Clave ) If Empty( oCone ) MsgAlert(" No se Pudo Abrir la Base de Datos..."," Error ") Return( Nil ) EndIf ///////////////////////////////////////////////////////// // Tercer Crear las tablas para su uso ///////////////////////////////////////////////////////// CreaArticulos( oCone ) // aqui puede poner todas tablas // que desea crear. ///////////////////////////////////////////////////////// // Cuarto paso Abrir la tabla para su uso ///////////////////////////////////////////////////////// Data1 := Usar(oCone,"Select * from Articulos where "+; "Borrado <> 'S' Order by Articulo ;" If !Empty( Data1 ) xBrowse( Data1 ) Data1:Close() EndIf ///////////////////////////////////////////////////////// // Quinto Cierre la Conexion ///////////////////////////////////////////////////////// oCone:Close() // al finalizar el programa ///////////////////////////////////////////////////////// Return( Nil ) //--------------------------------------------------------------------------// //--------------------------------------------------------------------------// // Method CreaArticulos( oCone ) //--------------------------------------------------------------------------// Static Function CreaArticulos( oCone ) Local Data1 Local oError Data1:=tOleAuto():New("ADODB.RecordSet") Data1:CursorLocation := adUseClient Data1:CursorType := adOpenDynamic Data1:LockType := adLockOptimistic Data1:ActiveConnection := oCone Data1:Source := "CREATE TABLE ARTICULOS(" + ; " Registro COUNTER, " + ; " Articulo TEXT(100), " + ; " Fecha DATE, " + ; " Descripcion TEXT(100)," + ; " Marca TEXT(50), " + ; " Color TEXT(50), " + ; " Cantidad SINGLE, " + ; " Bajas SINGLE, " + ; " Valor SINGLE, " + ; " Proveedor TEXT(100), " + ; " Rubro TEXT(30), " + ; " Borrado TEXT(1), " + ; " Operador TEXT(30), " + ; " OFecha DATE, " + ; " OHora TEXT(5) )" TRY Data1:Open() CATCH oError Return( "" ) // Solo si Hay error END //-------------------// Return( Nil ) //--------------------------------------------------------------------------// // Esta Informacion esta a disposicion del foro de Fivewin. // en agradecimiento a la gente de Fivetech que tanto hace por nosotros. // Desde Argentina Buenos Aires Ciudad de Escobar Juan Carlos. //--------------------------------------------------------------------------// ///////////////////////////////////////////////////////////////////////////////////////////////////////// // este es el modulo funci.prg que debe ser compilado por separado. ///////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// // // // Modulo_____: Funci.prg // // Autor______: Bellucci Juan Carlos // // Bases______: Acces xxx.mdb // // Tipo_______: Orientado a Objetos // // // //////////////////////////////////////////////////////////////////////////// #Include "Fivewin.ch" #Include "Ado.ch" #include 'FILEIO.CH' //--------------------------------------------------------------------------// // Este Modulo debe compilarse tal como esta he incluir en el proyecto //--------------------------------------------------------------------------// //--------------------------------------------------------------------------// //--------------------------------------------------------------------------// // Crea Base de Datos //--------------------------------------------------------------------------// Function CreaBases(cBase) Local oCatalog Local oTable Local oColumn Local oKey cBase := Alltrim(cBase)+".mdb" lMKDir("Data") If !File(".\Data\"+cBase) oCataLog := CreateObject("ADOX.Catalog") oCataLog:Create("Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type = 4 ;Data Source=.\Data\"+cBase) EndIf Return( nil ) //--------------------------------------------------------------------------// // Method Abre base de datos //--------------------------------------------------------------------------// Function AbreBase( cBase, cPass ) Local oBase Local oErr cBase := ".\Data\"+Alltrim(cBase)+".mdb" If !File(cBase) MsgStop("Ha Ocurrido Un Error...No Se Esta La Base de Datos..."," Error " ) Return(Nil) EndIf Try oBase := CreateObject( "ADODB.Connection" ) oBase:ConnectionString := "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+cBase+";Pwd=" + cPass oBase:Open() CATCH oErr MsgAlert(" No se Pudo Establecer la Conexion Con La Base De Datos..","Atencion") Return(Nil) END Return( oBase ) //--------------------------------------------------------------------------// // Method AbreTabla() //--------------------------------------------------------------------------// Function Usar(oCone,Consulta) Local xData,oError //--------------------------------------------------------------// xData:=tOleAuto():New("ADODB.RecordSet") xData:CursorLocation := adUseClient xData:CursorType := adOpenDynamic xData:LockType := adLockPessimistic xData:ActiveConnection := oCone xData:Source := Consulta //--------------------------------------------------------------// TRY xData:Open() CATCH oError Return(Nil) END //--------------------------------------------------------------// Return( xData ) //--------------------------------------------------------------------------// //Method Ir Al Primer Registro //--------------------------------------------------------------------------// Function Primero(oData) If oData:RecordCount > 0 oData:MoveFirst() EndIf Return( oData ) //--------------------------------------------------------------------------// // Method Ir Al Registro Anterior //--------------------------------------------------------------------------// Function Anterior(oData) If oData:RecordCount > 0 oData:MovePrevious() If oData:Bof() oData:MoveFirst() EndIf EndIf Return( oData ) //--------------------------------------------------------------------------// // Method Ir Al Registro Siguiente //--------------------------------------------------------------------------// Function Siguiente(oData) If oData:RecordCount > 0 oData:MoveNext() If oData:Eof() oData:MoveLast() EndIf EndIf Return( oData ) //--------------------------------------------------------------------------// // Method Ir Al Ultimo Registro //--------------------------------------------------------------------------// Function Ultimo(oData) If oData:RecordCount > 0 oData:MoveLast() EndIf Return( oData ) //--------------------------------------------------------------------------//
Contribución al foro experiencia sobre Bases.mdb
ola juan carlos pregunta tonta... microsoft access necesita tener instalado? es más rápido que los DBFs? gracias
Contribución al foro experiencia sobre Bases.mdb
No es necesario tener instalado acces... si es necesario tener instalado ODBC Normalmente esta instalado con el paquete windows. el tema de velocidad depende de la maquina y o el tipo de redes donde corra de todas maneras ado en mas rapido.
Contribución al foro experiencia sobre Bases.mdb
En la próxima entrega : agregar - borrar - modificar y trabajar con xbrowse de manera segura usando un arreglo de memoria.
Contribución al foro experiencia sobre Bases.mdb
No teste que fiz aqui eu consigo conectar com o BD mas o "select * from table" sempre retorna vazio sendo que tenho 44332 registros o que pode ser ??
Contribution to Forum : new TTOOLTIP CLASS
Dear Friends, This last week of August, I thought how could I create a class that would show a tooltip with 3 parts: a header, a footer and a message to the possibility in the future to include a picture, I took the cue from the class Super tooltips DoNEtTcomponents (http : / / <!-- m --><a class="postlink" href="http://www.devcomponents.com">http://www.devcomponents.com</a><!-- m --> / dotnetbar / SuperTooltips.aspx) I think thi class could run ok if there is a CLASSDATA on WIndows CLASS called otooltip on ttoltip class see the line // ::oWnd:oToolTip := Self where oWnd is the control where we want show the tooltip I see this otooltip is only a static value now , but I think Antonio make it for speed!! Now I use this class simply on bMMoved action then we can insert it as tooltip system I not know how insert Balloons tooltip But I think Antonio found the solution for it we can set the size of tooltip and the timer for now and insert an header, an footer, an message if not therea re not headers and footer it show only the message as the tooltip system [img:2qigvdjy]http&#58;//img685&#46;imageshack&#46;us/img685/3997/supertooltip&#46;png[/img:2qigvdjy] this is the test.prg [code=fw:2qigvdjy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> CLRTEXTBACK         RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">113</span>, <span style="color: #000000;">106</span>, <span style="color: #000000;">183</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#define</span> COLOR_GRAYTEXT       <span style="color: #000000;">17</span><br /><span style="color: #00D7D7;">#define</span> DEFAULT_GUI_FONT     <span style="color: #000000;">17</span><br /><br /><span style="color: #00D7D7;">#define</span> CS_DROPSHADOW       0x00020000<br /><span style="color: #00D7D7;">#define</span> GCL_STYLE           <span style="color: #000000;">&#40;</span><span style="color: #000000;">-26</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">fUNCTION</span> TEST <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Local</span> oDlg,oBtn<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIze</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span><br /><br /><br />@ <span style="color: #000000;">1</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TEST"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />oBtn:<span style="color: #000000;">cTooltip</span>:= <span style="color: #00C800;">NIL</span><br /><br />          oToolTip := TTooltip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>oBtn<span style="color: #000000;">&#41;</span><br /><br />          cMessage :=<span style="color: #ff0000;">"This is a Super Tooltip for Fivewin Power"</span>+CRLF+CRLF+CRLF+;<br />                     <span style="color: #ff0000;">"This is also on Beta Test"</span> +CRLF+CRLF+CRLF+;<br />                     <span style="color: #ff0000;">" SuperTooltip with Image (on Future)"</span><br />          cHeader := <span style="color: #ff0000;">"Header Super Tooltip"</span><br />          cFooter := <span style="color: #ff0000;">"Press F1 for more Help "</span><br /><br />        *  oToolTip:<span style="color: #000000;">nHeightTip</span> :=<span style="color: #000000;">300</span><br />        *  oToolTip:<span style="color: #000000;">nWidthTip</span>  :=<span style="color: #000000;">300</span><br />          oToolTip:<span style="color: #000000;">nTimer</span>     :=<span style="color: #000000;">1000</span><br /><br /><br /><br />          <span style="color: #B900B9;">// With header , message and footer </span><br />            oBtn:<span style="color: #000000;">bMMoved</span> := <span style="color: #000000;">&#123;</span> || oToolTip:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">ntop</span> - <span style="color: #000000;">6</span>, oBtn:<span style="color: #000000;">nLeft</span> - <span style="color: #000000;">6</span>, cHeader, oBtn,cFooter, cMessage <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>  <span style="color: #B900B9;">// rem this for try </span><br /><br />           <span style="color: #B900B9;">// With header , message   rem this for try </span><br />         <span style="color: #B900B9;">// oBtn:bMMoved := { || oToolTip:Show( oBtn:ntop - 6, oBtn:nLeft - 6, cHeader, oBtn,, cMessage ) }    // rem this for try </span><br /><br />        <span style="color: #B900B9;">// with only a message</span><br />       <span style="color: #B900B9;">//  oBtn:bMMoved := { || oToolTip:Show( oBtn:ntop - 6, oBtn:nLeft - 6, , oBtn,, cMessage ) }       // rem this for try </span><br /><br /><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDLg<br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2qigvdjy] this the class [b:2qigvdjy]TToltip .prg[/b:2qigvdjy] [code=fw:2qigvdjy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">CLASS</span> TTooltip <span style="color: #0000ff;">FROM</span> TWindow<br /><br /><br />      <span style="color: #00C800;">DATA</span> nHeightRow<br />      <span style="color: #00C800;">DATA</span> oTimer, nTimer<br /><br />      <span style="color: #00C800;">DATA</span> oToolTip<br />      <span style="color: #00C800;">DATA</span> nHeightTip,nWidthTip<br />      <span style="color: #00C800;">DATA</span> nColorTooltip<br />      <span style="color: #00C800;">DATA</span> cImage<br /><br />      <span style="color: #00C800;">DATA</span> cHeader<br />      <span style="color: #00C800;">DATA</span> cMessage<br />      <span style="color: #00C800;">DATA</span> cFooter<br /><br /><br />      CLASSDATA lRegistered AS LOGICAL<br /><br />      <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWnd, nClrText, nClrPane, oFont,nHeightTip,nWidthTip,nTimer,nColorTooltip,cImage<span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />      <span style="color: #00C800;">METHOD</span> Hide<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lVisible</span> := .f., <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">METHOD</span> Show<span style="color: #000000;">&#40;</span> nRow, nCol, cHeader, oWnd,cFooter,cMessage <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">METHOD</span> Line<span style="color: #000000;">&#40;</span> hDC, nTop, nLeft, nBottom, nRight, nColor <span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">METHOD</span> CalcLen<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// calc the text width for simply tooltip</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oWnd, nClrText, nClrPane, oFont,nHeightTip,nWidthTip,nTimer,nColorTooltip,cImage <span style="color: #000000;">&#41;</span>   <span style="color: #00C800;">CLASS</span> TTooltip<br />         <span style="color: #00C800;">Local</span>  nWText<br /><br /><br />   <span style="color: #00C800;">DEFAULT</span> nClrText := CLR_BLACK,;<br />           nColorTooltip  := CLR_YELLOW ,;<br />           nClrPane := nColorTooltip,;<br />           nHeightTip:= <span style="color: #000000;">300</span> ,;<br />           nWidthTip := <span style="color: #000000;">300</span>,;<br />           nTimer    := <span style="color: #000000;">1000</span><br /><br />       ::<span style="color: #000000;">nTimer</span>        := nTimer<br />       ::<span style="color: #000000;">lVisible</span>      := .f.<br />       ::<span style="color: #000000;">oWnd</span>          := oWnd<br />       ::<span style="color: #000000;">nHeightTip</span>    := nHeightTip<br />       ::<span style="color: #000000;">nWidthTip</span>     := nWidthTip<br />       ::<span style="color: #000000;">nColorTooltip</span> := nColorTooltip<br />       ::<span style="color: #000000;">cImage</span>        := cImage<br /><br /><br /><br />      * ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oToolTip</span> := <span style="color: #00C800;">Self</span>    <span style="color: #B900B9;">//if there is  oToolTip     as class data   on window class</span><br /><br /><br /><br />      <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">oFont</span> <span style="color: #0000ff;">NAME</span> GetSysFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-8</span><br /><br /><br /><br /><br />       ::<span style="color: #000000;">nHeightRow</span>     := ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span> + <span style="color: #000000;">3</span><br /><br />       ::<span style="color: #000000;">nStyle</span>    := nOR<span style="color: #000000;">&#40;</span> WS_POPUP, WS_BORDER <span style="color: #000000;">&#41;</span><br /><br /><br />       ::<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> nClrText, nClrPane <span style="color: #000000;">&#41;</span><br /><br />       ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       ::<span style="color: #000000;">Create</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       ::<span style="color: #000000;">Hide</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;">Self</span><br /><br /><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>       <span style="color: #00C800;">CLASS</span> TTooltip<br /><br /><span style="color: #00C800;">Local</span> hDC := ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oThis := <span style="color: #00C800;">self</span><br /><span style="color: #00C800;">Local</span> hOldFont<br /><span style="color: #00C800;">local</span> lHeader :=.f.<br /><br /><br /><br /><br /><br /><span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oTimer</span> != <span style="color: #00C800;">nil</span><br />   ::<span style="color: #000000;">oTimer</span>:<span style="color: #000000;">Deactivate</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: #0000ff;">DEFINE</span>   <span style="color: #0000ff;">TIMER</span> ::<span style="color: #000000;">oTimer</span> <span style="color: #0000ff;">INTERVAL</span> ::<span style="color: #000000;">nTimer</span> <span style="color: #0000ff;">ACTION</span> oThis:<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">TIMER</span> ::<span style="color: #000000;">oTimer</span><br /><br /><br /><br /><br />         FillSolidRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, GetClientRect<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br />   SetBkMode<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />   hOldFont  := SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>,  ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>  <span style="color: #000000;">&#41;</span><br />   SetTextColor<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">&#41;</span><br /><br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">cHeader</span> != <span style="color: #00C800;">nil</span><br />      DrawText  <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cHeader</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>  , ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">16</span>  <span style="color: #000000;">&#41;</span><br />      DrawText  <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cMessage</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> , ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">16</span>  <span style="color: #000000;">&#41;</span><br />       oThis:<span style="color: #000000;">Line</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">35</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">35</span>,::<span style="color: #000000;">nWidthTip</span>, CLR_BLUE<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />       DrawText  <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cMessage</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> , ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">16</span>  <span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">endif</span><br /><br /><br />    <span style="color: #00C800;">if</span> ::<span style="color: #000000;">cFooter</span> != <span style="color: #00C800;">nil</span><br />       DrawText  <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">cFooter</span>, <span style="color: #000000;">&#123;</span> ::<span style="color: #000000;">nHeightTip</span><span style="color: #000000;">-30</span>, <span style="color: #000000;">40</span> , ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">16</span>  <span style="color: #000000;">&#41;</span><br />       oThis:<span style="color: #000000;">Line</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, ::<span style="color: #000000;">nHeightTip</span><span style="color: #000000;">-35</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeightTip</span><span style="color: #000000;">-35</span>,::<span style="color: #000000;">nWidthTip</span>, CLR_BLUE<span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">endif</span><br /><br /><br /><br />   SetBkMode   <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   SelectObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hDC</span>, hOldFont <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">bPainted</span> != <span style="color: #00C800;">nil</span><br />   Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bPainted</span>, ::<span style="color: #000000;">hDC</span>, <span style="color: #00C800;">self</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><br /><br /><br /><br />::<span style="color: #000000;">ReleaseDC</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 /><br /><br /><span style="color: #00C800;">METHOD</span> Line<span style="color: #000000;">&#40;</span> hDC, nTop, nLeft, nBottom, nRight, nColor <span style="color: #000000;">&#41;</span>  <span style="color: #00C800;">CLASS</span> TTooltip<br /><br />   <span style="color: #00C800;">local</span> hPen, hOldPen<br /><br /><br />   hPen = CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>, nColor <span style="color: #000000;">&#41;</span><br />   hOldPen = SelectObject<span style="color: #000000;">&#40;</span> hDC, hPen <span style="color: #000000;">&#41;</span><br />   MoveTo<span style="color: #000000;">&#40;</span> hDC, nLeft, nTop <span style="color: #000000;">&#41;</span><br />   LineTo<span style="color: #000000;">&#40;</span> hDC, nRight, nBottom <span style="color: #000000;">&#41;</span><br />   SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldPen <span style="color: #000000;">&#41;</span><br />   DeleteObject<span style="color: #000000;">&#40;</span> hPen <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br /><br /> <span style="color: #00C800;">METHOD</span> Show<span style="color: #000000;">&#40;</span> nRow, nCol, cHeader, oWnd, cFooter, cMessage<span style="color: #000000;">&#41;</span>   <span style="color: #00C800;">CLASS</span> TTooltip<br /><br /><br /><span style="color: #00C800;">Local</span> n<br /><span style="color: #00C800;">Local</span> aPoint := <span style="color: #000000;">&#123;</span> nRow, nCol <span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">Local</span> aLin, nCalcLen<br /><span style="color: #00C800;">Local</span> nHeight<br /><span style="color: #00C800;">Local</span> nWidth<br /><span style="color: #00C800;">Local</span> nHScreen := GetSysMetrics<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">1</span>  <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> nWScreen := GetSysMetrics<span style="color: #000000;">&#40;</span>  <span style="color: #000000;">0</span>  <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> nLines<br /><br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">lVisible</span><br />   ::<span style="color: #000000;">Hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><br /> <span style="color: #B900B9;">//if there is the header and the footer</span><br /><br />   <span style="color: #00C800;">if</span> cHeader != <span style="color: #00C800;">nil</span><br /><br />     ::<span style="color: #000000;">cHeader</span> := cHeader<br />      <span style="color: #00C800;">if</span>  cFooter != <span style="color: #00C800;">nil</span><br />      ::<span style="color: #000000;">cFooter</span> := cFooter<br />      <span style="color: #00C800;">endif</span><br />    <span style="color: #00C800;">if</span>  cMessage  != <span style="color: #00C800;">nil</span><br />   ::<span style="color: #000000;">cMessage</span>:=cMessage<br />    <span style="color: #00C800;">endif</span><br /><br />      nWidth:= ::<span style="color: #000000;">nHeightTip</span><br />      nHeight:=::<span style="color: #000000;">nWidthTip</span><br /><br /><br />   <span style="color: #00C800;">else</span><br /><br /><br />    <span style="color: #B900B9;">// if there is only the message</span><br /><br />   <span style="color: #00C800;">if</span> cMessage != <span style="color: #00C800;">nil</span><br />     ::<span style="color: #000000;">cMessage</span> := cMessage<br />     aLin :=  ::<span style="color: #000000;">CalcLen</span><span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span><br />     nCalcLen  := aLin<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />     nLines   := aLin<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />     nWidth   := nCalcLen + <span style="color: #000000;">4</span><br />     nHeight  := <span style="color: #000000;">&#40;</span> nLines * ::<span style="color: #000000;">nHeightRow</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">2</span><br />  <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">endif</span><br /><br /><br /><br />  ClientToScreen<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span>, aPoint <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">if</span> aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == nRow<br />     aPoint := ClientToScreen<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span>, aPoint <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">endif</span><br /><br />  nRow := aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />  nCol := aPoint<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><br />  <span style="color: #00C800;">if</span> nRow + nHeight > nHScreen<br />     nRow := nHScreen - nHeight - <span style="color: #000000;">10</span><br />  <span style="color: #00C800;">endif</span><br /><br />  <span style="color: #00C800;">if</span> nCol + nWidth > nWScreen<br />     nCol := nWScreen - nWidth - <span style="color: #000000;">10</span><br />  <span style="color: #00C800;">endif</span><br /><br /><br /><br /><br />  ::<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> nRow, nCol, nWidth, nHeight , .t. <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br /><br />  ::<span style="color: #000000;">lVisible</span> := .t.<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br /><br /><br /> <span style="color: #00C800;">METHOD</span> CalcLen<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span>      <span style="color: #00C800;">CLASS</span> TTooltip<br /><br /> <span style="color: #00C800;">Local</span> n, cLine<br /> <span style="color: #00C800;">Local</span> nLines  := mlcount<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span><br /> <span style="color: #00C800;">Local</span> nCalcLen := <span style="color: #000000;">0</span><br /><br />  <span style="color: #00C800;">For</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nLines<br />      cLine := rtrim<span style="color: #000000;">&#40;</span> memoline<span style="color: #000000;">&#40;</span> cMessage,, n<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />      nCalcLen := <span style="color: #0000ff;">max</span><span style="color: #000000;">&#40;</span> nCalcLen, ::<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span> cLine, ::<span style="color: #000000;">oFont</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">8</span> <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">next</span> n<br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#123;</span> nCalcLen, nLines <span style="color: #000000;">&#125;</span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Windows.h"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbapi.h"</span><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> FILLSOLIDRECT <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    RECT rct;<br />    COLORREF nColor;<br />    HPEN hPen, hOldPen;<br />    HDC hDC = <span style="color: #000000;">&#40;</span> HDC <span style="color: #000000;">&#41;</span> hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    rct.top    = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />    rct.<span style="color: #0000ff;">left</span>   = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;<br />    rct.bottom = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span>;<br />    rct.<span style="color: #0000ff;">right</span>  = hb_parni<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span>;<br /><br />    nColor = SetBkColor<span style="color: #000000;">&#40;</span> hDC, hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />    ExtTextOut<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, ETO_OPAQUE, &rct, <span style="color: #00C800;">NULL</span>, <span style="color: #000000;">0</span>, <span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br />    SetBkColor<span style="color: #000000;">&#40;</span> hDC, nColor <span style="color: #000000;">&#41;</span>;<br /><br />    <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  > <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#123;</span><br />       hPen = CreatePen<span style="color: #000000;">&#40;</span> PS_SOLID, <span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span>COLORREF<span style="color: #000000;">&#41;</span>hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br />       hOldPen = <span style="color: #000000;">&#40;</span>HPEN<span style="color: #000000;">&#41;</span> SelectObject<span style="color: #000000;">&#40;</span> hDC, hPen <span style="color: #000000;">&#41;</span>;<br />       MoveToEx<span style="color: #000000;">&#40;</span> hDC, rct.<span style="color: #0000ff;">left</span>, rct.top, <span style="color: #00C800;">NULL</span> <span style="color: #000000;">&#41;</span>;<br />       LineTo<span style="color: #000000;">&#40;</span> hDC, rct.right<span style="color: #000000;">-3</span>, rct.top <span style="color: #000000;">&#41;</span>;<br />       LineTo<span style="color: #000000;">&#40;</span> hDC, rct.right<span style="color: #000000;">-3</span>, rct.bottom <span style="color: #000000;">&#41;</span>;<br />       LineTo<span style="color: #000000;">&#40;</span> hDC, rct.<span style="color: #0000ff;">left</span>, rct.bottom <span style="color: #000000;">&#41;</span>;<br />       LineTo<span style="color: #000000;">&#40;</span> hDC, rct.<span style="color: #0000ff;">left</span>, rct.top <span style="color: #000000;">&#41;</span>;<br />       SelectObject<span style="color: #000000;">&#40;</span> hDC, hOldPen <span style="color: #000000;">&#41;</span>;<br />       DeleteObject<span style="color: #000000;">&#40;</span> hPen <span style="color: #000000;">&#41;</span>;<br />    <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:2qigvdjy]
Contribution to Forum : new TTOOLTIP CLASS
on microsoft site I found we can use the [b:10za24kh]tooltip_class32[/b:10za24kh] with Win32 API as we made when we use on tfolder the call to ::Create( "SysTabControl32" ) but I not found how make from microsoft site " ......To do that you need to create the window using CreateWindowEx and set the class name for it to "tooltip_class32" and a good idea would be to use the TTS_ALWAYSTIP style. You must then send the TTM_ADDTOOL message to this newly created window and use the TTF_SUBCLASS flag (you should also use the TTF_IDISHWND flag and set the hWnd of the tooltip window in the uID member of the TOOLINFO stucture). After that subclass this window and check for the WM_PRINT message in which case you should post a WM_PAINT message and return TRUE. Then do all the work of moving and painting the tooltip when you recieve the WM_PAINT message (just make sure you show the tooltip window before you resize it otherwise you will get another WM_PRINT message and end up with an endless loop. For any other message just let the default WndProc handle it. ...." [b:10za24kh]Now there is a custom tooltip window class in this forum... I hope You help me to implement it [/b:10za24kh]
Contribution to Forum : new TTOOLTIP CLASS
I found a tooltip in PureBasic [code=fw:1mzqg1he]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Procedure ToolTip<span style="color: #000000;">&#40;</span>Win, <span style="color: #0000ff;">Id</span>, <span style="color: #0000ff;">Style</span>, <span style="color: #0000ff;">Center</span>, <span style="color: #0000ff;">Icon</span> , FgColor, BgColor, <span style="color: #0000ff;">Title</span>.s, Tip.s<span style="color: #000000;">&#41;</span><br /><br />;Adds a tooltip <span style="color: #0000ff;">to</span> <span style="color: #0000ff;">Id</span>. <span style="color: #0000ff;">Style</span>: <span style="color: #000000;">0</span> = ordinary, <span style="color: #000000;">1</span> = balloon. <span style="color: #0000ff;">Center</span>: <span style="color: #000000;">1</span> = <span style="color: #0000ff;">center</span> the stem<br /><br />;Icon: <span style="color: #000000;">0</span> = No <span style="color: #0000ff;">icon</span>, <span style="color: #000000;">1</span> = Info, <span style="color: #000000;">2</span> = Warn, <span style="color: #000000;">3</span> = Error, <span style="color: #000000;">&#40;</span>See #TOOLTIP_ constants<span style="color: #000000;">&#41;</span><br /><br />TT = CreateWindowEx_<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #ff0000;">"Tooltips_Class32"</span>, <span style="color: #ff0000;">""</span>, #TTS_BALLOON * <span style="color: #0000ff;">Style</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />;Color. RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> or GetSysColor_<span style="color: #000000;">&#40;</span>See #COLOR_ constants<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">If</span> FgColor<br />;Set the tip <span style="color: #0000ff;">text</span> <span style="color: #0000ff;">color</span>, also the tip outline <span style="color: #0000ff;">color</span> <span style="color: #00C800;">for</span> balloon tooltips<br />SendMessage_<span style="color: #000000;">&#40;</span>TT, #TTM_SETTIPTEXTCOLOR, FgColor, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><span style="color: #00C800;">If</span> BgColor<br />;Set the tip background <span style="color: #0000ff;">color</span><br />SendMessage_<span style="color: #000000;">&#40;</span>TT, #TTM_SETTIPBKCOLOR, BgColor, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br />TI.TOOLINFO\cbSize = SizeOf<span style="color: #000000;">&#40;</span>TOOLINFO<span style="color: #000000;">&#41;</span><br />TI\uFlags = #TTF_IDISHWND | #TTF_SUBCLASS | <span style="color: #000000;">&#40;</span>#TTF_CENTERTIP * <span style="color: #0000ff;">Center</span><span style="color: #000000;">&#41;</span><br />TI\hWnd = WindowID<span style="color: #000000;">&#40;</span>Win<span style="color: #000000;">&#41;</span><br />TI\uId = GadgetID<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Id</span><span style="color: #000000;">&#41;</span><br />TI\lpszText = @Tip<br />;Register tooltip with the control<br />SendMessage_<span style="color: #000000;">&#40;</span>TT, #TTM_ADDTOOL, <span style="color: #000000;">0</span>, TI<span style="color: #000000;">&#41;</span><br />;Set as a multiline tooltip with wordwrap<br />SendMessage_<span style="color: #000000;">&#40;</span>TT, #TTM_SETMAXTIPWIDTH, <span style="color: #000000;">0</span>, <span style="color: #000000;">150</span><span style="color: #000000;">&#41;</span><br />;Set the <span style="color: #0000ff;">icon</span> <span style="color: #0000ff;">style</span> and tip <span style="color: #0000ff;">title</span><br />SendMessage_<span style="color: #000000;">&#40;</span>TT, #TTM_SETTITLE, <span style="color: #0000ff;">Icon</span>, <span style="color: #0000ff;">Title</span><span style="color: #000000;">&#41;</span><br />EndProcedure</div>[/code:1mzqg1he]
Contribution to Forum : new TTOOLTIP CLASS
NICE WORK GOOD
Contribution to Forum : new TTOOLTIP CLASS
Thanks but I am convinced that the group of Linares is not interested in this class and the changes that must make windows in the class... Gracias, pero estoy convencido de que el grupo de Linares no está interesado en esta clase y los cambios que deben hacer que las ventanas de la clase
Contribution to Forum : new TTOOLTIP CLASS
Cuasi perfecto.
Control Botón de Impresión
Buenos días para todos.... En este oportunidad debo poder ejecutar una acción al momento que el usuario envié la orden de impresión. Lo que requiero es hacer el registro en una tabla del usuario, la hora y la fecha en la que se dio la orden de impresión del documento. Saludos [url=http&#58;//postimg&#46;org/image/wxjte6lxt/full/:2o9fbe8m][img:2o9fbe8m]http&#58;//s24&#46;postimg&#46;org/maq08rdsl/foro&#46;png[/img:2o9fbe8m][/url:2o9fbe8m] [url=http&#58;//postimage&#46;org/index&#46;php?lang=spanish:2o9fbe8m]imagen[/url:2o9fbe8m]
Control Botón de Impresión
Leandro, Lo más sencillo es modificar el código de FWH\source\classes\rpreview.prg Si nos muestras el código fuente de como construyes ese impreso, tal vez encontremos una forma de hacerlo que no precise de modificar rpreview.prg
Control Botón de Impresión
Hola Leandro como dice el Maestro Antonio Linares Modifica la clase rpreview METHOD PrintPage() CLASS TPreview local hMeta := ::oMeta1:hMeta local oDlg, oRad, oPageIni, oPageEnd local nOption := 1, nFirst := 1, nLast := Len( ::oDevice:aMeta ) // DEVICE local oThis := Self local lCancel := .t. if nLast != 1 DEFINE DIALOG oDlg SIZE 400, 183 TITLE FWString( "Printing" ) oDlg:lTruePixel := .f. @ 8, 8 GROUP PROMPT FWString( "Printing range" ) SIZE 135, 72 PIXEL OF oDlg @ 18, 18 RADIO oRad VAR nOption ; ITEMS FWString( "All" ), FWString( "Current page" ), FWString( "Pages" ) ; ON CHANGE If( nOption == 3,; ( oPageIni:Enable(), oPageEnd:Enable() ),; ( oPageIni:Disable(), oPageEnd:Disable() ) ) PIXEL @ 61, 30 SAY FWString( "From" ) OF oDlg PIXEL @ 60, 53 GET oPageIni ; VAR nFirst PICTURE "@K 99999" ; VALID If( nFirst < 1 .or. nFirst > nLast, ( MsgBeep(), .F. ), .T. ) ; OF oDlg SIZE 22, 11 PIXEL @ 61, 80 SAY FWString( "To" ) OF oDlg PIXEL @ 60, 103 GET oPageEnd ; VAR nLast PICTURE "@K 99999" ; VALID If( nLast < nFirst .or. nLast > Len( ::oDevice:aMeta ),; // DEVICE ( MsgBeep(),.F. ), .T.) OF oDlg PIXEL @ 10, 152 BUTTON FWString( "&Ok" ) OF oDlg SIZE 42, 14 ; ACTION ( lCancel := .f., oDlg:End() ) PIXEL @ 28, 152 BUTTON FWString( "&Cancel" ) OF oDlg SIZE 42, 14 ; ACTION oDlg:End() PIXEL ACTIVATE DIALOG oDlg CENTERED ; ON INIT ( oPageIni:Disable(), oPageEnd:Disable(), .T. ) else lCancel := .f. endif if ! lCancel MsgRun( ::oDevice:cDocument, "Printing Report",; { || ::PrintPrv( nil, nOption, nFirst, nLast ) } ) endif ///puedes colocar lo que quieras hacer en mi caso me toco para una impresión particular salir al imprimir por medio de la variable zPrintTick que es una variable de mi software If zPrintTick ::oWnd:End() EndIf /// return nil
Control Botón de Impresión
Antonio y Luis muchas gracias por responder. Ya había mirado esa opción, pero la verdad es que no me gusta modificar las clases. Pensé que posiblemente había otra forma de hacerlo. Voy a crear un pequeño dialogo para controlar ese proceso.
Control Botón de Impresión
Por qué no haces solo un EXTEND CLASS del METHOD BuildButtonBar y en el ACTION del PrintPage, haces antes una llamada a tu funcion? .... ACTION ( MiFunc(), ::PrintPage(), .. ) Aunque lo interesante seria tener las acciones de los botones en un array de codeblocks para poderlos modificar
Control Botón de Impresión
Leandro: Me parece que lo mas sensato es lo que te recomienda el Teacher Antonio, modifica el RPReview.Prg 1.- Creas una variable pública desde tu aplicación, por ejemplo MEMVAR lImpreso := (.F.) 2.- En el RPReview.Prg recibes esa variable MEMVAR lImpreso 3.- El la parte del código donde se imprime la vista previa (RPReview.Prg), en el que tengo yo es en la parte: [code=fw:3djzxlfk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> PrintPrv<span style="color: #000000;">&#40;</span>oDlg, nOption, nPageIni, nPageEnd<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> oDevice := DEVICE<br /><span style="color: #00C800;">LOCAL</span> aFiles := oDevice:<span style="color: #000000;">aMeta</span><br /><span style="color: #00C800;">LOCAL</span> hMeta := oMeta1:<span style="color: #000000;">hMeta</span><br /><span style="color: #00C800;">LOCAL</span> nFor<br /><br />CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />StartDoc<span style="color: #000000;">&#40;</span>oDevice:<span style="color: #000000;">hDC</span>, oDevice:<span style="color: #000000;">cDocument</span> <span style="color: #000000;">&#41;</span><br /><br />lImpreso := <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">////   Aquí  *******************************</span><br /> </div>[/code:3djzxlfk] cambias la variable a TRUE 4.- Ya en la parte de tu aplicación puedes hacer lo que desees una vez que la variable lImpreso esta en TRUE Ojalá te sirva el ejemplo, Saludos
Control Botón de Impresión
Es cuestion de gustos, en mi pueblo se dice "Cada maestrillo tiene su librillo" <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Este es mi "librillo": Todos tenemos versiones personalizadas de varias ( e incluso muchas ) clases Al igual que a Leandro, no me gusta modificar las clases, ya que en futuras actualizaciones de Fwh tengo que estar comparando con las actualizaciones de esas clases si deseo utilizar las novedades y mejoras que traen. Con el EXTEND CLASS solo me preocupo de comparar ese/esos metodo(s) en concreto que puedo tener agrupados en un solo PRG, así en el caso de que dichas actualizaciones ya contemplen o mejoren los requisitos que necesito, solo tengo que borrar dicho metodo del modulo de EXTENDS.PRG que añado a los proyectos como un PRG mas. Saludos
Control Botón de Impresión
Cristobal y Armando Gracias por responder. Armando la verdad es que no me gusta eso de modificar las clases, una vez lo hice asi y tuve muchos problemas. De todas formas voy a intentarlo solo para probar. Cristobal gracias por la ayuda, voy a seguir tu consejo. Pruebo y comento.
Control Botón de Impresión
Si añades un codeblock, por ejemplo, bPrint, y lo llamasdesde el método PrintPrv: [code=fw:267n2vz3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">DATA</span> bPrint<br />...<br />...<br /><br /><span style="color: #00C800;">METHOD</span> PRINTPRV<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />...<br /><span style="color: #00C800;">if</span> ::<span style="color: #000000;">bPrint</span> # <span style="color: #00C800;">NIL</span><br />   EVAL<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">bPrint</span>,<span style="color: #00C800;">Self</span>,...<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />...</div>[/code:267n2vz3] El cambio es muy pequeño y no tiene que modificar ningún programa. Y ya lo tienes para los restos. Estoy pensando en hacerlo para mi, por lo que pueda pasar... Un saludo.
Control Casino
Algun colega tiene por ahi algun ejemplo de un sistema para controlar Casino Minero, por ejemplo que los trabajadores pasen a colacion pongan su huella digital. saludos
Control DTPICKER
Existe alguna posibilidad de manejar el control DTPICKER de la misma forma que el default de fechas actual?, es decir, digitar toda una fecha sin"cambiarse" al mes o al año con flechas? Lo pregunto pues me gusta la apariencia del control pero es muy engorroso para los usuarios el manejo independiente de dia+mes+año. Agradecido de antemano
Control DTPICKER
[quote="dbzap":2hvnn4z4]Existe alguna posibilidad de manejar el control DTPICKER de la misma forma que el default de fechas actual?, es decir, digitar toda una fecha sin"cambiarse" al mes o al año con flechas? Lo pregunto pues me gusta la apariencia del control pero es muy engorroso para los usuarios el manejo independiente de dia+mes+año. Agradecido de antemano[/quote:2hvnn4z4] DTPICKER tiene una propiedad que permite hacer el control editable, no la tengo a la mano, pero estoy seguro que alguien sabrá cual es. Veré si la encuentro.
Control DTPICKER
Hola Amigos necesito de su ayuda. tengo este control REDEFINE DTPICKER aGets[1] var oFecha1 ID 121 OF oDlg UPDATE REDEFINE DTPICKER aGets[2] var oFecha2 ID 122 OF oDlg UPDATE no me deja cambiar la fecha con el teclado (digitando) trabajo con workshop saludos
Control DTPICKER
Prueba de esta forma: [code=fw:9592ytfz]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> DTPICKER oDt1 <span style="color: #0000ff;">VAR</span> aGets<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> ;<br />         <span style="color: #0000ff;">OF</span> oDlg ;<br />         <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> ;<br />         <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"dd/mm/yyyy"</span><br /><br />oDt1:<span style="color: #000000;">bChange</span> = <span style="color: #000000;">&#123;</span> || IIf<span style="color: #000000;">&#40;</span> oDt1:<span style="color: #000000;">lClosed</span> .and. oDt1:<span style="color: #000000;">lFocused</span>, oDt1:<span style="color: #000000;">PostMsg</span><span style="color: #000000;">&#40;</span> WM_KEYDOWN, VK_RIGHT <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:9592ytfz] Saludos cordiales. Carlos
Control DTPICKER
resulto muchas gracias
Control GET sobre una imagen
Estimados Como puedo colocar un control Get sobre una imagen, cuando paso el mouse sobre el control aparece? la idea es ir colocando algunas letras sobre la imagen he colocado esto [code=fw:67e1dhpt]<div class="fw" id="{CB}" style="font-family: monospace;">oDlg:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">&#123;</span> || oGetImg1:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:67e1dhpt]
Control GET sobre una imagen
Hola Patricio. No se si te servirá pero yo en una aplicación tengo varios Get sobre una imagen y para que funcione debo poner primero el Get y despues la Imagen. Mas o menos asi: [code=fw:2kjbl1j6]<div class="fw" id="{CB}" style="font-family: monospace;">oImg = CurDrive<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">":<span style="color: #000000;">\"</span> + CurDir() + "</span>\impr<span style="color: #ff0000;">" + zejer + "</span>\imp115.bmp<span style="color: #ff0000;">"<br />@ 28,375 GET gDlg001 VAR va011 OF oDlgwBus <br />@ 65,455 GET gDlg002 VAR va012 OF oDlgwBus <br />@172,541 GET gDlg003 VAR va013 OF oDlgwBus <br />@  5,  5 IMAGE  tDlg001 FILE oImg OF oDlgwBus PIXEL SIZE 600,385 ADJUST<br />tDlg001:Zoom(ProPorH*600/840)</span></div>[/code:2kjbl1j6] Un saludo Carlos
Control GET sobre una imagen
Hola Gracias por responder Utilizo Recurso Hize los ajustes que indicas pero el problema es que no puedo posicionar el mouse en los get, solo puede acercarme con la tecla TAB. [url=http&#58;//img835&#46;imageshack&#46;us/i/57612365&#46;jpg/:1nn4ol0o][img:1nn4ol0o]http&#58;//img835&#46;imageshack&#46;us/img835/2584/57612365&#46;jpg[/img:1nn4ol0o][/url:1nn4ol0o]
Control GET sobre una imagen
Hola Patricio, no sé si es exactamente lo que quieres, pero esto funciona bien: [code=fw:83qx2h5j]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"MOD110"</span>  <span style="color: #0000ff;">TITLE</span> cTitulo <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImagen  <span style="color: #0000ff;">ID</span> <span style="color: #000000;">800</span> <span style="color: #0000ff;">OF</span> oDlg FILENAME <span style="color: #ff0000;">"model110.jpg"</span> <br />   <span style="color: #B900B9;">//</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>  <span style="color: #0000ff;">VAR</span> vP1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">401</span> <span style="color: #0000ff;">OF</span> oDlg <br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>  <span style="color: #0000ff;">VAR</span> vP2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">402</span> <span style="color: #0000ff;">OF</span> oDlg <br />   .......................<br />   ......................<br /> </div>[/code:83qx2h5j]
Control GET sobre una imagen
Gracias Manuel Lo he hecho de todas forma [code=fw:j4nwi98t]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>              ;<br />    <span style="color: #0000ff;">VAR</span> _img1             ;<br />    <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"!"</span>                       ;<br />    <span style="color: #0000ff;">ID</span> <span style="color: #000000;">21</span> <span style="color: #0000ff;">OF</span> PAGE1 <span style="color: #0000ff;">UPDATE</span>         ;<br />    <span style="color: #0000ff;">COLOR</span> CLR_BLACK,RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span> ;<br />    <span style="color: #0000ff;">VALID</span> _img1 $  <span style="color: #ff0000;">" ;A;R;Q;S;P;T"</span>    ;<br />    <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> aGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>               ;<br />    <span style="color: #0000ff;">VAR</span> _img2              ;    <br />    <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"!"</span>                        ;<br />    <span style="color: #0000ff;">ID</span> <span style="color: #000000;">22</span> <span style="color: #0000ff;">OF</span> PAGE1 <span style="color: #0000ff;">UPDATE</span>          ;<br />    <span style="color: #0000ff;">COLOR</span> CLR_BLACK,RGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">200</span><span style="color: #000000;">&#41;</span>  ;    <br />    <span style="color: #0000ff;">VALID</span> _img2 $  <span style="color: #ff0000;">" ;A;R;Q;S;P;T"</span>     ;<br />    <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">IMAGE</span> oBmp <span style="color: #0000ff;">ID</span> <span style="color: #000000;">9</span> <span style="color: #0000ff;">OF</span> PAGE1 FILENAME <span style="color: #ff0000;">"IMAGEN<span style="color: #000000;">\v</span>ehoc.bmp"</span> <span style="color: #0000ff;">ADJUST</span><br /> </div>[/code:j4nwi98t] Pienso que el problema esta en el recurso, ya que si coloco el index de la imagen primero no puedo seleccionar los get si pongo el index al final los get no aparecen y pasando encima de la imagen estos aparecen .. podrias enviarme el .res donde hiciste las pruebas a ver donde tengo el problema gracias
Control GET sobre una imagen
Aquí tienes el diálogo en el archivo RES [url:30k8joca]http&#58;//rapidshare&#46;com/files/426587386/PRUEBA&#46;RES[/url:30k8joca]
Control GET sobre una imagen
Patricio lo que pretendes hacer no es posible de esa forma, todos los controles son "ventanas" cada uno procesa eventos (mensajes) independientemente (movimiento de raton, pintados, click, etc ) al colocar una ventana sobre otra en algun momento una estara oculta dejando a la otra sin recibir eventos... Pudes hacer los get hijos de la imagen, los get los contruirias sin recursos, y hablandote de memoria, tendras que crearlos despues que inicialice el dialogo pues con los recursos no tendras un Handle valido hasta que este este inicializado Si la imagen ocupa todo el dilogo, solo pinta en el DC del dialogo la imagen con el codeblock bPainted (ON PAINT)
Control GET sobre una imagen
Manuel Con el control tBitmap me arroja error [code=fw:3tko8zmb]<div class="fw" id="{CB}" style="font-family: monospace;">Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => CREATEDLGERROR<span style="color: #000000;">&#40;</span><span style="color: #000000;">559</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">317</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">folder</span>.prg => TFOLDER:<span style="color: #00C800;">DEFAULT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">453</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">folder</span>.prg => TFOLDER:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">365</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => __OBJSENDMSG<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\HARBOUR.PRG => OSEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => HB_EXECFROMARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\<span style="color: #00C800;">function</span>\HARBOUR.PRG => ASEND<span style="color: #000000;">&#40;</span><span style="color: #000000;">197</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => TDIALOG:<span style="color: #000000;">INITIATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">664</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">929</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DIALOGBOX<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">273</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\IngreOt.PRG => INGRESOOT<span style="color: #000000;">&#40;</span><span style="color: #000000;">713</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\Wcta.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>MAKEMENU<span style="color: #000000;">&#40;</span><span style="color: #000000;">1236</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\Wcta.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>MAKEMENU<span style="color: #000000;">&#40;</span><span style="color: #000000;">1236</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">MENU</span>.PRG => TMENU:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">470</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\Wcta.PRG => SHOWPOPUP<span style="color: #000000;">&#40;</span><span style="color: #000000;">1229</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\Wcta.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">116</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\TOOLBAR.PRG => TTOOLBAR:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">219</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => TDIALOG:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">381</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">DIALOG</span>.prg => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">945</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">WINDOW</span>.prg => _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3394</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">c</span>:\fwh\source\classes\<span style="color: #0000ff;">WINDOW</span>.prg => TMDIFRAME:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">978</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\Wcta.PRG => MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">229</span><span style="color: #000000;">&#41;</span><br /><br />System<br />======</div>[/code:3tko8zmb] Cambio a BITMAP [code=fw:3tko8zmb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//  REDEFINE IMAGE oBmp ID 800 OF PAGE1 FILENAME "IMAGEN\vehoc.bmp" ADJUST</span><br /><span style="color: #0000ff;">REDEFINE</span> BITMAP oBmp <span style="color: #0000ff;">ID</span> <span style="color: #000000;">800</span> <span style="color: #0000ff;">OF</span> PAGE1 FILENAME <span style="color: #ff0000;">"IMAGEN<span style="color: #000000;">\v</span>ehoc.bmp"</span> <span style="color: #0000ff;">ADJUST</span><br /> </div>[/code:3tko8zmb] funciona pero hace me hace lo mismo Como defines el contro IMAGE desde ya gracias por tu tiempo
Control GET sobre una imagen
gracias daniel voy a probar si me resulta, no no grito jeje
Control GET sobre una imagen
Pues el código es el que te puse más arriba. Tal vez los errores vengan porque no hayas incluído #include "image.ch" y la librería freeimage.dll en el directorio de la aplicación.
Control GET sobre una imagen
Patricio, te he hecho un ejemplo autocontenido con los archivos necesarios: [url:29m5etqe]http&#58;//rapidshare&#46;com/files/426614995/Prueba&#46;rar[/url:29m5etqe] (Otra cosa es que sea esto lo que estás buscando)
Control GET sobre una imagen
Muchas Gracias Manuel Parece que le truco es hacer la imagen con los controles get incluidos, pero igual no puedes pinchar un get, solo debes pasar de un control en uno hasta llegar al que corresponda [url=http&#58;//img530&#46;imageshack&#46;us/i/ot2u&#46;jpg/:1nu867yd][img:1nu867yd]http&#58;//img530&#46;imageshack&#46;us/img530/7089/ot2u&#46;jpg[/img:1nu867yd][/url:1nu867yd] se agradese los ejemplos pd:por ahora lo dejo a medias, hay que seguir avanzando
Control GET sobre una imagen
[quote="Daniel Garcia-Gil":284eqzoh]Patricio lo que pretendes hacer no es posible de esa forma, todos los controles son "ventanas" cada uno procesa eventos (mensajes) independientemente (movimiento de raton, pintados, click, etc ) al colocar una ventana sobre otra en algun momento una estara oculta dejando a la otra sin recibir eventos... Pudes hacer los get hijos de la imagen, los get los contruirias sin recursos, y hablandote de memoria, tendras que crearlos despues que inicialice el dialogo pues con los recursos no tendras un Handle valido hasta que este este inicializado Si la imagen ocupa todo el dilogo, solo pinta en el DC del dialogo la imagen con el codeblock bPainted (ON PAINT)[/quote:284eqzoh]
Control GET sobre una imagen
Patricio, Tomé el PRG de prueba que te envió Manuel y le modifiqué el RES y acá funciona. Así lo vengo usando desde hace bastante en mis aplicaciones y sin problemas Puedes bajar el RES desde: [url:2jlfllsz]http&#58;//www&#46;mediafire&#46;com/?al6f36d766wuawa[/url:2jlfllsz] Reemplazalo por el que enviara Manuel y prueba. Comenta si te sirve. Saludos. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Control GET sobre una imagen
Rolando, gracias. Era el problemilla que tenía yo también, el no poder pinchar con el ratón sobre los GET. Sencillamente se soluciona creando primero en el RES los controles GET y encima el control BITMAP.
Control GET sobre una imagen
Manuel, Efectivamente es como dices, me olvidé de comentarlo en mi post anterior. Uso el Pelles-C y lo que hice con tu recurso fue editarlo y ordenarle los controles. El de la imagen siempre debe ser el último. Y eso es todo. Saludos. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Control GET sobre una imagen
Rolando Efectivamente funciona, pero hay que modificar la imagen para que tenga los controles get, de lo contrario no aparecen miestras no pases el mouse por encima bueno ya es un gran avance, ahora a modificar la imagen y que cuadre uppff!! muchas gracias PD:abra que ver la solucion de propone daniel, cuando tenga tiempo hare pruebas y cerrare el post..
Control GET sobre una imagen
Patricio prueba lo siguiente... en el ON INIT del dialogo cambia el parent de los get para el control bitmap, como te comente antes, el punto es hacer hijos los get de la imagen sino existiran problemas con los eventos en el control que quede "abajo" algo asi SetParent( oGet:hWnd, oBmp:hWnd )
Control GET sobre una imagen
Daniel [code=fw:394dfcoj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span>;<br />                      <span style="color: #000000;">&#40;</span> SetParent<span style="color: #000000;">&#40;</span> aGet<span style="color: #000000;">&#91;</span>id_img1<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">hWnd</span>, oBmp:<span style="color: #000000;">hWnd</span>  <span style="color: #000000;">&#41;</span><br /> </div>[/code:394dfcoj] pero el control NO APARECE ni siquiera pasando por encima, los demas controles empiezan a salir mientras paso el mouse
Control GET sobre una imagen
Patricio coloca el bitmap como primer control y encima los gets
Control GET sobre una imagen
Daniel Igual no aparece..
Control GET sobre una imagen
Hola a todos, Yo lo que hago es que dibujo la imagen como imagen de fondo y así no interfiere con los GET's DEFINE BITMAP oBmp NAME "...." DEFINE DIALOG oDlg ... ... ... REDEFINE GET oGet1 ... REDEFINE GET oGet2 ... REDEFINE GET oGet3 ... ... oDlg:bPainted := { |hDc| PintDlg(hDc,oBmp) ACTIVATE DIALOG oDlg ... FUNCTION PintDlg(hDc,oBmp) PalBmpDraw(hDc,X,Y,oBmp:hBmp) RETURN NIL Si lo que utilizas es un JPG en lugar de definir un BITMAP define una IMAGE y ya está Espero que te sirva Saludso.
Control ID en un diálogo
Como buscar un control ID en un diálogo (sin redefinir sus controles): [code=fw:hqmbrrzw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> cResDlgName<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> lFound := LookForControl<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">hWnd</span>, nCtrlId <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />...<br /><br /><span style="color: #00C800;">function</span> LookForControl<span style="color: #000000;">&#40;</span> hDlg, nCtrlId <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">local</span> hCtrl<br /><br />&nbsp; <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> hCtrl := GetWindow<span style="color: #000000;">&#40;</span> hDlg, GW_CHILD <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span> .and. GetParent<span style="color: #000000;">&#40;</span> hCtrl <span style="color: #000000;">&#41;</span> == hDlg<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> GetWindowLong<span style="color: #000000;">&#40;</span> hCtrl, GWL_ID <span style="color: #000000;">&#41;</span> == nCtrlId<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> .T.<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp;hCtrl = GetWindow<span style="color: #000000;">&#40;</span> hCtrl, GW_HWNDNEXT <span style="color: #000000;">&#41;</span><br />&nbsp; end<br /><br /><span style="color: #00C800;">return</span> .F.<br />&nbsp;</div>[/code:hqmbrrzw]
Control ID en un diálogo
Antonio, Perdón mi ignorancia, y ... cual es el sentido de buscar un ID si no lo REDEFINO ???? Salu2, Ariel.
Control ID en un diálogo
Ariel, Algunos usuarios me preguntaron la forma de hacerlo. Imagino que para aplicaciones grandes y genericas en donde lo puedan necesitar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> (módulos parecidos pero con diferencias que reusen código, etc.)
Control ID en un diálogo
Antonio, Gracias x responder, no lo habia pensado asi <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Seguimos aprendiendo.... jejeje Salu2.
Control ID en un diálogo
Hola mr Antonio ¿Podría mostrarme un ejemplo en la práctica? Por ejemplo yo tengo en mi controles de diálogo ID 4050.4051 y 4052 .... etc como lo hago basado en el ejemplo anterior? No soy capaz de trabajar en mi PRG, regresa este error [code=fw:3k1pzj95]<div class="fw" id="{CB}" style="font-family: monospace;">Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1003</span> &nbsp;Variable does not exist: <span style="color: #000000;">GW_CHILD</span></div>[/code:3k1pzj95] que es eso GW_CHILD? Gracias
Control ID en un diálogo
Hola ICO coloca estos define, seguro los necesitaras #define GW_HWNDNEXT 2 #define GW_CHILD 5 #define GWL_ID (-12) GW_CHILD es un "flag" que usa la funcion GetWindow, por eso el prefijo (GW) [url:1it3md1f]http&#58;//msdn&#46;microsoft&#46;com/en-us/library/ms633515(VS&#46;85)&#46;aspx[/url:1it3md1f] GWL es para la funcion GetWindowLong... podras encontrar muchas variables con distintos prefijos es una manera facil de identificar la funcion que lo usa
Control ID en un diálogo
Hola Daniel poner la define como se muestra, pero mi aplicación dejó de funcionar Abraços..
Control ID en un diálogo
Luiz, Puedes poner un ejemplo completo de cómo lo estás usando ? gracias
Control ID en un diálogo
Ola Antonio es exactamente lo que mi quieres saber, Copei y pegado su ejemplo, que está por encima y en lugar de nctrlID poner 4050.4051 Quiero saber dónde colocar los identificadores no tengo idea de cómo proceder Gracias
Control ID en un diálogo
Luiz, Los identificadores tienen que estar definidos en tu fichero RC
Control ID en un diálogo
Gracias Antonio, voy a tratar de hacer después de que el informe del resultado.. abrazos
Control ID in a Dialog
How to search a control ID in a resource dialog (without redefining its controls): [code=fw:3b7qjy07]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> cResDlgName<br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />  <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> lFound := LookForControl<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">hWnd</span>, nCtrlId <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />...<br /><br /><span style="color: #00C800;">function</span> LookForControl<span style="color: #000000;">&#40;</span> hDlg, nCtrlId <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">local</span> hCtrl<br /><br />  <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> hCtrl := GetWindow<span style="color: #000000;">&#40;</span> hDlg, GW_CHILD <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span> .and. GetParent<span style="color: #000000;">&#40;</span> hCtrl <span style="color: #000000;">&#41;</span> == hDlg<br />     <span style="color: #00C800;">if</span> GetWindowLong<span style="color: #000000;">&#40;</span> hCtrl, GWL_ID <span style="color: #000000;">&#41;</span> == nCtrlId<br />        <span style="color: #00C800;">return</span> .T.<br />     <span style="color: #00C800;">endif</span><br />     hCtrl = GetWindow<span style="color: #000000;">&#40;</span> hCtrl, GW_HWNDNEXT <span style="color: #000000;">&#41;</span><br />  end<br /><br /><span style="color: #00C800;">return</span> .F.<br /> </div>[/code:3b7qjy07]
Control Multimedia en 32 Bits.
Control Multimedia en 32 Bits. \samples\mmedia modificado para FWH 32 bits. [url:40ea26s3]https&#58;//i&#46;imgur&#46;com/m4yJL80&#46;png[/url:40ea26s3] [img:40ea26s3]https&#58;//i&#46;imgur&#46;com/m4yJL80&#46;png[/img:40ea26s3] Regards, saludos.
Control Multimedia en 32 Bits.
Download Completo: [url:1ruavskv]https&#58;//mega&#46;nz/file/EF0RiAaK#crtQqe5ZuFMU0DXR96z4W2Oeoc4xU57ce5rSJzWXfzw[/url:1ruavskv] Regards, saludos.
Control Multimedia en 32 Bits.
Dear João, many thanks for sharing it
Control OCX para escaner
He encontrado un control OCX muy bueno para manejar escanners TWAIN. Os lo podeis descargar aquí: [url:1ebedqt5]http&#58;//www&#46;viscomsoft&#46;com/products/scanner/[/url:1ebedqt5]Viene con algunos ejemplos en VB y VFP. Yo he probado el de VB y es excelente. He intentado utilizarlo desde FWH pero después de muchas pruebas no he conseguido nada. La verdad es que no tengo mucha práctica con ActiveX/OcxAlguien podría ponerme un ejemplo mínimo de cómo utilizarlo?. En teoría debería ser algo así:[code:1ebedqt5]oActiveX &#58;= TActiveX&#40;&#41;&#58;New&#40;oWnd, ??????????&#41; oActiveX&#58;SelectImageSource&#40;&#41; oActiveX&#58;Scan&#40;&#41;[/code:1ebedqt5]Gracias,Rafael
Control OCX para escaner
Después de jugar un rato, he conseguido conectarme al OCX y adelantar algo:[code:1jpd6i9m]#include "fivewin&#46;ch" function Main&#40;&#41; local oWnd, oActiveX DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" oActiveX &#58;= TActiveX&#40;&#41;&#58;New&#40; oWnd, "SCANNER&#46;ScannerCtrl&#46;1" &#41; @ 2,40 Button "SOURCE" Size 100,20 Of oWnd Action oActiveX&#58;Do&#40;"SelectImageSource"&#41; @ 4,40 Button "SCAN" Size 100,20 Of oWnd Action Adquirir&#40;oActiveX&#41; ACTIVATE WINDOW oWnd VALID &#40;oActiveX&#58;End&#40;&#41;, &#46;T&#46;&#41; Return Nil STATIC FUNCTION Adquirir&#40;oActiveX&#41; Local n n &#58;= oActiveX&#58;Do&#40;"Scan"&#41; n &#58;= oActiveX&#58;Do&#40;"Save", "MiFoto1&#46;jpg", "JPG"&#41; Return Nil[/code:1jpd6i9m]En este ejemplo, el botón SOURCE funciona (o sea, permite elegir la fuente de escaneado)El botón SCAN Lanza el escanner y captura una imagen. Pero no he conseguido que la presente en pantalla o la guarde en disco...¿Hay alguien que quiera seguir mirándose este OCX y continuar el proyecto? Parece muy bueno (captura TIFs y PDFs), está bien de precio y puede usarse libre de royalties. Rafael
Control OCX para escaner
Rafael,Este otro OCX de <!-- m --><a class="postlink" href="http://www.ciansoft.com/twaincontrolx/default.asp">http://www.ciansoft.com/twaincontrolx/default.asp</a><!-- m -->Funciona perfecto con FWH.he aqui un ejemplo de como usarlo:oScan := TOleAuto():New("TwainControlXTrial.Twain")oScan:SelectDevice()oScan:Acquire()oScan:SaveMultiPagePDF("c:\TestScan.pdf")oScan:WritePDF( "c:\TestScan.pdf")Puedes bajar un demo del link mas arriba indicado.Saludos,George
Control OCX para escaner
George:Gracias por tu comentario. ¿En dónde esta la clase TOleAuto? Yo utilizo FWH 2.6 + Harbour y quizá sea una versión demasiado anticuada...Rafael
Control OCX para escaner
RafaelYo uso xHarbour Builder (la version comercial) conjuntamente con FWH; en esta version de xHarbour esta ya integrada tOleauto. Creo que esta esta libreria esta tambien diponible para Harbour pero que hay que enlazarla al crear tu aplicacion.George
Control OCX para escaner
[quote="Rafael Clemente":acaunfpv]¿En dónde esta la clase TOleAuto? Yo utilizo FWH 2.6 + Harbour y quizá sea una versión demasiado anticuada... Rafael[/quote:acaunfpv]Rafael, dame un email para enviarte HbOle.lib que seguramente te servirá.Saludos.Manuel Mercado
Control OCX para escaner
Manuel:Me encuentras en: <!-- e --><a href="mailto:rafaelclem@telefonica.net">rafaelclem@telefonica.net</a><!-- e -->Y muchísimas gracias por adelantadoRafael
Control OCX para escaner
George:Me he bajado el OCX de Ciansoft y tu ejemplo funciona perfecto. Muchas gracias a ti y a Manuel Mercado Saludos,Rafael
Control OCX para escaner
Hola después de pasar dos días y una noche sin dormir <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> haciendo pruebas para generar un PDF con imágenes desde el escáner, definitivamente solo me funciono el TwainControlXTrial.Twain <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> me podrían orientar como podría meter más de una imagen en un PDF que comando se usa del TwainControlXTrial.Twain para escanear multiples documentos creo que tendré que sacar el dinerito de mi cochinito de ahorros para la licencia <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> Les mando muchos saludos <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Aida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Control OCX para escaner
Aida: Prueba el OCR de Ciansoft: <!-- m --><a class="postlink" href="http://www.ciansoft.com/twaincontrolx/default.asp">http://www.ciansoft.com/twaincontrolx/default.asp</a><!-- m --> Va de maravilla: TIffs, PDFs, páginas únicas o multipágina... Yo lo llamo mediante TActiveX() desde FWH y funciona sin problemas. Eso sí, recuerda que para manejar propiedades tienes que utilizar GetProp() y SetProp() y para ejecutar métodos, Do() y que necesitarás una versión de FWH posterior a julio del año pasado. Un saludo, Rafael
Control OCX para escaner
Hola Rafael <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Muchas gracias por contestar <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> fíjate que ese control que me recomiendas es el mismo que definitivamente decidí usar. no sé si seria mucha molestia me pudieras orientar de que comandos necesito para hacer que el escáner me permita meter más de una imagen en un PDF ya tengo funcionando el escáner de modo simple <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> solamente me falta el modo de escanear múltiples documentos en un PDF te agradecería mucho de tu ayuda Saluditos <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Aida <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> mi messenger es - <!-- e --><a href="mailto:aida_p_z@hotmail.com">aida_p_z@hotmail.com</a><!-- e -->
Control OCX para escaner
Aida: Si ya tienes el control funcionando, hacer un PDF multipágina es sencillísimo. 1.- Crea el control: oImgBox := TActiveX():New(Self, "csXImage.ImageBox") 2.- Limpia las imágenes en memoria: oImgBox:Do("ClearPdf") 3.- Declara la función de manejo de eventos: oImgBox:bOnEvent := {|event, aParams, pParams| ::EventCapt(event, aParams, pParams, oImgBox)} La funcion on EventCapt es más o menos así: [code=fw:2rqf2kwn]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00C800;">METHOD</span> EventCapt<span style="color: #000000;">&#40;</span> event, aParams, pParams, oImgBox <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> Escanear<br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> event = <span style="color: #ff0000;">"OnAcquireFinish"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImgBox:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"WritePdf"</span>, myFile<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">// Aquí es donde creo el fichero PDF</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> event = <span style="color: #ff0000;">"OnAcquire"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> File<span style="color: #000000;">&#40;</span>myFile<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImgBox:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Insert"</span>+cExt, cFileDummy, <span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// Si existe el fichero, grabo directo a disco</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oImgBox:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"AddToPdf"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Voy salvando las páginas a memoria</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br /><span style="color: #00C800;">EndCase</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span> <br />&nbsp;</div>[/code:2rqf2kwn] Naturalmente, esto es sólo un esqueleto del programa. Seguro que tú ya has trabajado ajustando las diferentes propiedades del control. Un saludo y suerte! Rafael
Control OCX para escaner
Aida: En mi ejemplo de antes había un error. La línea para grabar directo a disco debe ser: [code=fw:1m1d34y8]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;<br />&nbsp; oImgBox:<span style="color: #00C800;">Do</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"InsertPdf"</span>, myFile, <span style="color: #ff0000;">""</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// Si existe el fichero, grabo directo a disco</span><br />&nbsp;</div>[/code:1m1d34y8] Rafael
Control OCX para escaner
Hola gracias por el dato me da pena <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> pero no sé nada de métodos no entendí nada <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> yo solamente tome el ejemplo siguiente que me funciono [code=fw:166bxxgo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp;<span style="color: #00C800;">FUNCTION</span> ScanOCX2<span style="color: #000000;">&#40;</span>cFilename<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oscan<br /><br />oScan := 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;">"TwainControlXTrial.Twain"</span><span style="color: #000000;">&#41;</span><br />oScan:<span style="color: #000000;">SelectDevice</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oScan:<span style="color: #000000;">AddToPDF</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />oScan:<span style="color: #000000;">Acquire</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />oScan:<span style="color: #000000;">SaveMultiPagePDF</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"TestScan.pdf"</span><span style="color: #000000;">&#41;</span><br />oScan:<span style="color: #000000;">WritePDF</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TestScan.pdf"</span><span style="color: #000000;">&#41;</span><br />presenta<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:166bxxgo] creí que seria sencillo hacer lo de las multipaginas en el manualito del control vi un comando es AddToPDF pero no sé cómo utilizarlo <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> me da mucha pena <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> pero no soy tan avanzada como muchos de esta fantástica comunidad <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Gracias por todo <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Aida
Control Panel
Hi, How can I determine if an application is installed on a computer ?
Control Panel
Dear Yuri, You may try this: oWmi:ExecQuery( "select * from Win32_Product where name = " + cAppName )
Control Panel
Thank you, Antonio! All my clients have Windows 10. So I'm checking for WebView 2 on the computer
Control RICHEDIT y barra para márgenes
Hola a todos, Estoy trabajando con el uso del control RICHEDIT, he conseguido un pequeño editor de RTF como el ejemplo que ya trae FiveWin que me satisface mucho. Ahora quiero poner una barra horizontal (arriba del texto y debajo de la barra de botones) para poder establecer los márgenes laterales con el ratón (como lo hace el WordPad), alguién sabría decirme como hacerlo? Creo que no seá fácil, pero quizas alguno ya lo tiene hecho. Muchas gracias.
Control TIME()? (SOLUCIONADO)
Hola Amigos del foro: Así como existe el control DTPICKER, existe el control para TIME?. Algún ejemplo? Saludos
Control a paradas de tabulador
Estoy creando un dialogo desde codigo fuente, pero no se como controlar para que al ejecutarse el programa y usar tabs el programa se salte los controles tipo say o de cualquier tipo, donde no quiero que pare. A través de recursos es fácil porque lo defino con el Pelles C; pero mediante codigo no logro hacerlo. Saludos Fernando Espinoza
Control a paradas de tabulador
Enj el objeto que tenga el focus, pasalo al objeto que quieras, por lo menos puedes pasarlo del oGET1 al oGET3 con lastfocus sino me equivoco, eso permite que al perder el focus 1 objeto salte al otro que quieras, tambien puedes controlarlo en el orden que vayas colocando dentro de tu sistema los OBJETOS, cualquier duda alguien mas aportara algo para ayudarte y verificar si lo que te digo es correcto o me pele en algo...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Control a paradas de tabulador
Jose luis Gracias por la respuesta, pero no me refiero a eso; lo que quiero es que al saltar entre los controles del dialogo con el tab, se salta los controles tipo say; cuando se trabaja con recursos es fácil; le pongo la condición "Parada de tabulador" en no y listo. Pero si defino todo el dialogo con codigo fuente no se como hacerlo.
Control a paradas de tabulador
[quote="fespinoza":2jsltl9a]Jose luis Gracias por la respuesta, pero no me refiero a eso; lo que quiero es que al saltar entre los controles del dialogo con el tab, se salta los controles tipo say; cuando se trabaja con recursos es fácil; le pongo la condición "Parada de tabulador" en no y listo. Pero si defino todo el dialogo con codigo fuente no se como hacerlo.[/quote:2jsltl9a] José Luís, Podrías poner el código fuente de tu DIALOG? Desde el DEFINE hasta el ACTIVATE. Yo tengo detectada esta incidencia (para mi es un comportamiento 'irregular') usando ventanas MDICHILD. Que versión de FWH estás usando? Saludos Carlos G.
Control a paradas de tabulador
[quote="fespinoza":190bukxr]Jose luis Gracias por la respuesta, pero no me refiero a eso; lo que quiero es que al saltar entre los controles del dialogo con el tab, se salta los controles tipo say; cuando se trabaja con recursos es fácil; le pongo la condición "Parada de tabulador" en no y listo. Pero si defino todo el dialogo con codigo fuente no se como hacerlo.[/quote:190bukxr] Ok, ya creo te entendi, necesitas algo como oObejto:TabStop := .F. , revise en las ayudas de FWH y vi algo en las clases, revisa [b:190bukxr]TControl[/b:190bukxr], es lo unico que se me viene a la mente por el momento, alguien mas te dara una mejor idea o solucion, edite un recurso de prueba, cuando tienes el TAB, esta es la linea CONTROL "Colegio Número", 4001, "Static", WS_GROUP|[b:190bukxr]WS_TABSTOP[/b:190bukxr], 12, 20, 55, 8 asi sin TAB CONTROL "Colegio Número", 4001, "Static", WS_GROUP, 12, 20, 55, 8 abra ver como poner WS_TABSTOP en .f. o algo parecido puedes usar en tu DLG @ x,y y tambien REDEFINE, asi podrias poner los SAY y quitarles el TAB, espero resuelvas, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Control a paradas de tabulador
Hola Fernando: [quote="fespinoza":cfr4az4g]A través de recursos es fácil porque lo defino con el Pelles C; pero mediante codigo no logro hacerlo.[/quote:cfr4az4g] Si es en DIALOG, después de definir el control say: oSay:nStyle := nAnd( oSay:nStyle, nNot( WS_TABSTOP ) ) Si es en WINDOW: #define GWL_STYLE -16 SetWindowLong( oSay:hWnd, GWL_STYLE, nAnd( GetWindowLong( oSay:hWnd, GWL_STYLE ), nNot( WS_TABSTOP ) ) ) Un abrazo.
Control a paradas de tabulador
Maestro Mercado Muchas gracias, eso es lo que necesitaba.
Control a paradas de tabulador
[quote="fespinoza":1rk2nsgz]Maestro Mercado Muchas gracias, eso es lo que necesitaba.[/quote:1rk2nsgz] Ves, sabia que todo iba por el WS_TABSTOP, pero no sabia como usarla, ya tienes solucion man, este foro es mejor que el publico de QUIEN QUIERE SER MILLONARIOS..? jjejje, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->