topic
stringlengths
1
63
text
stringlengths
1
577k
Control de vehiculos o control de flota.
Hola a Todos Manuel Un favor me podria comunicar contigo por messenger, para una orientacion necesito hacer algo similar, mi correo es <!-- e --><a href="mailto:carloslmm@hotmail.com">carloslmm@hotmail.com</a><!-- e --> Gracias y Saludos Carlos I. De La Rosa FWH 12.05 harbour BCC
Control de vehiculos o control de flota.
Hola: Estoy intentando hacer una aplicación en la que he de controlar entre 20 y 80 vehiculos, durante una prieba automovilística, para conocer en tiempo real la localización de cada uno, y mas o menos la idea que tengo es esta: Aplicación Java, que solicita latitud y longitud al GPS (integrado en Android), cada 2 segundos y la enviaría al servidos por socket via datos de telefonía movil. Aplicacion principal deberia escuchar los sockets, recibir la geolocalización y plasmarla en un mapa Por lo que he leido los socket deberían aprovechar los threading de harbour (necesitaria un ejemplo para iniciarlo) Se me plantea la dificultad de representar cada unto en el mapa. Si alguien pudiera darme algo de luz en el asunto sería muy de agradecer. Un saludo y mil gracias José Luis
Control equivalente a Group de otro color
Hola gente, en el foro en inglés Rick Lipkin preguntó como cambiar el color del rectángulo que se dibuja en un control tipo 'GROUP'. Recibió varias respuestas, entre ellas la de usar el control TPanel como reemplazo, y es en definitiva lo que quiero hacer. He logrado hacerlo, pero... con algunos efectos colaterales no deseados: los controles no responden a los clicks del ratón. Adjunto un ejemplo de como lo estoy usando. Seguramente debe faltarle algun detalle "de las tripas" de Windows, pero no sé por donde tirar. [code=fw:82m9puyw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">Local</span> nMargen:= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1280</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />   cLogin    := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />   cPassword := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_BORDER, WS_POPUP <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,ScreenHeight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-200</span> <span style="color: #0000ff;">COLOR</span> GRIS, 0xffffff<br /><br />       @ <span style="color: #000000;">41</span>, nMargen   <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aplicacion"</span> <span style="color: #B900B9;">/* SIZE 100, 40 */</span>  <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">COLOR</span> CLR_GREEN<br />       oSay:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFontB <span style="color: #000000;">&#41;</span><br /><br />       <span style="color: #B900B9;">/* This is what's been replaced<br />       @ 60, nMargen GROUP  ;<br />              TO 215, nMargen + 200  ;<br />              OF oDlg  ;<br />             PIXEL TRANSPARENT ;<br />             COLOR CLR_GREEN<br />       */</span><br />       oPanel:= TPanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">60</span>, nMargen, <span style="color: #000000;">215</span>, nMargen + <span style="color: #000000;">200</span>, oDlg <span style="color: #000000;">&#41;</span><br />       oPanel:<span style="color: #000000;">bPainted</span>:= <span style="color: #000000;">&#123;</span>|hDC, cPS| ;<br />            RoundBox<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oPanel:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-1</span>, oPanel:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-1</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, 0xaaaaaa, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #000000;">&#125;</span><br /><br />      @ <span style="color: #000000;">80</span>, nMargen + <span style="color: #000000;">40</span>  <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Introduzca Usuario y Contraseña"</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">10</span><br /><br />      @ <span style="color: #000000;">105</span>, nMargen + <span style="color: #000000;">40</span>  <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Usuario"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">10</span>   <span style="color: #0000ff;">PIXEL</span><br /><br />      @ <span style="color: #000000;">117</span>, nMargen + <span style="color: #000000;">40</span>  <span style="color: #0000ff;">GET</span> cLogin    <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">14</span> ;<br />                    <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Hola'</span> <span style="color: #000000;">&#41;</span> ;<br />                    BITMAP <span style="color: #ff0000;">"USER_16"</span><br /><br />      @ <span style="color: #000000;">135</span>, nMargen + <span style="color: #000000;">40</span>  <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Password:"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span><br /><br />      @ <span style="color: #000000;">147</span>, nMargen + <span style="color: #000000;">40</span>  <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">var</span> cPassword   <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">14</span> PASSWORD <span style="color: #0000ff;">UPDATE</span> ;<br />                    <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Hola'</span> <span style="color: #000000;">&#41;</span> ;<br />                    BITMAP <span style="color: #ff0000;">"KEY_16"</span><br /><br />      @ <span style="color: #000000;">175</span>, nMargen + <span style="color: #000000;">40</span> <span style="color: #0000ff;">BTNBMP</span>  oBtnEntrar  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Acceder"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">/*When lok*/</span> <span style="color: #0000ff;">update</span>    <span style="color: #0000ff;">LEFT</span>   <span style="color: #000000;">2007</span>      <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cog"</span><br /><br />      @ <span style="color: #000000;">175</span>, nMargen + <span style="color: #000000;">120</span> <span style="color: #0000ff;">BTNBMP</span>  oBtnSalir <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span>  <span style="color: #0000ff;">action</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>    <span style="color: #0000ff;">LEFT</span>   <span style="color: #000000;">2007</span>         <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cubes"</span><br /><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> </div>[/code:82m9puyw] Se muestra todo correctamente, el dialogo responde al teclado, pero es imposible hacer click en ningún control. También probé de poner el TPanel después de la declaración de los controles, pero en ese caso los controles quedan ocultos detrás del TPanel. Estoy seguro de que es una cosita de nada, pero no logro verla. Tal vez tenga que probar con otro control? Alguien ha hecho algo parecido? TIA
Control equivalente a Group de otro color
Prueba asi [code=fw:x3ownfii]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nMargen:= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1280</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cLogin &nbsp; &nbsp;:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cPassword := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">Local</span> oPanel<br /><span style="color: #00C800;">Local</span> oSay<br /><span style="color: #00C800;">Local</span> oDlg<br /><span style="color: #00C800;">Local</span> oFontB<br /><span style="color: #00C800;">Local</span> oGet<br /><span style="color: #00C800;">Local</span> oBtnEntrar<br /><span style="color: #00C800;">Local</span> oBtnSalir<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Tahoma"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-12</span><br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_BORDER, WS_POPUP <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,ScreenHeight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-200</span> <span style="color: #0000ff;">COLOR</span> CLR_GRAY, 0xffffff<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">41</span>, nMargen &nbsp; <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aplicacion"</span> <span style="color: #B900B9;">/* SIZE 100, 40 */</span> &nbsp;<span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">COLOR</span> CLR_GREEN<br />&nbsp; &nbsp; &nbsp; &nbsp;oSay:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFontB <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">/* This is what's been replaced<br />&nbsp; &nbsp; &nbsp; &nbsp;@ 60, nMargen GROUP &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TO 215, nMargen + 200 &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OF oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PIXEL TRANSPARENT ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR CLR_GREEN<br />&nbsp; &nbsp; &nbsp; &nbsp;*/</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oPanel:= TPanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">60</span>, nMargen, <span style="color: #000000;">215</span>, nMargen + <span style="color: #000000;">200</span>, oDlg <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;oPanel:<span style="color: #000000;">bPainted</span>:= <span style="color: #000000;">&#123;</span>|hDC, cPS| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RoundBox<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oPanel:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-1</span>, oPanel:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-1</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, 0xaaaaaa, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br /><br />&nbsp; &nbsp;<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> PonControls<span style="color: #000000;">&#40;</span> oPanel, oDlg, oFontB <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFontB:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> PonControls<span style="color: #000000;">&#40;</span> oPanel, oDlg, oFontB <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nMargen:= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1280</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>*<span style="color: #000000;">2</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cLogin &nbsp; &nbsp;:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cPassword := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oSay<br /><span style="color: #00C800;">Local</span> oGet<br /><span style="color: #00C800;">Local</span> oBtnEntrar<br /><span style="color: #00C800;">Local</span> oBtnSalir<br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">80</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Introduzca Usuario y Contraseña"</span> &nbsp; <span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">115</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Usuario"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">10</span>*<span style="color: #000000;">2</span> &nbsp; <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oPanel<br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">137</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">GET</span> cLogin &nbsp; <span style="color: #0000ff;">OF</span> oPanel &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">14</span>*<span style="color: #000000;">2</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Hola'</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BITMAP <span style="color: #ff0000;">"USER_16"</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">165</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Password:"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">10</span>*<span style="color: #000000;">2</span> &nbsp;<span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">PIXEL</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">167</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">var</span> cPassword &nbsp; <span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">14</span>*<span style="color: #000000;">2</span> PASSWORD <span style="color: #0000ff;">UPDATE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Hola'</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BITMAP <span style="color: #ff0000;">"KEY_16"</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">195</span>, nMargen + <span style="color: #000000;">40</span> <span style="color: #0000ff;">BTNBMP</span> &nbsp;oBtnEntrar &nbsp; <span style="color: #0000ff;">OF</span> oPanel &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span>*<span style="color: #000000;">2</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Acceder"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">/*When lok*/</span> <span style="color: #0000ff;">update</span> &nbsp; &nbsp;<span style="color: #0000ff;">LEFT</span> &nbsp; <span style="color: #000000;">2007</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cog"</span><br /><br />&nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">195</span>, nMargen + <span style="color: #000000;">120</span> <span style="color: #0000ff;">BTNBMP</span> &nbsp;oBtnSalir &nbsp; <span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span>*<span style="color: #000000;">2</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> &nbsp;<span style="color: #0000ff;">action</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #0000ff;">LEFT</span> &nbsp; <span style="color: #000000;">2007</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cubes"</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br />&nbsp;</div>[/code:x3ownfii]
Control equivalente a Group de otro color
Gracias Cristobal, probé, y como te habia comentado en el otro hilo, no se muestran los controles. [url:2h8lct56]http&#58;//www&#46;mediafire&#46;com/view/frq7be1x9b2h811/_2015-04-23_15-54-52&#46;png[/url:2h8lct56] Creo que ya encontré la forma, pero con TGroup + pintado a mano....
Control equivalente a Group de otro color
Cristobal, El otro msg terminaba con un offtopic, comentándote que me mudé a Loeches pero sigo trabajando en Atisa, en el Pol Ind. Las Monjas, por si podemos quedar por las cervecitas que nos debemos <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> ... A las que por supuesto quedan invitados los que estén cerca y quieran darse una vuelta! Hace poco hubo "amenaza de reunión" con el tema FiveTouch, pero al final no llegó a concretarse. ¿No se animan los que están más o menos cerca de organizar al menos una quedada? Al menos para conocernos las caras! En su momento nos reunímos con Biel, Rafa Carmona, Andrés Gonzalez y Carles Aubia, y la pasamos fantásticamente, y es una experiencia que podríamos repetir.
Control equivalente a Group de otro color
Carlos [url=http&#58;//postimage&#46;org/:3f46gn8v][img:3f46gn8v]http&#58;//s7&#46;postimg&#46;org/vi7fw4oln/Title145&#46;png[/img:3f46gn8v][/url:3f46gn8v] No entiendo por qué no te salen los controles, yo lo he hecho segun tu ejemplo a falta de los recursos. O mandame un ejemplo con los recursos y lo miro Lo de la cervecita, cuando quieras, ya intentare volver a contactar contigo a ver si podemos coincidir, creo que aun tengo tu telefono
Control equivalente a Group de otro color
[code=fw:2oqicgo4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nMargen:= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1280</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cLogin &nbsp; &nbsp;:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cPassword := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oPanel<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oSay<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oFontB<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oGet<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oBtnEntrar<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oBtnSalir<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Tahoma"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-12</span><br />&nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_BORDER, WS_POPUP <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">SIZE</span> ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,ScreenHeight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-200</span> <span style="color: #0000ff;">COLOR</span> CLR_GRAY, 0xffffff<br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">41</span>, nMargen &nbsp; <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aplicacion"</span> <span style="color: #B900B9;">/* SIZE 100, 40 */</span> &nbsp;<span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFontB <span style="color: #0000ff;">COLOR</span> CLR_GREEN<br /><br />&nbsp; &nbsp; oSay:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFontB <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #B900B9;">/* This is what's been replaced<br />&nbsp; &nbsp; @ 60, nMargen GROUP &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TO 215, nMargen + 200 &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OF oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PIXEL TRANSPARENT ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR CLR_GREEN<br />&nbsp; &nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp; &nbsp;oPanel:= TPanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">60</span>, nMargen, <span style="color: #000000;">215</span>, nMargen + <span style="color: #000000;">200</span>, oDlg <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oPanel:<span style="color: #000000;">bPainted</span>:= <span style="color: #000000;">&#123;</span>|hDC, cPS| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RoundBox<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oPanel:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-1</span>, oPanel:<span style="color: #000000;">nHeight</span><span style="color: #000000;">-1</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, 0xaaaaaa, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<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> PonControls<span style="color: #000000;">&#40;</span> oPanel, oDlg, oFontB <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFontB:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;<span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">Function</span> PonControls<span style="color: #000000;">&#40;</span> oPanel, oDlg, oFontB <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nMargen:= <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>ScreenWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-1280</span><span style="color: #000000;">&#41;</span>/<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>*<span style="color: #000000;">2</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cLogin &nbsp; &nbsp;:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cPassword := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oSay<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oGet<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oBtnEntrar<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oBtnSalir<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">80</span>, &nbsp;nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Introduzca Usuario y Contraseña"</span> &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">255</span>, GetSysColor<span style="color: #000000;">&#40;</span> <span style="color: #000000;">15</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">12</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">115</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Usuario"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">10</span>*<span style="color: #000000;">2</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">255</span>, GetSysColor<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oPanel<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">137</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">GET</span> cLogin &nbsp; <span style="color: #0000ff;">OF</span> oPanel &nbsp; <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">14</span>*<span style="color: #000000;">2</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_YELLOW &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Hola'</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BITMAP <span style="color: #ff0000;">"USER_16"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">165</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Password:"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">45</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">10</span>*<span style="color: #000000;">2</span> &nbsp;<span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_HRED &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">180</span>, nMargen + <span style="color: #000000;">40</span> &nbsp;<span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">var</span> cPassword &nbsp; <span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>*<span style="color: #000000;">2</span>, <span style="color: #000000;">14</span>*<span style="color: #000000;">2</span> PASSWORD <span style="color: #0000ff;">UPDATE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_HBLUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Hola'</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BITMAP <span style="color: #ff0000;">"KEY_16"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">220</span>, nMargen + <span style="color: #000000;">40</span> <span style="color: #0000ff;">BTNBMP</span> &nbsp;oBtnEntrar &nbsp; <span style="color: #0000ff;">OF</span> oPanel &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span>*<span style="color: #000000;">2</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Acceder"</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">/*When lok*/</span> <span style="color: #0000ff;">update</span> &nbsp; &nbsp;<span style="color: #0000ff;">LEFT</span> &nbsp; <span style="color: #000000;">2007</span> &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cog"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">220</span>, nMargen + <span style="color: #000000;">125</span> <span style="color: #0000ff;">BTNBMP</span> &nbsp;oBtnSalir &nbsp; <span style="color: #0000ff;">OF</span> oPanel <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">20</span>*<span style="color: #000000;">2</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Salir"</span> &nbsp;<span style="color: #0000ff;">action</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #0000ff;">LEFT</span> &nbsp; <span style="color: #000000;">2007</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cubes"</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2oqicgo4] 
Control equivalente a Group de otro color
[quote="Carlos Mora":3ljf0ihd]Cristobal, El otro msg terminaba con un offtopic, comentándote que me mudé a Loeches pero sigo trabajando en Atisa, en el Pol Ind. Las Monjas, por si podemos quedar por las cervecitas que nos debemos <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> ... A las que por supuesto quedan invitados los que estén cerca y quieran darse una vuelta! Hace poco hubo "amenaza de reunión" con el tema FiveTouch, pero al final no llegó a concretarse. ¿No se animan los que están más o menos cerca de organizar al menos una quedada? Al menos para conocernos las caras! En su momento nos reunímos con Biel, Rafa Carmona, Andrés Gonzalez y Carles Aubia, y la pasamos fantásticamente, y es una experiencia que podríamos repetir.[/quote:3ljf0ihd] Yo estoy dispuesto tambien, a ver si se anima el tema y nos conocemos
Control equivalente a Group de otro color
Hola Joao, [quote="karinha":1mc73b4i][code=fw:1mc73b4i]<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 />&nbsp;</div>[/code:1mc73b4i] [/quote:1mc73b4i] Así si me funcionó, probablemente la solucion de Cristobal no me funcionaba por la versión de FW que tengo, la Feb'13, que ya tiene su tiempo. De todas maneras debo buscar una solución más sencilla, si fuera a usar los TGroups en unos pocos diálogos estaría bien, pero hay que usarlos en toda la aplicación, y no voy a partir la declaración de los dialogos solo por ese detalle. Gracias por la ayuda. Un saludo
Control fecha
Hola a todos, A ver si me saben decir como puedo controlar que una cadena no se puede convertir a fecha por que sería una fecha incorrecta; es decir, si tengo cFecha = "30/02/2012", éta no se podrá convertir por que no existe el día 30 en febrero. Seguro que es una chorrada pero a estas horas estoy bastante bloqueado. Gracias,
Control fecha
Hola FiveWiDi: En la librería NF.lib de Harbour (tambien xHarbour), que se refiere a Nanforum.lib, en ella esta la funcion FT_FDay(dFecha) Primer dia del mes, FirstDay FT_LDay(dfecha) Ultimo dia del mes, LastDay yo las uso en mis programas sin problemas. Hay varias funciones de fecha muy útiles en esta librería. Saludos Ruben Fernandez.
Control fecha
Y que tal esta idea? [code=fw:i5m0v82j]<div class="fw" id="{CB}" style="font-family: monospace;"><br />dDate := ctod<span style="color: #000000;">&#40;</span> cFecha <span style="color: #000000;">&#41;</span><br />isGoodDate :=  ALLTRIM<span style="color: #000000;">&#40;</span> DTOC<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == ALLTRIM<span style="color: #000000;">&#40;</span> cFecha <span style="color: #000000;">&#41;</span><br /> </div>[/code:i5m0v82j] Reinaldo.
Control fecha
Muchas gracias a ambos, me quedo con la de Reinaldo. Este foro es una joya. Gracias.
Control fecha
FiveWidi: Ahí te va otra LOCAL dFecha := CTOD(" / / ") IF EMPTY(dFecha := CTOD("30/02/2012")) MsgStop("Fecha erronea !") ENDIF Saludos
Control fecha
Si no tenes la libreria o usas xharbour este pequeño programa te resuelve tu problema Puedes escribir de la siguiente forma Local fFecha := CTOD("03/02/2012") // la fecha que tu quieres consultar Local uFecha := Date() // le das forma a la variable uFecha := UltimoDia( fFecha ) // aqui la funcion te devuelve la fecha con el ultimo dia del mes //---------------------------------------------------------------------------// // Method UltimoDia( ) Retorna el el final de un mes //--------------------------------------------------------------------------// Function UltimoDia(xFecha) Local xMes := Month( xFecha ) Local xAno := Year( xFecha ) Local nDias := 1 Local MiFecha := Date() MiFecha := CTOD("01/"+StrZero(Month(xFecha),2)+"/"+StrZero(Year(xFecha),4)) Do While nDias < 31 MiFecha := MiFecha + 1 If Month( MiFecha ) > xMes Exit EndIf nDias := nDias + 1 If nDias = 31 Exit EndIF EndDo MiFecha := CTOD( StrZero(nDias,2)+"/"+StrZero(xMes,2)+"/"+StrZero(xAno,4) ) Return( MiFecha ) //--------------------------------------------------------------------------//
Control fecha
Solo para que les sirva de información, no hace falta escribir funciones para buscar el último día del mes. Si lo que se busca es el último día del mes, Harbour ya tiene una función nativa: EoM( dDate ) devuelve el último día del mes dDate. Si lo que se busca el es primer día del mes, Harbour ya tiene una función nativa: BoM( dDate ) devuelve el primer día del mes. Igual existe EoQ (end of quarter), EoY (end of Year).... Pero no me parece que esto es lo que se pregunta en este hilo. Saludos, Reinaldo.
Control fecha
Juan Carlos Para sacar el último día podes usar esta función [code=fw:vhp8vq0b]<div class="fw" id="{CB}" style="font-family: monospace;"><br />DaysInMonth<span style="color: #000000;">&#40;</span>Month<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:vhp8vq0b] Saludos, Adhemar
Control fecha
Si lo que estas buscando es el último día del mes y sabes el mes y el año, lo que yo hago es al 1 del mes siguiente le resto 1, excepto si el mes es 12 que se que son siempre 31. En tu caso lo que haría es: [code=fw:1ch90irt]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cmonth = <span style="color: #000000;">2</span><br />cyear = <span style="color: #000000;">2012</span><br /><br /><span style="color: #00C800;">if</span> cmonth = <span style="color: #000000;">12</span><br />  cfecha = ctd<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"31/12/"</span> + str<span style="color: #000000;">&#40;</span>cyear,<span style="color: #000000;">4</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br />  cfecha = ctod<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"01/"</span> + str<span style="color: #000000;">&#40;</span>cmonth<span style="color: #000000;">+1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"/"</span> + str<span style="color: #000000;">&#40;</span>cyear,<span style="color: #000000;">4</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span><br /><span style="color: #00C800;">endif</span><br /> </div>[/code:1ch90irt] Un saludo y espero que te sirva Carlos
Control para 3 estatus? (RESUELTO)
Hola Amigos del foro: Me explico, con el control CheckBox podemos mostrar dos estatus Sí o No, verdadero o falso, pues bien necesito un tipo de control que me permita 3 estatus, Sí o No y Ninguno de los dos o no aplica. Ojalá me haya explicado bien, algún control o idea que me permita estos 3 estatus? Saludos
Control para 3 estatus? (RESUELTO)
Puedes echar una ojeada a la clase TRadMenu
Control para 3 estatus? (RESUELTO)
Cristóbal: Gracias por el tip, voy a buscar, tengo la aplicación con FW0810. Saludos
Control para 3 estatus? (RESUELTO)
Armando, No sé si estará en esa versión, pero en cualquier caso no te será difícil fabricártelo con 3 TRadios o 3 CheckBox, utilizando la claúsula ON CHANGE en cualquiera de ellos
Control para 3 estatus? (RESUELTO)
Cristobal: Me parece que tengo todas las agravantes, debe ser en un xBrowse donde son demasiadas columnas, por lo que para ahorrar espacio debo usar algo como el checkbox, el origen es un recordset donde el campo contiene una actividad que su estatus puede ser Realizada, aún no realizada o bien no lleva esa actividad, solo debo presentar el recordset, es decir es no editable. Creo que puedo tirar por un checkbox, a ver como me las arreglo. Saludos
Control para 3 estatus? (RESUELTO)
Have a look at 3-state checkbox. EMG
Control para 3 estatus? (RESUELTO)
Enrico: I wil. Thanks so much
Control para 3 estatus? (RESUELTO)
Cristóbal y Enrico: Problema resuelto con la sugerencia de Enrico. Muchas gracias
Control remoto de Windows Mobile
Este programa sirve para tomar el control de Windows Mobile es exelente. <!-- m --><a class="postlink" href="http://www.mtux.com/">http://www.mtux.com/</a><!-- m -->
Control remoto del PC
Buenas: Tengo un sistema DBF/CDX corriendo perfectamente. Algunos clientes me demandan poder hacer uso del sistema remotamente, por ejemplo, mediante una especie de "escritorio remoto". La pregunta: ¿Se podría trabajar en el equipo remoto sin alterar o tomar control sobre la sesión del usuario local que está usando en ese momento el equipo?, es decir, sin "molestar" al usuario que está haciendo uso del equipo en ese momento? Gracias. Un saludo. LORENZO.
Control remoto del PC
Hola Para eso deberas montar un servidor con winserver 2008/2012/2016 para estos sistemas solo tiene para 2 conexiones remota gratis de lo contrario deberas comprar licencia Si lo hace desde un windows 7/10 no podras compartir el escritorio, se lo tomara el usuario remoto hasta que se desconecte
Control remoto del PC
Hola Lorenzo, Yo hace años que instalo a mis clientes la aplicación + datos (DBF) en su server 2008/2012 etc. y con la licencia adecuada de Microsoft (antes Terminal Server), a través del escritorio remoto puedes acceder a la instalación desde cualquier parte (Windows xp, 7, 10 etc.), incluidos teléfonos y tabletas (estos últimos con el software de conexión adecuado ya sea iOS o Androide), compartir impresoras o discos, etc. y por supuesto sin desconectar a los que estén en red local en ese momento, no importa el número de usuarios. Saludos <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Control remoto del PC
Si no vas a cargar el sistema con muchos usuarios puedes utilizar RDPWrapper sobre cualquier equipo con windows 7 en adelante. [url:160b2epp]http&#58;//visionwinsoftware&#46;blogspot&#46;com&#46;es/2017/07/videotutorial-para-la-conexion-de&#46;html[/url:160b2epp] [url:160b2epp]https&#58;//appuals&#46;com/how-to-setup-rdp-on-windows-10-all-versions/[/url:160b2epp]
Control sin parent
Antonio, Una solución sería que hagas el diálogo transparente y que solo se vean los controles que desees Revisa el ejemplo samples/newhelp.prg
Control sin parent
Hola, Estoy casi seguro que la respuesta es NO ! Pero aún así lo preguntaré. ¿ Es posible en fwh poner un btnbmp en pantalla sin padre ? Lo que yo pretendo es mostrar un dialog sin borde y fuera del dialog, junto al lado derecho, mostrar un par de btnbmp. Como casi seguro la respuesta es, ¿ se os/les ocurre alguna alternativa ? A mi de momento se me ocurre hacer un poco mas grande el dialogo e incluir los botones dentro del dialogo, pero se queda feote porque la parte inferior, debajo del segundo boton hasta el final del dialogo se queda con el color relleno del dialogo.. Gracias por vuestra atencion.
Control sin parent
Antonio, De verdad... no habia leido tu respuesta y ya habia aplicado la transparencia como solucion !!! <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Lo que he hecho es que el fondo del dialogo sea transparente, los controles no son transparentes. Le he dado al dialogo un color de fondo (oDlg:nClrPanel) extraño, es decir, no usado en ningun control y luego he aplicado al dialogo una mascara color de transparencia, asi: [code=fw:3ct2ns2y]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> TranspColor<span style="color: #000000;">&#40;</span> oWnd, nRGB <span style="color: #000000;">&#41;</span><br />SetWindowLong<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span>, GWL_EXSTYLE, WS_BORDER <span style="color: #000000;">&#41;</span><br />SetWindowLong<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span>, GWL_EXSTYLE, WS_EX_LAYERED <span style="color: #000000;">&#41;</span><br />SetLayeredWindowAttributes<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">hWnd</span>, nRgb, <span style="color: #000000;">0</span>, LWA_COLORKEY <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3ct2ns2y] Y ha funcionado. Este sistema puede dar buen resultado para futuras necesidades. En todo caso, muchas gracias.
Control tipo ""Configuracion Avanzada""
Quisera saber si alguien a implementado algo como esto: En cualquier ventana de Windows (pe. abriendo "Mi PC"), seleccionas "Herramientas" y luego "Opciones de Carpeta". Luego haces click en la pestaña "Ver"... ... ¿Es posible realizar en FW un control, dentro de una ventana o de un dialogo, al estilo donde dice "Configuración Avanzada" ? Notar que es un control tipo tree, que no es "colapsable", que tiene BMP, y que ademas contiene RADIO y CHECKBOX en las "ramas" del arbol ! ¿Alguien a tomado en consideracion o ha tenido experiencia en este sentido? ¿Podrían agregar un pequeño código (si es "pequeño")? Gracias anticipadas,
Control tipo ""Configuracion Avanzada""
Hola Tanto como lo indicas, no. Pero si uso lo siguiente, para que el usuario pueda definir algunos parametros a usar dentro en la App. [img:1g6eni62]http&#58;//img523&#46;imageshack&#46;us/img523/1052/configu0xr&#46;jpg[/img:1g6eni62] Saludos
Control tipo ""Configuracion Avanzada""
Gracias Amigo, Así ya lo he estado haciendo desde hace años. El problema es que ya son muchas las opciones para configurar la aplicación, y muchas las pestañas de los folder, y he estado considerando que ya debería tener una especie de "browse de RADIOS y CHECKBOXes", pero no se como !!! Gracias de nuevo,
Control tipo ""Configuracion Avanzada""
Umm pudieras implemetar un tsbrowse con dos columnas una de descripion de la configuracion y otra columna con los checkbox o listbox con las opciones posible. salu2 carlos vargas
Control-Limit for Dialog-Option TRANSPARENT ?
Hello, In a dialog i use many radios. From a certain amount i get a exeption-Error. It seems, there is a limit of cntrols ? Without TRANSPARENT it works. I changed some radios but nothing helps. From round about 20 Radios, the program failes. [img:ze4kuqxu]http&#58;//www&#46;pflegeplus&#46;com/pictures/error1&#46;jpg[/img:ze4kuqxu] [img:ze4kuqxu]http&#58;//www&#46;pflegeplus&#46;com/pictures/error2&#46;jpg[/img:ze4kuqxu] [code:ze4kuqxu] FUNCTION INIT_BAR&#40;oWnd&#41; LOCAL oDlg5 LOCAL aCORS &#58;= &#123;&#125; LOCAL oTabs1 &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; DEFINE DIALOG oDlg5 RESOURCE "INI_SET" PIXEL BRUSH oBrush2 TRANSPARENT // The RADIO's // ---------------------------------- // Set Date REDEFINE RADIO oTabs1 VAR e_RADIO1 ID 10,20, 30, 40, 50, 60, 70, 80 OF oDlg5 UPDATE ; ON CHANGE&#40; oTabs1&#58;Refresh&#40;&#41; &#41; // ---------------------------------- // Insert / Overwrite REDEFINE RADIO oTabs2 VAR e_RADIO2 ID 110, 120 OF oDlg5 UPDATE ; ON CHANGE&#40; oTabs2&#58;Refresh&#40;&#41; &#41; // ----------------------------------- // Text-Color REDEFINE RADIO oTabs6 VAR e_COLTWAHL ID 600,601,602,603,604,605,606 OF oDlg5 UPDATE ; ON CHANGE&#40; oTabs6&#58;Refresh&#40;&#41; &#41; // ---- More Radios not possible from here ERROR ! // only with TRANSPARENT !!! // ---------------------------------------------------------------- // Gradient Start *REDEFINE RADIO oTabs4 VAR e_COLSTART ID 500,501,502,503,504,505,506,507 OF oDlg5 UPDATE ; *ON CHANGE&#40; oTabs4&#58;Refresh&#40;&#41; &#41; // ------------------------------------ // Gradient End *REDEFINE RADIO oTabs5 VAR e_COLEND ID 400,401,402,403,404,405,406,407,408 OF oDlg5 UPDATE ; *ON CHANGE&#40; oTabs5&#58;Refresh&#40;&#41; &#41; // ------------------------------------ // Brush Window *REDEFINE RADIO oTabs7 VAR e_BRUSH1 ID 900,901,902,903,904,905,906,907,908,909,910 OF oDlg5 UPDATE ; *ON CHANGE&#40; oTabs7&#58;Refresh&#40;&#41; &#41; //------------------------------------- // Brush Dialog *REDEFINE RADIO oTabs8 VAR e_BRUSH2 ID 920,921,922,923,924,925,926,927,928,929,930 OF oDlg5 UPDATE ; *ON CHANGE&#40; oTabs8&#58;Refresh&#40;&#41; &#41; ACTIVATE DIALOG oDlg5 CENTERED ; ON INIT &#40; aCORS &#58;= GetCoors&#40; oDlg5&#58;hWnd &#41; &#41; RETURN&#40; NIL &#41; [/code:ze4kuqxu] Maybe there are to many radios ? Just to see, how it looks, i used some small xBrowsers with a Array-sample. I think it looks better and there was no Error. As a color-selector, i could show each row with the color i want to use. [img:ze4kuqxu]http&#58;//www&#46;pflegeplus&#46;com/pictures/error3&#46;jpg[/img:ze4kuqxu] Regards uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Control-Limit for Dialog-Option TRANSPARENT ?
Its strange, there should not be any limitation...
Control-Limit for Dialog-Option TRANSPARENT ?
Hi. I have this problem too, but not recent. The solution that I found is place a half of controls in a folder and a half in another folder page. Regards, Toninho.
Controlar Btn do cgetFile32() ???
Estou usando o cGetFile32 e eu gostaria de saber como posso controlar os Botoes da Cx de Dialog q se abre com cGetFile32() ??? Tipo assim, se eu teclar CANCELAR quero q ele execute uma determinada açao. Isto es possible ? Estou usando assim: cArqTxt:= cGetfile32("texto | dados.txt |" ,"Selecione Arquivo dados.txt",,.F.) Saluds
Controlar Btn do cgetFile32() ???
ale, não seria só você testar se a variavel cArqTxt esta vazia? if empty(cArqTxt) msginfo("cancelou") else msginfo("selecionou") endif Espero ter ajudado
Controlar Gets y validaciones...
Hola buenas tardes, esperando que se encuentren bien, les envio cordial saludos. Por este medio les pido su amable ayuda de como controlar el get y en cada campo tengo validados ciertas condiciones, pero como controlar que del segundo campo me regrese al primer campo principal,espero haberme explicado y expongo el ejemplo : [code=fw:1pnssgu9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ENTSAL"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Entrada y salida personal"</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cNomUsua &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span> &nbsp;<span style="color: #0000ff;">VALID</span> V_NOMUSUA<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cCveUsua &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">VALID</span> V_CVEUSUA<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Aqui en caso que me valide y teclee por error nombre de usuario, que me permita regresar al primer campo cNomUsua</span><br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nCveMotiv <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"9"</span> &nbsp;<span style="color: #0000ff;">VALID</span> V_CVEMOTIV<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ACTION</span> SelTipMot<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> |nKey| IIF<span style="color: #000000;">&#40;</span> nKey == VK_F2,<span style="color: #000000;">&#40;</span>oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,Eval<span style="color: #000000;">&#40;</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bAction</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Presiona F2"</span><br /><br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSay<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> cDescMot <span style="color: #0000ff;">ID</span> <span style="color: #000000;">151</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFnt1 <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cObservac <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@S30"</span> <span style="color: #0000ff;">VALID</span> V_OBSERVAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> Reg_EntSal<span style="color: #000000;">&#40;</span>oDlg, oLbx<span style="color: #000000;">&#41;</span></div>[/code:1pnssgu9] //------------------------------------------------------------------------------ STATIC FUNCTION V_NOMUSUA() IF EMPTY(cNomUsua) MsgAlert("Error: Teclear nombre usuario!") oGet[01]:SetFocus() RETURN .F. ENDIF RETURN (.T.) //------------------------------------------------------------------------------ STATIC FUNCTION V_CVEUSUA() (S01)->( DbSeek(cNomUsua+cCveUsua) ) IF (S01)->( !FOUND() ) MsgAlert("Error: Nombre de usuario ó clave no válido") oGet[02]:SetFocus() RETURN .F. ENDIF RETURN(.T.) //------------------------------------------------------------------------------ STATIC FUNCTION V_CVEMOTIV() (S02)->( DbSeek(STR(nCveMotiv,1)) ) IF (S02)->( FOUND() ) cDescMot := (S02)->DESCMOTI ELSE MsgAlert("Error: Código no encontrado") RETURN .F. ENDIF oSay[01]:Refresh() RETURN(.T.) //------------------------------------------------------------------------------ STATIC FUNCTION V_OBSERVAC() IF !GetKeyState( VK_RETURN ) .and. !GetKeyState( VK_DOWN ) .and. !GetKeyState( VK_TAB ) RETURN( .T. ) ENDIF IF EMPTY(cObservac) MsgAlert("Error: Favor teclear observación o entrada normal") RETURN .F. ENDIF RETURN(.T.) //------------------------------------------------------------------------------ FUNCTION SelTipMot() LOCAL oDlg, oLbx DbSelectArea(S02) (S02)->( SetSeek(STR(nCveMotiv,1)) ) DEFINE DIALOG oDlg RESOURCE "SELCAT" TITLE "Catálogo tipos de motivos" REDEFINE LISTBOX oLbx FIELDS STR((S02)->CVEMOTIV,1), SUBS((S02)->DESCMOTI,1,16); HEADER "Código", "Descripción Motivo"; SIZES 30,50; ALIAS (S02)->(ALIAS()) ID 101 OF oDlg oLbx:aJustify := {0,0} oLbx:lCellStyle := .T. oLbx:nClrForeHead:= CLR_BLUE oLbx:bLDblClick := {|| oDlg:END()} oLbx:bKeyDown := {| nKey| IF(nKey = 13, oDlg:END(), .T.)} ACTIVATE DIALOG oDlg nCveMotiv := (S02)->CVEMOTIV oGet[03]:Refresh() Release oDlg, oLbx RETURN NIL Espero haberme explicado, que no recuerdo como adjuntar la imagen.. Saludos cordiales. Atte: Adrian C. C. <!-- e --><a href="mailto:acc69@hotmail.com">acc69@hotmail.com</a><!-- e -->
Controlar Gets y validaciones...
Para saltar al objeto que quieras, en tu caso un oGet, esta bien como usas el oGet:SetFocus(), agregale oGet:Refresh(), pero debes pasar el oGet como parametro en tu funcion, a menos que tu oGet sea Public, espero haber entendido lo que quieres hacer, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Controlar Gets y validaciones...
[quote="joseluisysturiz":24ibqhfc]Para saltar al objeto que quieras, en tu caso un oGet, esta bien como usas el oGet:SetFocus(), agregale oGet:Refresh(), pero debes pasar el oGet como parametro en tu funcion, a menos que tu oGet sea Public, espero haber entendido lo que quieres hacer, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:24ibqhfc] Hola Jose Luis gracias por responder, lo que quiero hacer, como el primer campo no puedo darle ENTER por estar vacio, logico que me valida que tengo que teclear al segundo campo igual me valida, pero que pasa si tecleo bien la clave, y nombre de usuario esta mal, y quiero retornar al primer campo pero no me deja, porque me valida que debo teclear la clave, a pesar este o no vacio la clave, no me deja retornar al primero y corregir al primer campo de usuario, y siempre tendria que salirme con escape, y quiero evitar salirme con escape,habra algun otro metodo ? Ah como comentario el oGet es Static , no publica..durante el proceso ...del modulo Saludos amigo.
Controlar Gets y validaciones...
Ok, creo entendi mejor, yo te recomendaria que no uses valid en ninguno de los GET, sino que en un boton ACEPTAR, llames na funcion que entonces valide si el usuario y la clave son correctas, si alguno de los datos son incorrectos, entonces lo informas y le das el focus al GET del campo errado, asi hago cuando hay pocos GET para no validar uno por uno, al estilo WEB, y en mi sistema de USUARIO y CLAVE hago como te indico, asi nunca te obliga a entrar dato correcto en ningun GET al momento, sino despues en el boton ACEPTAR o OK, como lo quieras llamar, espero haberte dado una buena idea o solucion, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Controlar Gets y validaciones...
[quote="joseluisysturiz":ygti1ckk]Ok, creo entendi mejor, yo te recomendaria que no uses valid en ninguno de los GET, sino que en un boton ACEPTAR, llames na funcion que entonces valide si el usuario y la clave son correctas, si alguno de los datos son incorrectos, entonces lo informas y le das el focus al GET del campo errado, asi hago cuando hay pocos GET para no validar uno por uno, al estilo WEB, y en mi sistema de USUARIO y CLAVE hago como te indico, asi nunca te obliga a entrar dato correcto en ningun GET al momento, sino despues en el boton ACEPTAR o OK, como lo quieras llamar, espero haberte dado una buena idea o solucion, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:ygti1ckk] Mas o menos me das la idea, pero ...tengo 4 y me falta agregar un campo mas que serian 5 campos, que cada campo los valido sin dejar el campo vacio, tanto como ENTER como pasar con el mouse ,tengo en cada valid en cada funcion esta instruccion: IF !GetKeyState( VK_RETURN ) .and. !GetKeyState( VK_DOWN ) .and. !GetKeyState( VK_TAB ) RETURN( .T. ) ENDIF Me permite regresar al primer campo, peroooo...con el mouse no me lo valida,ya que me lo brinca al seleccionar equis campo, y me deja dejar hasta el ultimo campo a teclear y los anteriores me los deja vacios, solo cuando uso el mouse,y con ENTER, no me lo permite hacer,eso es para que el usuario no permita hacer eso. Dame una idea un ejemplo como haria para controlar desde boton aceptar todos los campos validados, que son 5,por fas. Gracias y te lo agradecere mucho amigo.
Controlar Gets y validaciones...
esto lo hice a vuelo de pajaro, nose si habra por alli alguna incoherencia, pero creo deberia ayudarte lo mas posible, solo espero no te enrede mas, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:3j0g7vqh]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>, oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>, oDlg, oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />PROCEDURE lectura<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ENTSAL"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"X"</span><br />&nbsp; &nbsp; &nbsp;<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> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span><br />&nbsp; &nbsp; &nbsp;<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> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> valida_campo<span style="color: #000000;">&#40;</span> cVar, oGet, oDlg <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aceptar"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">WHEN</span> <span style="color: #000000;">&#40;</span> !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cancelar"</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE valida_campo<span style="color: #000000;">&#40;</span> cVar, oGet, oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// POR DEFECTO TODOS LOS CAMPO DEBERAN TENER ALGO, PORQUE SINO</span><br /><span style="color: #B900B9;">// NO SE ACTIVA BOTON ACEPTAR...</span><br /><span style="color: #B900B9;">// SI LO DESEAS PUEDES CAMBIAR DO CASE POR IF...</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....validas lo que tengas que validar en este campo<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....validas lo que tengas que validar en este campo<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....validas lo que tengas que validar en este campo<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....validas lo que tengas que validar en este campo<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....validas lo que tengas que validar en este campo<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;END <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span><br />&nbsp;</div>[/code:3j0g7vqh]
Controlar Gets y validaciones...
[quote="joseluisysturiz":2rlczhh8]esto lo hice a vuelo de pajaro, nose si habra por alli alguna incoherencia, pero creo deberia ayudarte lo mas posible, solo espero no te enrede mas, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:2rlczhh8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>, oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>, oDlg, oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />PROCEDURE lectura<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"ENTSAL"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"X"</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> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</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;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</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;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">103</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</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;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">104</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</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;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">105</span> <span style="color: #0000ff;">OF</span> oDlg PICT <span style="color: #ff0000;">"@"</span><br /><br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> valida_campo<span style="color: #000000;">&#40;</span> cVar, oGet, oDlg <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Aceptar"</span> ;<br />      <span style="color: #0000ff;">WHEN</span> <span style="color: #000000;">&#40;</span> !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. ;<br />         !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> .and. !EMPTY<span style="color: #000000;">&#40;</span>aVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Cancelar"</span><br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span><br />   <br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE valida_campo<span style="color: #000000;">&#40;</span> cVar, oGet, oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// POR DEFECTO TODOS LOS CAMPO DEBERAN TENER ALGO, PORQUE SINO</span><br /><span style="color: #B900B9;">// NO SE ACTIVA BOTON ACEPTAR...</span><br /><span style="color: #B900B9;">// SI LO DESEAS PUEDES CAMBIAR DO CASE POR IF...</span><br />   <br />   <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />      <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />         .....validas lo que tengas que validar en este campo<br /><br />      <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />         .....validas lo que tengas que validar en este campo<br /><br />      <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />         .....validas lo que tengas que validar en este campo<br /><br />      <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />         .....validas lo que tengas que validar en este campo<br /><br />      <span style="color: #00C800;">CASE</span> !EMPTY<span style="color: #000000;">&#40;</span>cVar<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />         .....validas lo que tengas que validar en este campo<br />      <br />   END <span style="color: #00C800;">CASE</span><br />   <br /><span style="color: #00C800;">RETURN</span><br /> </div>[/code:2rlczhh8][/quote:2rlczhh8] Ok gracias mas o menos me das el tiro la idea,pero ....no es posible hacerlo en cada campo cada valid ? como en los tiempos de clipper,obvio que no se usaba mucho el mouse, porque con fivewin, con la instruccion que te indique : [code=fw:2rlczhh8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">IF</span> !GetKeyState<span style="color: #000000;">&#40;</span> VK_RETURN <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// .and. !GetKeyState( VK_DOWN ) .and. !GetKeyState( VK_TAB )</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #00C800;">ENDIF</span></div>[/code:2rlczhh8] Me funciona si todo fuera a puro teclado, pero los usuarios usan mas el mouse al seleccionar equis campo, y se brinca al siguiente sin validarme, o habra alguna forma o metodo que con el mouse me valide ,que se yo!, espero que el maestro Antonio Linares nos pueda ayudar con el tema de validaciones de cada campo,pero este proceso si me es importante que se valide . Pero hare pruebas con tu ejemplo Jose Luis y ver si se me prende el foco solucionar otra manera. Gracias amigo.
Controlar Gets y validaciones...
Claro que puedes hacer los VALID individual, solo tienes que llamar a la funcion valida_campo() que te envie, pero en vez de enviar cVar, enviarias cVar[n], en cada GET, pero para mi , creo es mas trabajo, creo le puedes dar libertad al usuario para que llene los campos sin un orden a menos que en valor de un campo dependa de la validacion de otro, al final vas a validar todos los campo igual, te di esta idea porque al principio nombrastes solo campo usuario y campo clave, si puedes coloca una imagen de tu captura de datos y que quieres validar en cada GET para tratar ayudarte mas, puedes realizar validacion cuando el GET pierda el focus, es decir, cuando el usuario salta de GET en GET con el mouse, aunque sigo creyendo que como te lo dije de validaciones al final con el boton es mas controlable y menos problematico, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Controlar Gets y validaciones...
[quote="joseluisysturiz":5rqam8p4]Claro que puedes hacer los VALID individual, solo tienes que llamar a la funcion valida_campo() que te envie, pero en vez de enviar cVar, enviarias cVar[n], en cada GET, pero para mi , creo es mas trabajo, creo le puedes dar libertad al usuario para que llene los campos sin un orden a menos que en valor de un campo dependa de la validacion de otro, al final vas a validar todos los campo igual, te di esta idea porque al principio nombrastes solo campo usuario y campo clave, si puedes coloca una imagen de tu captura de datos y que quieres validar en cada GET para tratar ayudarte mas, puedes realizar validacion cuando el GET pierda el focus, es decir, cuando el usuario salta de GET en GET con el mouse, aunque sigo creyendo que como te lo dije de validaciones al final con el boton es mas controlable y menos problematico, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:5rqam8p4] Hola amigo, es lo que intente hacer adjuntar la imagen, pero no recuerdo, ya que tiene tiempo que deje de programar y por otra parte perdi todos mis codigos fuentes en que se me daño mi disco duro y no pude recuperar totalmente nada, estoy rehaciendo o intentando rehacer de nuevo pero a la vez me deprime es como empezar de cero...ya intente con las opciones de fivewin, pero no logro subir la imagen que quiero hacer...!
Controlar Gets y validaciones...
Para subir imagen preferiblemente usa <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m --> suscribete, subi tu imagen de tamaño para foro, copias en link, luego aca en el foro le das a la etiqueta [b:1dmkjihz]Img[/b:1dmkjihz] y entre , colocas el link que te de <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m -->, no te desesperes, para eso esta el foro, para ayduarnos unos a los otros, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Controlar Gets y validaciones...
[quote="joseluisysturiz":1hirtpzr]Para subir imagen preferiblemente usa <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m --> suscribete, subi tu imagen de tamaño para foro, copias en link, luego aca en el foro le das a la etiqueta [b:1hirtpzr]Img[/b:1hirtpzr] y entre , colocas el link que te de <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m -->, no te desesperes, para eso esta el foro, para ayduarnos unos a los otros, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:1hirtpzr] Esta es la imagen... [img:1hirtpzr]http&#58;//imageshack&#46;us/content_round&#46;php?page=done&l=img802/5941/n4p&#46;jpg[/img:1hirtpzr]
Controlar Gets y validaciones...
[quote="ACC69":3hnkjl0z][quote="joseluisysturiz":3hnkjl0z]Para subir imagen preferiblemente usa <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m --> suscribete, subi tu imagen de tamaño para foro, copias en link, luego aca en el foro le das a la etiqueta [b:3hnkjl0z]Img[/b:3hnkjl0z] y entre , colocas el link que te de <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m -->, no te desesperes, para eso esta el foro, para ayduarnos unos a los otros, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:3hnkjl0z] Esta es la imagen... [img:3hnkjl0z]http&#58;//imageshack&#46;us/content_round&#46;php?page=done&l=img802/5941/n4p&#46;jpg[/img:3hnkjl0z][/quote:3hnkjl0z] No llego imagen man, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Controlar Gets y validaciones...
[quote="joseluisysturiz":285b6cp7][quote="ACC69":285b6cp7][quote="joseluisysturiz":285b6cp7]Para subir imagen preferiblemente usa <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m --> suscribete, subi tu imagen de tamaño para foro, copias en link, luego aca en el foro le das a la etiqueta [b:285b6cp7]Img[/b:285b6cp7] y entre , colocas el link que te de <!-- m --><a class="postlink" href="http://www.imageshack.us/">http://www.imageshack.us/</a><!-- m -->, no te desesperes, para eso esta el foro, para ayduarnos unos a los otros, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:285b6cp7] Esta es la imagen... No llego imagen man, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:285b6cp7][/quote:285b6cp7] Hola buenos dias a todos, ahi va la imagen, de como puedo validar cada campo y que me permita retornar al campo anterior en caso que este vacio en el campo activo .. [img:285b6cp7]http&#58;//img5&#46;imageshack&#46;us/img5/8035/xmam&#46;png[/img:285b6cp7] Saludos y buen dia !
Controlar Gets y validaciones...
Hola Adrian. Como te dice Jose Luis, utiliza tus validaciones a como lo vienes haciendo por cada Get, pero al final, en el boton Aceptar, vuelve a validar. Ej: Redefine Get oGet1 Var... Valid TuFuncion(var1,var2...) Redefine Get oGet2 Var... Valid TuFuncion(var1,var2...) Redefine Get oGet3 Var... Valid TuFuncion(var1,var2...) Redefine button oBt1....... Action TodoOK(var1,var3,varx...) //---------------------------------------------------------------------- Function TodoOk (var1,var3,varx...) if empty(var1) .or. empty(var3...) //o cualquier otro tipo de validacion Return .f. endif Return .t. Tambien prueba a usar la clausula WHEN en los gets Ej: Redefine Get oGet1 Var... Valid TuFuncion(var1,var2...) Redefine Get oGet2 Var... Valid TuFuncion(var1,var2...) WHEN var1 Redefine Get oGet3 Var... Valid TuFuncion(var1,var2...) WHEN var2 etc Saludos.
Controlar Gets y validaciones...
Una duda: usas ENCRYPT / DECRYPT ???
Controlar Gets y validaciones...
[quote="FranciscoA":2wmkyjl8]Hola Adrian. Como te dice Jose Luis, utiliza tus validaciones a como lo vienes haciendo por cada Get, pero al final, en el boton Aceptar, vuelve a validar. Ej: Redefine Get oGet1 Var... Valid TuFuncion(var1,var2...) Redefine Get oGet2 Var... Valid TuFuncion(var1,var2...) Redefine Get oGet3 Var... Valid TuFuncion(var1,var2...) Redefine button oBt1....... Action TodoOK(var1,var3,varx...) //---------------------------------------------------------------------- Function TodoOk (var1,var3,varx...) if empty(var1) .or. empty(var3...) //o cualquier otro tipo de validacion Return .f. endif Return .t. Tambien prueba a usar la clausula WHEN en los gets Ej: Redefine Get oGet1 Var... Valid TuFuncion(var1,var2...) Redefine Get oGet2 Var... Valid TuFuncion(var1,var2...) WHEN var1 Redefine Get oGet3 Var... Valid TuFuncion(var1,var2...) WHEN var2 etc Saludos.[/quote:2wmkyjl8] Gracias Francisco, creo que lo hare de la forma como me explico Jose Luis, desde boton aceptar , validar cada get que seria por ejemplo: FUNCTION BOTONACEPTAR() IF EMPTY(cNomUsua) MsgAlert("Error: Teclear nombre usuario!") oGet[01]:SetFocus() oGet[01]:Refresh() ENDIF IF EMPTY(cCveUsua) MsgAlert("Error: Teclear clave") oGet[02]:SetFocus() oGet[02]:Refresh() ENDIF IIF nCveMotiv =0 MsgAlert("Error: Teclear código") oGet[03]:SetFocus() oGet[03]:Refresh() ENDIF Es correcto, asi como sugieren, cierto ? hare las pruebas y gracias a los dos Francisco y Jose Luis Saludos y buen dia.
Controlar Gets y validaciones...
[quote="karinha":1a113kea]Una duda: usas ENCRYPT / DECRYPT ???[/quote:1a113kea] Hola Karinha, si efectivamente uso ambos, Encryp y Decryp. Saludos y buen dia!.
Controlar Keystrokes en un GET (Solucionado)
Holas.. Estoy en modo edicion dentro de un get.. Necesito saber si alguien presiono algunas de las teclas de funcion y realizar una accion sin salir del get. Tengo un Valid asociado al get que realiza operaciones de acuerdo al contenido del get, pero no como controlar las teclas de funcion. Por lo pronto debo capturar F2.. F6.. puede que el ESC y otra combinacion rara que me pidan... Saludos.
Controlar Keystrokes en un GET (Solucionado)
Adolfo: Tal vez las funciones GetKeyState() y GetAsyncKey() te sirvan, por ejemplo algo así: [code=fw:1v6phdrl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> GetAsyncKey<span style="color: #000000;">&#40;</span>VK_UP<span style="color: #000000;">&#41;</span> .OR.;<br />    GetAsyncKey<span style="color: #000000;">&#40;</span>VK_SHIFT,VK_TAB<span style="color: #000000;">&#41;</span><br />    tu código......<br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">IF</span> GetKeyState<span style="color: #000000;">&#40;</span>VK_UP<span style="color: #000000;">&#41;</span> .OR.;<br />    GetKeyState<span style="color: #000000;">&#40;</span>VK_SHIFT,VK_TAB<span style="color: #000000;">&#41;</span><br />    tu código .....<br /><span style="color: #00C800;">ENDIF</span><br /> </div>[/code:1v6phdrl] o la función SetKey(), aquí un ejemplo: [code=fw:1v6phdrl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SETKEY<span style="color: #000000;">&#40;</span>VK_F3,<span style="color: #000000;">&#123;</span>|| aGets<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />SETKEY<span style="color: #000000;">&#40;</span>VK_F4,<span style="color: #000000;">&#123;</span>|| OtroPrecio<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:1v6phdrl] Ojalá te sirvan, saludos
Controlar Keystrokes en un GET (Solucionado)
Armando Gracias... Pero encontre la solucion con Redefine Get oGetpro Var cEstado Id 101. ......... oGetPro:bKeyDown:={|nKey,nFlags| CheckGet(nKey,nFlags) } ..... Function CheckGet(nKey,nFlags) Do Case Case nKey=113 // F2 ........ EndCase Return .T.
Controlar PocketPC Device desde PC
Buenos dias a todos Estoy probando con dos librerias activex para poder controlar PocketPC desde una PC de Escritorio. Actualmente logro abrirla por medio de createoleobject pero luego no puedo hacer ninguna llamada a las funciones. He tratado de usar OLEInvoke y Activex&#058;Metodo() y nada. Estoy usando xHarbour 0.99.60 y fivewin 2.7. Los Activex que estoy usando se llaman Srego de <!-- w --><a class="postlink" href="http://WWW.Srego.com">WWW.Srego.com</a><!-- w --> y CESync de <!-- w --><a class="postlink" href="http://www.pda-tec.com">www.pda-tec.com</a><!-- w -->. Talvez me puedan iluminar un poco de lo que estoy haciendo mal. Adjunto parte de mi codigo, Gracias y saludos. // SREGO SregoCETPx:=CreateOleObject("SREGOCETPX.SregoCETPxCtrl.1") msginfo(sregocetpx) // valor asignado = 24125504 MSGinfo(sregocetpx:GetVersion()) // Este ultimo deberia de regresar el numero de la version. Pero me da el error // Error BASE/1004 // 'NUMERIC' has no exported method: GetVersion // CESync SyncAx1:=CreateOleObject("PPC_SyncAxV2.SyncAx") MSGinfo(syncax1) // valor asignado = 1546464 msginfo(syncax1:CreateFolder('\PRUEBA')) // El de arriba me deberia de crear una carpeta en la pocket llamada PRUEBA pero da el mismo error // Error BASE/1004 // 'NUMERIC' has no exported method: GetVersion
Controlar PocketPC Device desde PC
O alguien conoce alguna otra forma de poder lograr lo de arriba. Gracias por la Ayuda
Controlar PocketPC Device desde PC
Hazlo así: MsgInfo( OleInvoke( sregocetpx, "GetVersion" ) )
Controlar PocketPC Device desde PC
Perdon por mi error, los dos anteriores son Activex, mi codigo para llamar las funciones. oActiveX = TActiveX():New( oWnd, "SREGOCETPX.SregoCETPxCtrl.1" ) cl_fer:=oActivex&#058;DO("MakeDirectory","\PRUEBA") MSGinfo(cl_fer) Gracias por la Ayuda Saludos
Controlar Scanner desde Fwh
Algun colega puede ayudarme, necesito una clase para poder controlar dispositivos twain como el scanner y grabar la imagen capturada, sin utilizar librerias de terceros solamente puro fwh, agradezco su ayuda. Cordial saludo, Cristian Caballero Colombia <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Controlar Scanner desde Fwh
<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=279">http://fivetechsoft.com/forums/viewtopic.php?t=279</a><!-- m -->
Controlar Volumen/Sonido és posible?
Buenas, Amigos, és posible controlar el volumen, intensidad del sonido, VIA CODIGO? De una WAVE o MP3? Regards, saludos
Controlar Volumen/Sonido és posible?
Creo que nop se puede o quien sabe <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
Controlar Volumen/Sonido és posible?
Estas funciones te pueden ayudar: /////////////////////////////////////////////////////////////////////////// // Coloca el volumen a un determinado nivel HB_FUNC (SETVOLUME) { DWORD dwVolume = hb_parnl(1); waveOutSetVolume( 0, dwVolume ) ; } //////////////////////////////////////////////////////////////////////////// // Lee el valor del volumen HB_FUNC (GETVOLUME) { DWORD pdwVolume; waveOutGetVolume( 0, &pdwVolume ) ; hb_retni( LOWORD(pdwVolume) ); }
Controlar Volumen/Sonido és posible?
Hola Salvador <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Muchas gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> son rutinas en C verdad, como se manejan <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> también abra alguna manera de poner un boton y apagar y prender lo que se este escuchando en un MP3 Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Controlar dialogo NO MODAL
Hola,Llevo un tiempo buscando una solución a un problema que no puedo terminar de abordar.Se trata de una aplicacion que tiene una barra de botones.Cuando pulso un boton, se abre un dialogo que ha de ser NO MODAL, para poder seguir accediendo a la barra de botones sin necesidad de cerrar dicho dialogo.Hasta aqui va todo bien, Pero...He de controlar que el botón por el que he accedido a ese dialogo, permanezca <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->isable() mientras esté abierto el dialogo.He intentado controlar el boton con WHEN lVar, cambiando su estado a .T. o .F., pero como es un dialogo NO MODAL, no consigo que permanezca Disable() mientras el dialogo esté abierto para cambiar a :Enabled() cuando cierre el dialogo.Ademas, la llamada al dialogo con la barra de botones y el dialogo en si, estan en distintos .PRG.No se si me he explicado bien pero , ¿se te ocurre alguna solución?
Controlar dialogo NO MODAL
Hola Javier, Yo deshabilitaría el botón en el mismo momento de ejecutar su acción, y lo habilitaría en el VALID de la caja de diálogo no modal. De esta forma, la misma caja de diálogo hace el trabajo automaticamente:DEFINE BUTTON oBtn OF oBar ACTION ( oBtn:Disable(), CreaCajaDialogo( oBtn ) ) ... function CreaCajaDialogo( oBtn ) ... DEFINE DIALOG ... ACTIVATE DIALOG oDlg VALID ( oBtn:Enable(), .T. ) ... return nil saludos, Antonio
Controlar dialogo NO MODAL
Ok,funciona perfectamente.Gracias Antonio.
Controlar el Volumen de sonido con Auxsetvol() y AuxGetVol()
Sigo utilizando: Fw24+Clipper53+Blinker5.0. Estoy desarrollando un gestor multimedia y tengo el siguiente problema que ya estoy 2 dias con el. Funciona todo correctamente, Videos, MP3, Imagenes, Etc, EXCEPTO las funciones del control del sonido AuxSetVol() y AuxGetVol(), no logro poder que funcione para poder aumentar y disminuir el sonido. ¿ Funcionan correctamente? ¿ en el caso que no funcionen, alguien podria crear un ejecutable con un fichero INI con harbour para poder controlar el sonido aunque sea desde otro programa ? ( el INI seria solo para que almacene el sonido actual, aumentar y disminuir el sonido en funcion de los paramentros que yo grabe en ese ini ). Muchas gracias anticipadamente.
Controlar el Volumen de sonido con Auxsetvol() y AuxGetVol()
Javier, Si buscas en fw\samples\mmedia\*.prg por AuxSetVol encontrarás varios ejemplo de uso. Revísalos por si te sirven de ayuda.
Controlar el Volumen de sonido con Auxsetvol() y AuxGetVol()
Antonio: Antes de mandar el mensaje ya busque y comprobe todos los ejemplos y documentacion respectos a temas multimedia. Los ejemplos de \MMEDIA funciona todo excepto el control de volumen. Lo unico que si no comente es que corro el programa en XP.
Controlar el Volumen de sonido con Auxsetvol() y AuxGetVol()
Javier, Con que parámetros estás llamando a AuxSetVol() ?
Controlar el Volumen de sonido con Auxsetvol() y AuxGetVol()
Antonio: Respecto a las pruebas sobre el volumen todavia no lo he implementado en mi programa porque en las pruebas de \mmedia\avivideo.prg no funciona. El codigo de pruebas es: REDEFINE SCROLLBAR oSBRight ID 130 RANGE 0,32 ; ON UP (AuxGetVol(5,@nVolL,@nVolR),; AuxSetVol(5,if(nVolL<63000,nVolL+2040,nVolL),nVolR),; AuxGetVol(5,@nVolL,@nVolR),; oTextLV:SetText(Str(nVolL)),oTextRV:SetText(Str(nVolR)) ) ; ON DOWN (AuxGetVol(5,@nVolL,@nVolR),; AuxSetVol(5,if(nVolL>2040,nVolL-2040,nVolL),nVolR),; AuxGetVol(5,@nVolL,@nVolR),; oTextLV:SetText(Str(nVolL)),oTextRV:SetText(Str(nVolR)) ) OF oDlg Gracias de antemano.
Controlar la salida de un programa
He creado una dbf que controla los accesos a los programas. Cuando supero el password de acceso me lo registra en accesos.dbf mediante la función InicioAcceso() y cuando hago alt-F4, Salir del Menu o la crucecita de exit de la ventana, me registra la fecha y la hora de abandono del programa mediante la función FinalizoAcceso(), pero cuando es el sistema que cierra el programa con el boton apagar sistema del inicio de windows sencillamente me cierra el programa sin anotar nada. Alguien sabe si existe alguna forma de controlar que también me ejecute la función de FinalizarAcceso() cuando es apagado el programa por el sistema. Esta función es la ultima que se ejecuta despues de cerrar la ventana principal del programa y por tanto cuando se cierra por el sistema no se llega a ejecutar. Alguna pista?
Controlar la salida de un programa
A, Prueba [code=fw:1xoetnd6]<div class="fw" id="{CB}" style="font-family: monospace;">EXIT PROCEDURE MiFuncion<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />...<br />RETU <span style="color: #00C800;">NIL</span></div>[/code:1xoetnd6]
Controlar la salida de un programa
Perdona Carles he estado liado estos dias y no había entrado en el foro. Lo pruebo a lo largo de la mañana gracias.
Controlar la salida de un programa
Carles, donde encuentro información de EXIT PROCEDURE. Se comporta raro ya que me desaparecen todas las variables y no puedo actualizar la base de datos con variables private que se ven en todos los modulos. Lo que quiero hacer es que cuando se sale del programa es actualizar los datos del ultimo usuario, la fecha y la hora. Pero estos datos me han desaparecido cuando entro en exit procedure, no así si la mantengo como función, pero si cierran el programa por ejemplo con el administrador de tareas no me registra esos datos.
Controlar la salida de un programa
A, Basicamente, esta sentencia se ejecuta justo antes de la salida del programa. Desde dentro del procedimiento puedes ejecutar el codigo que quieras y acceder a todas tus variables VISIBLES desde él. Esta es la explicación teórica de las NG [code=fw:3vabii1s]<div class="fw" id="{CB}" style="font-family: monospace;">EXIT PROCEDURE<br />Declara un procedimiento de clausura<br />?????????????????????????????????????????????????????????????????????????<br />Sintaxis<br /><br />    EXIT PROCEDURE <idProcedimiento><br />       <span style="color: #000000;">&#91;</span>FIELD <lista idCampo> <span style="color: #000000;">&#91;</span>IN <idAlias><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><br />       <span style="color: #000000;">&#91;</span><span style="color: #00C800;">LOCAL</span> <identificador> <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#91;</span>:= <inicializador><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><br />       <span style="color: #000000;">&#91;</span>MEMVAR <lista identificador><span style="color: #000000;">&#93;</span><br />       .<br />       . <sentencias ejecutables><br />       .<br />       <span style="color: #000000;">&#91;</span><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#93;</span><br /><br />Argumentos<br /><br />    EXIT PROCEDURE declara un procedimiento que se ejecuta en la<br />    terminación del programa.<br /><br />    <idProcedimiento> es el nombre del procedimiento de clausura que se<br />    va a declarar. Los nombres de procedimientos de clausura pueden tener<br />    cualquier longitud, pero sólo son significativos los primeros <span style="color: #000000;">10</span><br />    caracteres. Los nombres no deben comenzar con un signo de subrayado,<br />    pero pueden contener cualquier combinación de caracteres, números o<br />    signos de subrayado.<br /><br />Descripción<br /><br />    La sentencia EXIT PROCEDURE declara un procedimiento que se ejecutará<br />    cuando finalice el programa. Los procedimientos de clausura se llaman<br />    después de que se haya completado la última sentencia ejecutable en una<br />    aplicación de CA-Clipper. Las sentencias EXIT PROCEDURE pueden<br />    utilizarse para ejecutar tareas de mantenimiento habituales, como por<br />    ejemplo, guardar los parámetros de configuración en un fichero, cerrar<br />    un fichero de registro o concluir una sesión de comunicaciones.<br /><br />    La visibilidad de los procedimientos de clausura está limitada al<br />    sistema; por lo tanto, no es posible llamar a un procedimiento de<br />    clausura desde un procedimiento o función definido por el usuario. Los<br />    procedimientos de clausura no reciben parámetros.<br /><br />    Una vez que se ha completado la última sentencia ejecutable, el control<br />    pasa de un procedimiento de clausura al siguiente hasta que se ha<br />    llamado a todos los procedimientos de la lista de clausura. El control<br />    pasa seguidamente al sistema operativo.<br />    fuente <span style="color: #000000;">&#40;</span>.prg<span style="color: #000000;">&#41;</span>. Una vez declarado, se hace referencia a las sentencias<br />    EXIT PROCEDURE con este identificador de módulo. Una aplicación puede<br />    utilizar cualquier número de procedimientos de clausura, solicitando de<br />    forma explícita mediante REQUEST sus identificadores de módulo.<br /><br />    Los procedimientos de clausura solicitados para una aplicación se<br />    mencionan, de forma colectiva, como la lista de clausura. No existe un<br />    orden de ejecución obligatorio de procedimientos en la lista de<br />    clausura; <span style="color: #0000ff;">sin</span> embargo, si un procedimiento de clausura se declara en el<br />    mismo módulo fuente <span style="color: #000000;">&#40;</span>.prg<span style="color: #000000;">&#41;</span> que la rutina principal o raíz, éste será el<br />    primer procedimiento de clausura llamado.<br /><br />    La terminación de una aplicación de CA-Clipper dada puede atribuirse a<br />    alguna de las siguientes causas:<br /><br />    ?  <span style="color: #00C800;">RETURN</span> desde la rutina principal o raíz<br /><br />    ?  el mandato QUIT<br /><br />    ?  la ejecución de un <span style="color: #00C800;">BREAK</span> <span style="color: #0000ff;">sin</span> incluir BEGIN SEQUENCE...END<br />    La sentencia ANNOUNCE declara un identificador de módulo para un módulo<br /><br />    ?  error irrecuperable<br /><br />    No se puede garantizar la ejecución de un procedimiento de clausura<br />    cuando el sistema detecta un error irrecuperable. Si se ha producido un<br />    error durante un procedimiento de clausura, el sistema vuelve al DOS.<br />    Los procedimientos de clausura pendientes no se llaman.<br /><br />Ejemplos<br /><br />    ?  En este ejemplo se ilustra la construcción de un mecanismo de<br />       temporización simple, utilizando <span style="color: #0000ff;">INIT</span> y EXIT PROCEDURE:<br /><br />       <span style="color: #B900B9;">// imprime la cantidad de tiempo necesario para,</span><br />       <span style="color: #B900B9;">// leer, ordenar y mostrar una lista de nombres</span><br />       <span style="color: #B900B9;">// de ficheros.</span><br /><br />       ANNOUNCE MiSistema<br /><br />       <span style="color: #00C800;">STATIC</span> nInicio<br /><br />       PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          AEVAL<span style="color: #000000;">&#40;</span> ASORT<span style="color: #000000;">&#40;</span> DIRECTORY<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"*.*"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />              <span style="color: #000000;">&#123;</span> | aInfoFichero | QOUT<span style="color: #000000;">&#40;</span> aInfoFichero<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />          <span style="color: #00C800;">RETURN</span><br /><br />       <span style="color: #0000ff;">INIT</span> PROCEDURE MiInicio<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          nInicio := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          <span style="color: #00C800;">RETURN</span><br /><br />       EXIT PROCEDURE MiClausura<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          ?<br />          ? <span style="color: #ff0000;">"Tiempo transcurrido: "</span><br />          ?? SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nInicio<br />          <span style="color: #00C800;">RETURN</span></div>[/code:3vabii1s] Si tu tienes una funcion montada de tal manera q puedas acceder al conjunto de sus variables desde otro modulo, no tendras problemas en realizar esta accion...
Controlar la salida de un programa
A, Basicamente, esta sentencia se ejecuta justo antes de la salida del programa. Desde dentro del procedimiento puedes ejecutar el codigo que quieras y acceder a todas tus variables VISIBLES desde él. Esta es la explicación teórica de las NG [code=fw:2k5cwwkf]<div class="fw" id="{CB}" style="font-family: monospace;">EXIT PROCEDURE<br />Declara un procedimiento de clausura<br />?????????????????????????????????????????????????????????????????????????<br />Sintaxis<br /><br />    EXIT PROCEDURE <idProcedimiento><br />       <span style="color: #000000;">&#91;</span>FIELD <lista idCampo> <span style="color: #000000;">&#91;</span>IN <idAlias><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><br />       <span style="color: #000000;">&#91;</span><span style="color: #00C800;">LOCAL</span> <identificador> <span style="color: #000000;">&#91;</span><span style="color: #000000;">&#91;</span>:= <inicializador><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><br />       <span style="color: #000000;">&#91;</span>MEMVAR <lista identificador><span style="color: #000000;">&#93;</span><br />       .<br />       . <sentencias ejecutables><br />       .<br />       <span style="color: #000000;">&#91;</span><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#93;</span><br /><br />Argumentos<br /><br />    EXIT PROCEDURE declara un procedimiento que se ejecuta en la<br />    terminación del programa.<br /><br />    <idProcedimiento> es el nombre del procedimiento de clausura que se<br />    va a declarar. Los nombres de procedimientos de clausura pueden tener<br />    cualquier longitud, pero sólo son significativos los primeros <span style="color: #000000;">10</span><br />    caracteres. Los nombres no deben comenzar con un signo de subrayado,<br />    pero pueden contener cualquier combinación de caracteres, números o<br />    signos de subrayado.<br /><br />Descripción<br /><br />    La sentencia EXIT PROCEDURE declara un procedimiento que se ejecutará<br />    cuando finalice el programa. Los procedimientos de clausura se llaman<br />    después de que se haya completado la última sentencia ejecutable en una<br />    aplicación de CA-Clipper. Las sentencias EXIT PROCEDURE pueden<br />    utilizarse para ejecutar tareas de mantenimiento habituales, como por<br />    ejemplo, guardar los parámetros de configuración en un fichero, cerrar<br />    un fichero de registro o concluir una sesión de comunicaciones.<br /><br />    La visibilidad de los procedimientos de clausura está limitada al<br />    sistema; por lo tanto, no es posible llamar a un procedimiento de<br />    clausura desde un procedimiento o función definido por el usuario. Los<br />    procedimientos de clausura no reciben parámetros.<br /><br />    Una vez que se ha completado la última sentencia ejecutable, el control<br />    pasa de un procedimiento de clausura al siguiente hasta que se ha<br />    llamado a todos los procedimientos de la lista de clausura. El control<br />    pasa seguidamente al sistema operativo.<br />    fuente <span style="color: #000000;">&#40;</span>.prg<span style="color: #000000;">&#41;</span>. Una vez declarado, se hace referencia a las sentencias<br />    EXIT PROCEDURE con este identificador de módulo. Una aplicación puede<br />    utilizar cualquier número de procedimientos de clausura, solicitando de<br />    forma explícita mediante REQUEST sus identificadores de módulo.<br /><br />    Los procedimientos de clausura solicitados para una aplicación se<br />    mencionan, de forma colectiva, como la lista de clausura. No existe un<br />    orden de ejecución obligatorio de procedimientos en la lista de<br />    clausura; <span style="color: #0000ff;">sin</span> embargo, si un procedimiento de clausura se declara en el<br />    mismo módulo fuente <span style="color: #000000;">&#40;</span>.prg<span style="color: #000000;">&#41;</span> que la rutina principal o raíz, éste será el<br />    primer procedimiento de clausura llamado.<br /><br />    La terminación de una aplicación de CA-Clipper dada puede atribuirse a<br />    alguna de las siguientes causas:<br /><br />    ?  <span style="color: #00C800;">RETURN</span> desde la rutina principal o raíz<br /><br />    ?  el mandato QUIT<br /><br />    ?  la ejecución de un <span style="color: #00C800;">BREAK</span> <span style="color: #0000ff;">sin</span> incluir BEGIN SEQUENCE...END<br />    La sentencia ANNOUNCE declara un identificador de módulo para un módulo<br /><br />    ?  error irrecuperable<br /><br />    No se puede garantizar la ejecución de un procedimiento de clausura<br />    cuando el sistema detecta un error irrecuperable. Si se ha producido un<br />    error durante un procedimiento de clausura, el sistema vuelve al DOS.<br />    Los procedimientos de clausura pendientes no se llaman.<br /><br />Ejemplos<br /><br />    ?  En este ejemplo se ilustra la construcción de un mecanismo de<br />       temporización simple, utilizando <span style="color: #0000ff;">INIT</span> y EXIT PROCEDURE:<br /><br />       <span style="color: #B900B9;">// imprime la cantidad de tiempo necesario para,</span><br />       <span style="color: #B900B9;">// leer, ordenar y mostrar una lista de nombres</span><br />       <span style="color: #B900B9;">// de ficheros.</span><br /><br />       ANNOUNCE MiSistema<br /><br />       <span style="color: #00C800;">STATIC</span> nInicio<br /><br />       PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          AEVAL<span style="color: #000000;">&#40;</span> ASORT<span style="color: #000000;">&#40;</span> DIRECTORY<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"*.*"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />              <span style="color: #000000;">&#123;</span> | aInfoFichero | QOUT<span style="color: #000000;">&#40;</span> aInfoFichero<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />          <span style="color: #00C800;">RETURN</span><br /><br />       <span style="color: #0000ff;">INIT</span> PROCEDURE MiInicio<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          nInicio := SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          <span style="color: #00C800;">RETURN</span><br /><br />       EXIT PROCEDURE MiClausura<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />          ?<br />          ? <span style="color: #ff0000;">"Tiempo transcurrido: "</span><br />          ?? SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nInicio<br />          <span style="color: #00C800;">RETURN</span></div>[/code:2k5cwwkf] Si tu tienes una funcion montada de tal manera q puedas acceder al conjunto de sus variables desde otro modulo, no tendras problemas en realizar esta accion...
Controlar la salida de un programa
Debo estar haciendo algo mal, puesto que con FUNCTION va bien y con EXIT PROCEDURE entra pero cuando utilizo las variables me las muestra en blanco. Lo reviso y te comento. Gracias.
Controlar la salida de un programa
Andreas, Piensa q si quieres gestionar tus variables de una funcion desde la exit procedure, estas deben ser visibles o accesible de alguna manera. Podrias hacer algo as, pe. [code=fw:9fi80sdh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Modulo x.prg<br /><span style="color: #00C800;">static</span> aDat<br /><br /><span style="color: #00C800;">FUNCTION</span> MiProceso<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    aDat := Array<span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br />    aDat<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := ...<br />    aDat<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := ...<br />    ....<br />RETU <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> GetaDat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />RETU aDat<br /><br /><span style="color: #B900B9;">// Exit desde el mismo modulo</span><br />EXIT PROCEDURE Save<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />    ...<br />RETU <span style="color: #00C800;">NIL</span><br /> </div>[/code:9fi80sdh] Si quieres acceder desde otro modulo [code=fw:9fi80sdh]<div class="fw" id="{CB}" style="font-family: monospace;">Modulo z.prg<br />EXIT PROCEDURE Save<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> aDat := GetoDat<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    ...<br />RETU <span style="color: #00C800;">NIL</span></div>[/code:9fi80sdh] No se, quizas pueda servirte....
Controlar la salida de un programa
Arreglado Carles, fue un fallo mio y como tu dices son visibles todas las variables definidas correctamente. Mi error era que pensaba que las tenia definidas como PRIVATE y en realidad se definian por ellas mismas y luego las pasaba por referencia, ahora este procedimiento se ejecuta siempre: [code=fw:1qkvbuxq]<div class="fw" id="{CB}" style="font-family: monospace;">*******************************<br /><span style="color: #00C800;">function</span> lGetPassword<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oUser, oPass<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nTries &nbsp; &nbsp;:= <span style="color: #000000;">0</span> <span style="color: #B900B9;">//Nº de intentos que quiero permitir</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lGo &nbsp; &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">PRIVATE</span> x_user, x_pass <span style="color: #B900B9;">//Antes esto no estaba y por eso no los podia ver </span><br /><br />&nbsp; &nbsp;x_user = UPPER<span style="color: #000000;">&#40;</span>GETENV<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"USERNAME"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+ space<span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;x_pass = space<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">5</span>, <span style="color: #000000;">5</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">50</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Por favor identifiquese..."</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, &nbsp; <span style="color: #000000;">2</span> BITMAP oBmp FILENAME <span style="color: #ff0000;">".<span style="color: #000000;">\.</span>.<span style="color: #000000;">\B</span>mp<span style="color: #000000;">\P</span>ass.Bmp"</span> <span style="color: #0000ff;">OF</span> oDlg NOBORDER<br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, &nbsp;<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"GESTION DE PUERTAS"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, &nbsp; <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Nombre:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">5.3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"P. de Acceso:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, &nbsp; <span style="color: #000000;">8</span> <span style="color: #0000ff;">GET</span> oUser <span style="color: #0000ff;">VAR</span> x_user <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span> , <span style="color: #000000;">10</span> <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> oImg:<span style="color: #000000;">LoadImage</span><span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"..<span style="color: #000000;">\C</span>OMU<span style="color: #000000;">\F</span>OTOS<span style="color: #000000;">\"</span>+alltrim(x_user)+"</span>.jpg<span style="color: #ff0000;">" ), oImg:Refresh(), .T. )<br />&nbsp; &nbsp;@ 5.3, 8 GET oPass VAR x_pass picture "</span>@!<span style="color: #ff0000;">" OF oDlg PASSWORD &nbsp;SIZE 50 , 10<br />&nbsp; &nbsp; @ 2, &nbsp;14 IMAGE oImg FILE "</span>..\COMU\FOTOS\<span style="color: #ff0000;">"+alltrim(x_user)+"</span>.jpg<span style="color: #ff0000;">" SIZE 50, 60 ADJUST<br /><br /><br />&nbsp; &nbsp;@ 4, 4 BUTTON "</span>&Continuar<span style="color: #ff0000;">" OF oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ACTION ( nTries++,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lGo := ComprueboAcceso( x_user, x_pass ) ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If( nTries > 2 .or. lGo, oDlg:End(),;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;( MsgAlert( "</span>Datos Incorrectos...<span style="color: #ff0000;">"+ Chr(13) +"</span>Intenta otra vez<span style="color: #ff0000;">" ), oUser:SetFocus(), oPass:SetFocus() ) ) )<br /><br />&nbsp; &nbsp;oBmp:lTransparent = .t. &nbsp;// Hago el bmp transparente<br /><br />&nbsp; &nbsp;ACTIVATE DIALOG oDlg CENTERED ON PAINT ( &nbsp;oPass:SetFocus() &nbsp; )<br /><br /><br />&nbsp; &nbsp;return lGo<br /><br />&nbsp; ********************************<br /><br />&nbsp; Function ComprueboAcceso( x_user, x_pass )<br /><br />&nbsp; &nbsp; &nbsp; //Abre la base de datos de usuarios para esta aplicación.<br />&nbsp; &nbsp; &nbsp; if !op_base("</span>USR<span style="color: #ff0000;">",.f.,1,1)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return .f.<br />&nbsp; &nbsp; &nbsp; endif<br /><br />&nbsp; &nbsp; &nbsp; locate all for x_user= USER->user<br />&nbsp; &nbsp; &nbsp; if !found()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MsgInfo("</span>Usuario no registrado<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Return .F.<br />&nbsp; &nbsp; &nbsp; elseif x_pass != USER->pasw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgInfo("</span>Palabra clave incorrecta<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Return .F.<br />&nbsp; &nbsp; &nbsp; endif<br /><br />&nbsp; &nbsp; &nbsp; //Me desago de la base de datos abierta y retorno acceso correcto y tomo el nivel de acceso<br />&nbsp; &nbsp; &nbsp; x_level = USER->level<br />&nbsp; &nbsp; &nbsp; use<br />&nbsp; &nbsp; &nbsp; InicioAcceso()<br />&nbsp; &nbsp; &nbsp; return .t.<br /><br /><br />*********************************<br /><br />Func InicioAcceso()<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;if !op_base("</span>ACC<span style="color: #ff0000;">",.f.,1,1,.f.,"</span>ACCESOS<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return .f.<br />&nbsp; &nbsp; &nbsp; endif<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; Select("</span>ACCESOS<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; if netapp(0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace PRG &nbsp; &nbsp; &nbsp; with d_prg<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace FECHAINI &nbsp;with date()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace HORAINI &nbsp; with time()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace USER &nbsp; &nbsp; &nbsp;with x_user<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace LOGON &nbsp; &nbsp; with x_logon<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Replace ORDENADOR with x_ord<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; commit<br />&nbsp; &nbsp; &nbsp; &nbsp; endif<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; clos_base("</span>ACC<span style="color: #ff0000;">",1,.f.)<br /><br />Return .t.<br /><br /><br />********************************************<br />EXIT PROCEDURE FinalizoAcceso()<br /><br />&nbsp; &nbsp; if !op_base("</span>ACC<span style="color: #ff0000;">",.f.,1,1,.f.,"</span>ACCESOS<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp;return .f.<br />&nbsp; &nbsp; endif<br />&nbsp; &nbsp; &nbsp; Select("</span>ACCESOS<span style="color: #ff0000;">")<br /><br />&nbsp; &nbsp; &nbsp; DBSetOrder(5) &nbsp; <br />&nbsp; &nbsp; &nbsp; seek alltrim(x_user) + d_Prg<br />&nbsp; &nbsp; &nbsp; LOCATE FOR USER = alltrim(x_user) .and. PRG = d_prg .and. EMPTY(FECHAFIN)<br />&nbsp; &nbsp; &nbsp; DO WHILE Found()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if rlock() &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Replace FECHAFIN with date()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Replace HORAFIN &nbsp;with time()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;commit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;endif<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;skip<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LOCATE FOR USER = alltrim(x_user) .and. PRG = d_prg .and. EMPTY(FECHAFIN)<br />&nbsp; &nbsp; &nbsp; enddo<br /><br />&nbsp; &nbsp; &nbsp; clos_base("</span>ACC<span style="color: #ff0000;">",1,.f.)<br />Return .t.</span></div>[/code:1qkvbuxq]
Controlar las WebCams
Hola amigos,Tengo una app que trabaja con la clase TSCANNER de nuestro amigo Rafa Carmona( Thefull ), pero esta clase solo funciona con el driver TWAIN, resulta que hoy existen unas WebCams que no se que controlador usan, puesto no se puede ubicar el driver autoinstalado, habra alguna manera de trabajar con estas camaritas "nuevas"?Salu2
Controlar las WebCams
Willi:Recuerdo que Biel publicó en este foro algunos posts sobre el tema, dále una revisada.Saludos
Controlar las WebCams
Hola, mira se sirve:<!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=608">http://www.fivewin.com.br/exibedicas.asp?id=608</a><!-- m --><!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=543">http://www.fivewin.com.br/exibedicas.asp?id=543</a><!-- m --><!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=402">http://www.fivewin.com.br/exibedicas.asp?id=402</a><!-- m -->Saludos
Controlar las WebCams
MIl gracias,, este es un servicio express,,,, funciona a 100Gracias
Controlar las WebCams
La excelente clase de Cesar Lozada funciona perfecto pero solo con WebCam que tienen driver. Las nuevas WebCam (USB Device Webcam) que NO necesitan "drivers" NO estan siendo reconocidad por la clase de Cesar. Quizas, si Cesar lee este post, pudiera echarle una ojeada a esto a ver si hay forma de hacerlo trabajar con su clase.Saludos,George
Controlar los ToolTips
Me gustaria saber si puedo mostrar el ToolTip de un contro sin necesidad de que el ratón este sobre el. Algo asi [color=green:5ep6ca8r]Redefine Get oGetCodigo ... oGetCodigo:cToolTip := "Código obligatorio" ... if Empty( oGetCodigo:VarGet() ) oGetCodigo:showToolTip() end if[/color:5ep6ca8r] Este código ahora no funciona. Gracias, Manuel Calero.
Controlar los ToolTips
Nose, si es complicarte, pero yo lo trabajo en un VALID() que llama una funcion y le doy el mensaje que quiera y sirve para cualquier oGET que no cumpla la condicion de que que de vacio, claro imagino que con un tooltip debe verse mas coqueto, pero debes crear 1 tooltip para cada oGET, eso creo, te doy mi ejmplo. FUNCTION novacio(variable) // VALIDA CAMPO NO QUEDE VACIO IF EMPTY(variable) MSGALERT("Campo no puede quedar vacio"," ATENCIÓN") RETURN .F. ENDIF RETURN .T. // FIN VALIDA CAMPO NO QUEDE VACIO y llamo la funcion desde el VALID del oGET. REDEFINE GET oGET1 VAR oDbf:ben_codigo ID 103 OF oDlgDatBen PICTURE "@!"; VALID(novacio(oDbf:ben_codigo), vcodigo(oDbf:ben_codigo, lAPPEND)); WHEN(lAPPEND) UPDATE espero te sirva, aclare o de nuevas ideas para tu pregunta...
Controlar los ToolTips
El tema de MsgAlert y MsgStop es como lo tengo en la actualidad pero asi, estamos obligando al usuario a pulsar INTRO por cada mensaje, mi idea es mostrar el tootip para informar al usuario de por que no se valida el formulario, y puede seguir trabajando sin darle a INTRO. Saludos
Controlar los ToolTips
Manuel, Tengo el mismo problema que usted: o sea no quiero que el usuario tenga que pulsar OK. Yo hice una funcion que pone una caja amarilla en el get con dato incorrecto. Mira se puede ayudarte: [code:2empjpjf] *** Ejemplo&#58; &#46;&#46;&#46; if ! "NB" $ cSit WinInfo&#40;"Situacion debe ser&#58;"+CRLF+; "N=Normal"+CRLF+; "B=Bloqueado", oGetSit&#41; endif Se tienes problema con focus cuando llamar WinInfo intenta&#58; WinInfo&#40;"Texto", oGet, &#46;F&#46;&#41; *** La funcion&#58; //----------------------------------------------------------------------------- // WinInfo &#58; Cria ventana estilo tooltip // <cText> &#58; Texto o bloco de texto // <oObj > &#58; Objeto &#40;get, button, say, etc&#41; de la ventana // <lLetLostFocus>&#58; Debe cerrar cuando perder el focus? //---------------------------------------------------------------------------- function WinInfo&#40;cText, oObj, lLetLostFocus&#41; local oFont, oWnd, aPos, hOldFont local aText, nLenText, hWnd, oClose, oTempo local nRow &#58;= oObj&#58;nHeight&#40;&#41; local nCol &#58;= 7 local nTxtWidth &#58;= 0 local nTxtHeight&#58;= 0 DEFAULT lLetLostFocus &#58;= &#46;T&#46; if ValType&#40; cText &#41; == "B" cText &#58;= Eval&#40; cText &#41; endif cText &#58;= strtran&#40;cText,"\n", chr&#40;13&#41;+chr&#40;10&#41;&#41; // \n = CRLF cText &#58;= ""+CRLF+cText+CRLF+" " define window oWnd from 0, 0 to 1, 5 ; style nOr&#40; WS_POPUP, WS_BORDER &#41; ; color 0, nRGB&#40;255,255,164&#41; of oObj define font oFont name GetSysFont&#40;&#41; size 0, -8 aPos &#58;= &#123;nRow-1, -1&#125; aPos &#58;= ClientToScreen&#40; oObj&#58;hWnd, aPos &#41; nTxtHeight &#58;= max&#40;14, GetTextHeight&#40; oWnd&#58;hWnd &#41;-2&#41; aText &#58;= array&#40; nLenText &#58;= mlcount&#40; cText, 254 &#41; &#41; aeval&#40; aText, &#123;|c, n| aText&#91; n &#93; &#58;= trim&#40;memoline&#40; cText, 252, n &#41;&#41;, ; nTxtWidth &#58;= max&#40;nTxtWidth, GetTextWidth&#40; 0, aText&#91; n &#93;, oFont&#58;hFont &#41; + 7 &#41; &#125;&#41; if aPos&#91; 2 &#93; + nTxtWidth + 3 > GetSysMetrics&#40;0&#41; //0 = SM_CXSCREEN aPos&#91; 2 &#93; = GetSysMetrics&#40; 0 &#41; - nTxtWidth - 3 endif oWnd&#58;bRClicked &#58;= oWnd&#58;bLClicked &#58;= &#123;|a, b, c, Me| Me&#58;End&#40;&#41; &#125; //----------------------------------------------------------------------------------- // Truco&#58; Boton fuera de la ventana&#46; Cierra la ventana se pulsa enter //----------------------------------------------------------------------------------- @ -10, -10 button oClose of oWnd action &#40;if&#40;oTempo # Nil, oTempo&#58;End&#40;&#41;,&#41;, oWnd&#58;End&#40;&#41;&#41; oWnd&#58;Move&#40; aPos&#91; 1 &#93;, aPos&#91; 2 &#93;, nTxtWidth, nTxtHeight * nLenText + 3 &#41; oWnd&#58;Show&#40;&#41; SysRefresh&#40;&#41; if oWnd != Nil SetBkMode&#40; oWnd&#58;GetDC&#40;&#41;, 1 &#41; SetTextColor&#40; oWnd&#58;hDC, 0 &#41; hOldFont &#58;= SelectObject&#40; oWnd&#58;hDC, oFont&#58;hFont &#41; aeval&#40; aText, &#123;| c, n | TextOut&#40; oWnd&#58;hDC, n * nTxtHeight - &#40;nTxtHeight-1&#41;, 2, aText&#91; n &#93; &#41; &#125;&#41; SelectObject&#40; oWnd&#58;hDC, hOldFont &#41; oWnd&#58;ReleaseDC&#40;&#41; endif oWnd&#58;Setfocus&#40;&#41; if lLetLostFocus oWnd&#58;bLostFocus &#58;= &#123;|| oWnd&#58;End&#40;&#41; &#125; else // Cierra la ventana despues de 2600 milisegundos define timer oTempo interval 2600 of oWnd action &#40;oWnd&#58;End&#40;&#41;, oTempo&#58;End&#40;&#41;&#41; oTempo&#58;Activate&#40;&#41; endif oFont&#58;End&#40;&#41; return&#40; Nil &#41; [/code:2empjpjf] Saludos de Brasil Maurilio