<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mundodelphi</title>
	<atom:link href="http://www.webserveis.com/mundodelphi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webserveis.com/mundodelphi</link>
	<description>programacion en delphi</description>
	<lastBuildDate>Mon, 10 May 2010 12:44:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Calcular tiempo estimado de un proceso</title>
		<link>http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/</link>
		<comments>http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 13:08:01 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Aprender a programar en Delphi]]></category>
		<category><![CDATA[delphi]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=240</guid>
		<description><![CDATA[Algunos programas cuando se hace una tarea que necesita tiempo de espera, como los programas antivirus, desfragmentados, compresores, descargas y subidas masivas, envío de emails con archivos adjuntos, muestran una barra de progreso y el tiempo que lleva (elapsed time) y el tiempo que aún queda para finalizar (estimated time), a veces el tiempo que [...]]]></description>
			<content:encoded><![CDATA[<p>Algunos programas cuando se hace una tarea que necesita tiempo de espera, como los programas antivirus, desfragmentados, compresores, descargas y subidas masivas, envío de emails con archivos adjuntos, muestran una barra de progreso y el tiempo que lleva (elapsed time) y el tiempo que aún queda para finalizar (estimated time), a veces el tiempo que se calcula no es muy ajustado depende de los factores del proceso</p>
<p><strong>Calcular el tiempo transcurrido</strong><br />
para calcular el tiempo transcurrido de un proceso cualquiera comentado arriba, primero de todo debemos capturar el tiempo inicial de la tarea y cuando queramos actualizar el contador de tiempo, se obtiene el tiempo actual y con una simple resta tiempo_actual &#8211; tiempo_inicial obtendremos el tiempo transcurrido</p>
<p><strong>Calcular el tiempo estimado</strong><br />
Para calcular el tiempo estimado de un proceso etc.., tenemos que desglosar la tarea en partes, y por cada parte calcular el tiempo que ha transcurrido y para obtener el tiempo estimado multiplicamos el tiempo transcurrido por las partes restantes</p>
<p><strong>ejemplo </strong>&#8220;calcular tiempo estimado de copiado de archivos en disco&#8221; en pseudo código</p>
<p><em><span style="color: #3366ff;">tiempo_inicial = ahora();<br />
archivos = &#8216;50 archivos de 1024 bytes&#8217;<br />
contador = 0<br />
bucle de 1 hasta 50<br />
incrementar(contador)<br />
tiempo_inicial_copiado = ahora()<br />
copiar_archivo_en  nueva ubicacion<br />
tiempo_final_copiado = ahora()<br />
tiempo_restante = (tiempo_final_copiado &#8211; tiempo_inicial_copiado) x (50 &#8211; contador)<br />
tiempo_transcurrido = tiempo_final_copiado &#8211; tiempo_inicial<br />
actualizar contador de tiempo<br />
fin bucle</span></em></p>
<p>Para obtener el tiempo restante de una descarga de archivo de internet se debería calcular por bloques de descarga por ejemplo lo que se tarda en descargar 1024 bytes que sería un 1 Kb sabiendo eso y que el archivo pese 1 Megabyte, ya lo tendríamos</p>
<p>Para obtener el tiempo restante de una transacción de base de datos, copia de registros, eliminación, migración etc.. Debemos calcular lo que tarda por un registro o si es muy enorme por bloques de registros</p>
<p>como puedes ver el tiempo transcurrido no es exacto depende de factores del mismo proceso, el siguiente ejemplo hecho en delphi sirve para calcular un tiempo transcurrido que se puede adaptar, la actualización del tiempo lo muestra en horas minutos y segundos</p>
<pre class="brush: delphi;">
var
 StartTime,EndTime,ElapsedTime,EstimatedTime: Dword;
 actual_progress,total_progress,i:integer;
 Estimated_hours:dword;Estimated_Minutes:dword;Estimated_seconds:dword;
 Informacion:string;
begin
 Timer1.Enabled := false;
 Actual_progress := 0;
 total_progress := 10;
 for i:=Actual_progress to Total_Progress do
 begin
 StartTime := GetTickCount();
 //processo a realizar
 EndTime := GetTickCount();
 ElapsedTime := EndTime-StartTime;
 TranscursTime := ElapsedTime * (total_progress - i);
 //calculo de horas minutos y segundos
 Estimated_hours := (ElapsedTime div (3600 * 999)) mod 24;
 Estimated_Minutes := (ElapsedTime div (60 * 999)) mod 60;
 Estimated_Seconds := (ElapsedTime div 999) mod 60;
 Informacion := 'Tiempo estimado: ' + inttostr(Estimated_hours) + ':' + inttostr(Estimated_Minutes) + ':' + inttostr(Estimated_Seconds);
 label1.Caption := Informacion;
 end;
end;
</pre>
</pre>
<p><small>frases de  busqueda interna: calcular tiempo estimado de un proceso en  programación, calcular tiempo estimado de un proceso en delphi, calcular  tiempo restante en programación, calcular tiempo restante en delphi,  calcular tiempo transcurrido en programación, calcular tiempo  transcurrido en delphi, calcular tiempo que falta en programación,  calcular tiempo que falta en delphi, obtener tiempo restante de un  proceso en delphi, obtener tiempo restante de una rutina en delphi,  obtener tiempo restante de una tarea en delphi, calcular tiempo  aproximado de un proceso, si alguna vez necesitas calcular e actualizar  en tiempo real (mientras se esta realizando el proceso) de una tarea,  copiado de archivos, calculos matematicos, descargar de internet,copiado  de registros de una base de datos, etc. y quieres mostrar el tiempo  estimado e restante de un proceso, es decir el tiempo que aún queda para  finalizar la tarea.</small></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/&amp;title=Calcular+tiempo+estimado+de+un+proceso" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/&amp;t=Calcular+tiempo+estimado+de+un+proceso" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Calcular+tiempo+estimado+de+un+proceso+-+http://b2l.me/tr9w2+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/&amp;n=Calcular+tiempo+estimado+de+un+proceso&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Calcular%20tiempo%20estimado%20de%20un%20proceso%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22Algunos%20programas%20cuando%20se%20hace%20una%20tarea%20que%20necesita%20tiempo%20de%20espera%2C%20como%20los%20programas%20antivirus%2C%20desfragmentados%2C%20compresores%2C%20descargas%20y%20subidas%20masivas%2C%20env%C3%ADo%20de%20emails%20con%20archivos%20adjuntos%2C%20muestran%20una%20barra%20de%20progreso%20y%20el%20tiempo%20que%20lleva%20%28elapsed%20time%29%20y%20el%20tiempo%20que%20a%C3%BAn%20queda%20pa%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/&amp;title=Calcular+tiempo+estimado+de+un+proceso" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/&amp;title=Calcular+tiempo+estimado+de+un+proceso&amp;srcUrl=http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/&amp;srcTitle=Calcular+tiempo+estimado+de+un+proceso&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2010/02/01/calcular-tiempo-estimado-de-un-proceso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Obtener path de los directorios de windows</title>
		<link>http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/</link>
		<comments>http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 15:50:06 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[truco]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=238</guid>
		<description><![CDATA[Con ese truco podemos obtener los directorios de windows usando delphi
La función es FM_GetSpecialDirectory(directorio:string):string;
se debe cargar en uses la librería ShlObj
Parametros del atributo directorio
AppData
CdBurn
AdminTools
Cookies
StartMenu
Desktop
Favorites
Fonts
History
InternetCache
LocalAppData
MyMusic
MyImages
Metwork
MyDocuments
Printers
User
Programs
Shared
Sendto
Starmenu
Starmenuprog
System
Windows
Temp
Código

Uses ShlObj;
Function FM_GetSpecialDirectory(const directorio : string) : string;
var RecPath : PAnsiChar;
 CSIDL:integer;
begin
 if ansilowercase(directorio) = 'appdata' then  CSIDL := $001a;
 if ansilowercase(directorio) = 'cdburn' then  CSIDL := $003b;
 if ansilowercase(directorio) = 'admintools' [...]]]></description>
			<content:encoded><![CDATA[<p>Con ese truco podemos obtener los directorios de windows usando delphi</p>
<p>La función es <span style="color: #3366ff;"><strong>FM_GetSpecialDirectory(directorio:string):string;</strong></span><br />
se debe cargar en uses la librería <span style="color: #3366ff;"><em>ShlObj</em></span></p>
<p><strong>Parametros del atributo directorio</strong></p>
<p><span style="color: #3366ff;">AppData<br />
CdBurn<br />
AdminTools<br />
Cookies<br />
StartMenu<br />
Desktop<br />
Favorites<br />
Fonts<br />
History<br />
InternetCache<br />
LocalAppData<br />
MyMusic<br />
MyImages<br />
Metwork<br />
MyDocuments<br />
Printers<br />
User<br />
Programs<br />
Shared<br />
Sendto<br />
Starmenu<br />
Starmenuprog<br />
System<br />
Windows<br />
Temp</span></p>
<p><strong>Código</strong></p>
<pre class="brush: delphi;">
Uses ShlObj;
Function FM_GetSpecialDirectory(const directorio : string) : string;
var RecPath : PAnsiChar;
 CSIDL:integer;
begin
 if ansilowercase(directorio) = 'appdata' then  CSIDL := $001a;
 if ansilowercase(directorio) = 'cdburn' then  CSIDL := $003b;
 if ansilowercase(directorio) = 'admintools' then  CSIDL := $002f;
 if ansilowercase(directorio) = 'cookies' then  CSIDL := $0021;
 if ansilowercase(directorio) = 'startmenu' then  CSIDL := $0000;
 if ansilowercase(directorio) = 'desktop' then  CSIDL := $0010;
 if ansilowercase(directorio) = 'favorites' then  CSIDL := $0006;
 if ansilowercase(directorio) = 'fonts' then  CSIDL := $0014;
 if ansilowercase(directorio) = 'history' then  CSIDL := $0022;
 if ansilowercase(directorio) = 'internetcache' then  CSIDL := $0020;
 if ansilowercase(directorio) = 'localappdata' then  CSIDL := $001c;
 if ansilowercase(directorio) = 'mymusic' then  CSIDL := $000d;
 if ansilowercase(directorio) = 'myimages' then  CSIDL := $0027;
 if ansilowercase(directorio) = 'network' then  CSIDL := $0013;
 if ansilowercase(directorio) = 'mydocuments' then  CSIDL := $0005;
 if ansilowercase(directorio) = 'printers' then  CSIDL := $001b;
 if ansilowercase(directorio) = 'user' then  CSIDL := $0028;
 if ansilowercase(directorio) = 'programs' then  CSIDL := $0026;
 if ansilowercase(directorio) = 'shared' then  CSIDL := $002b;
 if ansilowercase(directorio) = 'recent' then  CSIDL := $0008;
 if ansilowercase(directorio) = 'sendto' then  CSIDL := $0009;
 if ansilowercase(directorio) = 'starmenu' then  CSIDL := $000b;
 if ansilowercase(directorio) = 'starmenuprog' then  CSIDL := $0007;
 if ansilowercase(directorio) = 'system' then  CSIDL := $0025;
 if ansilowercase(directorio) = 'windows' then  CSIDL := $0024;
 if ansilowercase(directorio) = 'temp' then  CSIDL := $0024;

 RecPath := StrAlloc(MAX_PATH);
 try
 FillChar(RecPath^,MAX_PATH,0);
 if SHGetSpecialFolderPath(0,RecPath,CSIDL,false) then begin
 result := RecPath;
 if ansilowercase(directori) = 'temp' then result := RecPath + '\temp';
 end else result := '';
 finally
 StrDispose(RecPath);
 end;
end;
</pre>
<p><strong>su uso es muy fácil</strong><br />
FM_GetSpecialDirectory(&#8216;windows&#8217;);</p>
<p>con eso obtenemos el directorio donde windows está instalado C:\windows en mi caso</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/&amp;title=Obtener+path+de+los+directorios+de+windows+" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/&amp;t=Obtener+path+de+los+directorios+de+windows+" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Obtener+path+de+los+directorios+de+windows++-+http://b2l.me/tsdcr+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/&amp;n=Obtener+path+de+los+directorios+de+windows+&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Obtener%20path%20de%20los%20directorios%20de%20windows%20%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22Con%20ese%20truco%20podemos%20obtener%20los%20directorios%20de%20windows%20usando%20delphi%0D%0A%0D%0ALa%20funci%C3%B3n%20es%20FM_GetSpecialDirectory%28directorio%3Astring%29%3Astring%3B%0D%0Ase%20debe%20cargar%20en%20uses%20la%20librer%C3%ADa%20ShlObj%0D%0A%0D%0AParametros%20del%20atributo%20directorio%0D%0A%0D%0AAppData%0D%0ACdBurn%0D%0AAdminTools%0D%0ACookies%0D%0AStartMenu%0D%0ADesktop%0D%0AFavorites%0D%0AFonts%0D%0A%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/&amp;title=Obtener+path+de+los+directorios+de+windows+" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/&amp;title=Obtener+path+de+los+directorios+de+windows+&amp;srcUrl=http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/&amp;srcTitle=Obtener+path+de+los+directorios+de+windows+&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2010/01/30/obtener-path-de-los-directorios-de-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Realizar una pausa, el delay en delphi</title>
		<link>http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/</link>
		<comments>http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:34:28 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>
		<category><![CDATA[system]]></category>
		<category><![CDATA[truco]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=236</guid>
		<description><![CDATA[Hacer que el programa espere un tiempo, como la función delay de pascal, tiempo de espera en delphi, realizar una pausa con delphi, retardar ejecutación con delay
En pascal hay la función delay que sirve para esperar un tiempo determinado antes de ejecutar la siguiente instrucción, en delphi carece de la función delay, pero con el [...]]]></description>
			<content:encoded><![CDATA[<p><small>Hacer que el programa espere un tiempo, como la función delay de pascal, tiempo de espera en delphi, realizar una pausa con delphi, retardar ejecutación con delay</small></p>
<p>En pascal hay la función delay que sirve para esperar un tiempo determinado antes de ejecutar la siguiente instrucción, en delphi carece de la función delay, pero con el siguiente truco conseguimos dicho efecto, podemos programar retardos en milisegundos, recuerda un segundo tiene 1000 milisegundos</p>
<pre class="brush: delphi;">
procedure SYS_Delay(msecs:integer);
var
 FirstTickCount:longint;
begin
 FirstTickCount:=GetTickCount;
 repeat
 Application.ProcessMessages; {allowing access to other
 controls, etc.}
 until ((GetTickCount-FirstTickCount) &gt;= Longint(msecs));
end;
</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/&amp;title=Realizar+una+pausa%2C+el+delay+en+delphi" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/&amp;t=Realizar+una+pausa%2C+el+delay+en+delphi" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Realizar+una+pausa%2C+el+delay+en+delphi+-+http://b2l.me/tsdcs+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/&amp;n=Realizar+una+pausa%2C+el+delay+en+delphi&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Realizar%20una%20pausa%2C%20el%20delay%20en%20delphi%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22Hacer%20que%20el%20programa%20espere%20un%20tiempo%2C%20como%20la%20funci%C3%B3n%20delay%20de%20pascal%2C%20tiempo%20de%20espera%20en%20delphi%2C%20realizar%20una%20pausa%20con%20delphi%2C%20retardar%20ejecutaci%C3%B3n%20con%20delay%0D%0A%0D%0AEn%20pascal%20hay%20la%20funci%C3%B3n%20delay%20que%20sirve%20para%20esperar%20un%20tiempo%20determinado%20antes%20de%20ejecutar%20la%20siguiente%20instrucci%C3%B3n%2C%20en%20delphi%20%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/&amp;title=Realizar+una+pausa%2C+el+delay+en+delphi" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/&amp;title=Realizar+una+pausa%2C+el+delay+en+delphi&amp;srcUrl=http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/&amp;srcTitle=Realizar+una+pausa%2C+el+delay+en+delphi&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2010/01/28/realizar-una-pausa-el-delay-en-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detectar si hay conexión a internet</title>
		<link>http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/</link>
		<comments>http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 14:20:49 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=234</guid>
		<description><![CDATA[detectar si hay conexión a internet con delphi, si queremos saber si la computadora tiene conexión a internet podemos usar el siguiente truco, con la función  Net_IsConnected que nos devuelve un booleano si hay conexión o no, usa la librería Wininet

uses wininet;
function Net_IsConnected: boolean;
const
 // local system uses a modem to connect to the Internet.
 [...]]]></description>
			<content:encoded><![CDATA[<p>detectar si hay conexión a internet con delphi, si queremos saber si la computadora tiene conexión a internet podemos usar el siguiente truco, con la función <span style="color: #3366ff;"><em> Net_IsConnected</em></span> que nos devuelve un booleano si hay conexión o no, usa la librería Wininet</p>
<pre class="brush: delphi;">
uses wininet;
function Net_IsConnected: boolean;
const
 // local system uses a modem to connect to the Internet.
 INTERNET_CONNECTION_MODEM      = 1;
 // local system uses a local area network to connect to the Internet.
 INTERNET_CONNECTION_LAN        = 2;
 // local system uses a proxy server to connect to the Internet.
 INTERNET_CONNECTION_PROXY      = 4;
 // local system's modem is busy with a non-Internet connection.
 INTERNET_CONNECTION_MODEM_BUSY = 8;

var
 dwConnectionTypes : DWORD;
begin
 dwConnectionTypes := INTERNET_CONNECTION_MODEM +
 INTERNET_CONNECTION_LAN +
 INTERNET_CONNECTION_PROXY;
 Result := InternetGetConnectedState(@dwConnectionTypes,0);
end;
</pre>
<p>su uso es muy simple</p>
<pre class="brush: delphi;">
if (Net_IsConnected) Then showmessage('hay conexión a internet');
</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/&amp;title=Detectar+si+hay+conexi%C3%B3n+a+internet" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/&amp;t=Detectar+si+hay+conexi%C3%B3n+a+internet" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Detectar+si+hay+conexi%C3%B3n+a+internet+-+http://b2l.me/tsdct+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/&amp;n=Detectar+si+hay+conexi%C3%B3n+a+internet&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Detectar%20si%20hay%20conexi%C3%B3n%20a%20internet%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22detectar%20si%20hay%20conexi%C3%B3n%20a%20internet%20con%20delphi%2C%20si%20queremos%20saber%20si%20la%20computadora%20tiene%20conexi%C3%B3n%20a%20internet%20podemos%20usar%20el%20siguiente%20truco%2C%20con%20la%20funci%C3%B3n%C2%A0%20Net_IsConnected%20que%20nos%20devuelve%20un%20booleano%20si%20hay%20conexi%C3%B3n%20o%20no%2C%20usa%20la%20librer%C3%ADa%20Wininet%0D%0A%0D%0A%5Bdelphi%5D%0D%0Auses%20wininet%3B%0D%0Afunction%20Net_IsC%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/&amp;title=Detectar+si+hay+conexi%C3%B3n+a+internet" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/&amp;title=Detectar+si+hay+conexi%C3%B3n+a+internet&amp;srcUrl=http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/&amp;srcTitle=Detectar+si+hay+conexi%C3%B3n+a+internet&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2010/01/28/detectar-si-hay-conexion-a-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cuadros de dialogo de windows en Delphi</title>
		<link>http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/</link>
		<comments>http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:56:02 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Aprender a programar en Delphi]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[Dialogs]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=229</guid>
		<description><![CDATA[El sistema operativo Windows nos ofrece diferentes cuadros de dialogo, para mostrar texto, cuadros con opciones, selección de directorios, entradas de texto, salvar documento.
ShowMessage &#8211; Mostrar un cuadro de dialogo simple
El primero que veremos es el cuadro de dialogo simple, ese cuadro de dialogo solo permite texto, sirve para informar de un proceso al usuario [...]]]></description>
			<content:encoded><![CDATA[<p>El sistema operativo Windows nos ofrece diferentes cuadros de dialogo, para mostrar texto, cuadros con opciones, selección de directorios, entradas de texto, salvar documento.</p>
<p><strong><span style="text-decoration: underline;">ShowMessage &#8211; Mostrar un cuadro de dialogo simple<br />
</span></strong>El primero que veremos es el cuadro de dialogo simple, ese cuadro de dialogo solo permite texto, sirve para informar de un proceso al usuario y solo tiene un botón Acepter, Ok</p>
<p><img class="alignnone size-full wp-image-230" title="CuadroDialogo_simple" src="http://www.webserveis.com/mundodelphi/wp-content/uploads/2009/12/CuadroDialogo_simple.JPG" alt="CuadroDialogo_simple" width="199" height="110" /></p>
<p>Para mostrar ese cuadro de dialogo usaremos la función <span style="color: #3366ff;">ShowMessage</span> de delphi<br />
Function ShowMessage(&#8216;mensaje&#8217;);</p>
<p><strong>Ejemplo:</strong><br />
<em><span style="color: #008000;">ShowMessage(&#8216;Hola mundo!!!&#8217;);</span></em></p>
<p><strong><span style="text-decoration: underline;">MessageBox &#8211; Mostrar un cuadro de dialogo personalisado<br />
</span></strong>Para crear un cuadro de dialogo con botones para poder escojer una opción y icono usaremos la funcion <span style="color: #3366ff;">MessageBox </span>de delphi</p>
<p><span style="color: #3366ff;"><em>function MessageBox(Handler,const Message, Title: PChar; Flags: Longint = MB_OK): Integer;</em></span></p>
<p><span style="color: #3366ff;">Handler<span style="color: #000000;"> = identificador de ventana</span><br />
Message </span>= Mensaje que queremos mostrarm<br />
<span style="color: #3366ff;">Title</span>= Titulo del cuadro de dialogo<br />
<span style="color: #3366ff;">Flags</span>: Botones y icono a mostrar</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;"><strong>Botones:<br />
</strong></span><span style="color: #3366ff;">Mb_AbortRetryIgnore</span>: Muestra los botones Abortar, Reintentar y Ignorar<br />
<span style="color: #3366ff;">Mb_OK:</span> Muestra el boton Aceptar<br />
<span style="color: #3366ff;">Mb_OkCancel</span>: Muestra los botones Aceptar y Cancelar<br />
<span style="color: #3366ff;">Mb_RetryCancel</span>: Muestra los botones Reintentar y Cancelar<br />
<span style="color: #3366ff;">Mb_YesNo</span>: Muestra los botones SI y No<br />
<span style="color: #3366ff;">Mb_YesNoCancel</span>: Muestra los botones Si, No y Cancelar</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;"><strong>Iconos<br />
</strong></span><span style="color: #3366ff;">Mb_IconWarning:</span> Muestra el icono de Advertencia *<span style="color: #3366ff;">Mb_IconExclamation<br />
</span><span style="color: #3366ff;">Mb_IconAsterisk</span>: Muestra el icono de Información *<span style="color: #3366ff;">Mb_IconInformation<br />
</span><span style="color: #3366ff;">Mb_IconQuestion</span>: Muestra el icono de Pregunta<br />
<span style="color: #3366ff;">Mb_IconError</span>: Muestra el icono de Error</p>
<p><strong>Ejemplo:</strong><br />
<span style="color: #339966;"><em>MessageBox(form1.Handle,&#8217;mensaje&#8217;,'tittulo&#8217;,mb_YesNo  + mb_IconInformation);</em></span></p>
<p>creará un cuadro de dialogo parecido a la imagen<br />
<img class="alignnone size-full wp-image-231" title="showmessage_ex1" src="http://www.webserveis.com/mundodelphi/wp-content/uploads/2009/12/showmessage_ex1.JPG" alt="showmessage_ex1" width="185" height="126" /></p>
<p>La función MessageBox nos devuelve el boton que el usuario a pulsado, su resultado puede ser:<br />
<span style="color: #3366ff;"><br />
IdYes</span>: cuando el botón Si ha sido pulsado<br />
<span style="color: #3366ff;">IdRetry</span>: cuando el botón Reintentar ha sido pulsado<br />
<span style="color: #3366ff;">IdOk</span>: cuando el botón Aceptar ha sido pulsado<br />
<span style="color: #3366ff;">IdNo</span>: cuando el botón No ha sido pulsado<br />
<span style="color: #3366ff;">IdIgnore</span>: cuando el botón Ignorar ha sido pulsado<br />
<span style="color: #3366ff;">IdCancel</span>: cuando el botón Cancelar ha sido pulsado<br />
<span style="color: #3366ff;">IdAbort</span>: cuando el botón Abortar ha sido pulsado</p>
<p><strong>Ejemplo 2 *obtener el resultado de un MessageBox</strong></p>
<pre class="brush: delphi;">
var
  botonsel : Integer;
begin
  botonsel := MessageBox(form1.Handle,'mensaje','tittulo',mb_yesno  +MB_ICONINFORMATION);
  if (botonsel = idYes) then showmessage('ha pulsado si');
end;
</pre>
<p>*el cuadro de dialogo con ShowMessage siempre aparece al centro de la aplicación</p>
<p><strong><span style="text-decoration: underline;">InputBox &#8211; Pedir información al usuario<br />
</span></strong>Para pedir al usuario información a través de un cuadro de dialogo usaremos la función InputBox de delphi</p>
<p><span style="color: #3366ff;">Function InputBox(titulo,label,texto):string;</span></p>
<p><span style="color: #3366ff;">Titulo</span>= titulo del cuadro de dialogo<br />
<span style="color: #3366ff;">label</span> = la información a pedir<br />
<span style="color: #3366ff;">texto</span> = texto predeterminado</p>
<p>La función nos devuelve una cadena con lo que ha introducido el usuario</p>
<p><strong>Ejemplo</strong></p>
<pre class="brush: delphi;">
Var
  cadena: string;
begin
  cadena := inputbox('Entra un texto','texto','...');
end;
</pre>
<p><strong><span style="text-decoration: underline;">SelectDirectory &#8211; Para seleccionar un directorio<br />
</span></strong>Con la función de delphi SelectDirectory  llamamos al cuadro de dialogo para seleccionar un directorio.</p>
<p><span style="color: #3366ff;"><em>function SelectDirectory(const Caption: string; const Root: WideString; out Directory: string): Boolean; overload;</em></span><br />
Ejemplo:</p>
<pre class="brush: delphi;">
var
  initialDir,ResultDir: string;
begin
  ResultDir := '';
  if ( SelectDirectory('Select directory...',initialDir,resultDir) ) then
    ShowMessage(ResultDir);
end;
</pre>
<p>mostrará un cuadro como el siguiente:<br />
<img class="alignnone size-full wp-image-232" title="selectdirectory" src="http://www.webserveis.com/mundodelphi/wp-content/uploads/2009/12/selectdirectory.JPG" alt="selectdirectory" width="324" height="338" /></p>
<p><a title="Descargar Codigo fuente de dialogos" href="http://www.webserveis.com/mundodelphi/wp-content/uploads/2009/12/dialogs.zip" target="_self">Codigo fuente del articulo &#8211; delphi 7.0</a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/&amp;title=Cuadros+de+dialogo+de+windows+en+Delphi" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/&amp;t=Cuadros+de+dialogo+de+windows+en+Delphi" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Cuadros+de+dialogo+de+windows+en+Delphi+-+http://b2l.me/tsdcu+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/&amp;n=Cuadros+de+dialogo+de+windows+en+Delphi&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Cuadros%20de%20dialogo%20de%20windows%20en%20Delphi%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22El%20sistema%20operativo%20Windows%20nos%20ofrece%20diferentes%20cuadros%20de%20dialogo%2C%20para%20mostrar%20texto%2C%20cuadros%20con%20opciones%2C%20selecci%C3%B3n%20de%20directorios%2C%20entradas%20de%20texto%2C%20salvar%20documento.%0D%0A%0D%0AShowMessage%20-%20Mostrar%20un%20cuadro%20de%20dialogo%20simple%0D%0AEl%20primero%20que%20veremos%20es%20el%20cuadro%20de%20dialogo%20simple%2C%20ese%20cuadro%20de%20%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/&amp;title=Cuadros+de+dialogo+de+windows+en+Delphi" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/&amp;title=Cuadros+de+dialogo+de+windows+en+Delphi&amp;srcUrl=http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/&amp;srcTitle=Cuadros+de+dialogo+de+windows+en+Delphi&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2009/12/02/cuadros-de-dialogo-de-windows-en-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detectar y prevenir el cierre de windows</title>
		<link>http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/</link>
		<comments>http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 13:04:29 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[TMessage]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=227</guid>
		<description><![CDATA[Muchos programas de windows cuando damos la orden de apagar el sistema o bien reiniciarlo, si hemos hecho cambios sobre algún documento nos dice con un cuadro de dialogo si queremos guardar etc..
En esta entrada explicare como detectar el apagado del sistema operativo windows usando mensajes que nos envía el SO cuando el usuario decide [...]]]></description>
			<content:encoded><![CDATA[<p>Muchos programas de windows cuando damos la orden de apagar el sistema o bien reiniciarlo, si hemos hecho cambios sobre algún documento nos dice con un cuadro de dialogo si queremos guardar etc..</p>
<p>En esta entrada explicare como detectar el apagado del sistema operativo windows usando mensajes que nos envía el SO cuando el usuario decide apagar o bien reiniciar</p>
<p>Con <span style="color: #3366ff;">WMQueryEndSession</span> podemos detectar el cierre del sistema operativo</p>
<p>Para poder capturar mensajes de windows tenemos que ponerlo en la parte private de la unidad</p>
<p><span style="color: #3366ff;">procedure WMQueryEndSession(var Msg: TMessage); message WM_QUERYENDSESSION;</span></p>
<p><strong>Ejemplo:</strong></p>
<pre class="brush: delphi;">
Procedure TForm1.WMQueryEndSession(var Msg : TMessage);
begin
if (MessageDlg('Quieres continuar con el apagado?',mtConfirmation,[mbYes,mbNo],0)) = mrNo then
     Msg.Result := 0
else
     Msg.Result := 1;
     close;
end;
</pre>
<p><strong>Consejos:</strong><br />
Dependiendo de la aplicación que diseñamos, a la hora de detectar el apagado de windows podríamos hacer varias operaciones, por ejemplo un editor de texto básico.<br />
Si el usuario ha creado un documento nuevo y no lo ha guardado, podríamos guardarlo automáticamente con algún nombre predeterminado, que cuando volviera abrir nuestro programa le advirtiera de que ultima vez no se guardo el documento y si lo quiere respaldar.<br />
Podríamos también mostrar un cuadro de dialogo con algún temporizador que al terminar si el usuario no hace ninguna operación se apagara el sistema.</p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/&amp;title=Detectar+y+prevenir+el+cierre+de+windows" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/&amp;t=Detectar+y+prevenir+el+cierre+de+windows" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Detectar+y+prevenir+el+cierre+de+windows+-+http://b2l.me/tsdcv+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/&amp;n=Detectar+y+prevenir+el+cierre+de+windows&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Detectar%20y%20prevenir%20el%20cierre%20de%20windows%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22Muchos%20programas%20de%20windows%20cuando%20damos%20la%20orden%20de%20apagar%20el%20sistema%20o%20bien%20reiniciarlo%2C%20si%20hemos%20hecho%20cambios%20sobre%20alg%C3%BAn%20documento%20nos%20dice%20con%20un%20cuadro%20de%20dialogo%20si%20queremos%20guardar%20etc..%0D%0A%0D%0AEn%20esta%20entrada%20explicare%20como%20detectar%20el%20apagado%20del%20sistema%20operativo%20windows%20usando%20mensajes%20que%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/&amp;title=Detectar+y+prevenir+el+cierre+de+windows" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/&amp;title=Detectar+y+prevenir+el+cierre+de+windows&amp;srcUrl=http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/&amp;srcTitle=Detectar+y+prevenir+el+cierre+de+windows&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2009/12/02/detectar-y-prevenir-el-cierre-de-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detectar el modo de inicio de Windows</title>
		<link>http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/</link>
		<comments>http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 19:26:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=226</guid>
		<description><![CDATA[A veces nos puede resultar útil detectar si se inició el sistema operativo de forma normal, seguro “safe mode” o bien a modo de prueba de errores con red, para saber eso utilizaremos la función GetSystemMetrics con el atributo SM_CLEANBOOT que nos devolvera el modo de inicio del sistema con tres valores
0 = Inicio Normal
1 [...]]]></description>
			<content:encoded><![CDATA[<p>A veces nos puede resultar útil detectar si se inició el sistema operativo de forma normal, seguro “safe mode” o bien a modo de prueba de errores con red, para saber eso utilizaremos la función <span style="color: #3366ff;">GetSystemMetrics </span>con el atributo <span style="color: #3366ff;">SM_CLEANBOOT</span> que nos devolvera el modo de inicio del sistema con tres valores</p>
<p>0 = Inicio Normal<br />
1 = Inicio Seguro<br />
2 = Modo a prueba de errores con red</p>
<p>ejemplo de uso</p>
<pre class="brush: delphi;">
var inicio:integer;
begin
 inicio := GetSysTemMetrics(SM_CLEANBOOT);

 case inicio of
 1: ShowMessage('Inicio Normal');
 2: ShowMessage('Modo de Prueba');
 3: ShowMessage('Modo a prueba de errores con red');
 else
 ShowMessage('No se ha detectado');
 end;
end;
</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/&amp;title=Detectar+el+modo+de+inicio+de+Windows" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/&amp;t=Detectar+el+modo+de+inicio+de+Windows" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Detectar+el+modo+de+inicio+de+Windows+-+http://b2l.me/tsbxf+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/&amp;n=Detectar+el+modo+de+inicio+de+Windows&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Detectar%20el%20modo%20de%20inicio%20de%20Windows%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22A%20veces%20nos%20puede%20resultar%20%C3%BAtil%20detectar%20si%20se%20inici%C3%B3%20el%20sistema%20operativo%20de%20forma%20normal%2C%20seguro%20%E2%80%9Csafe%20mode%E2%80%9D%20o%20bien%20a%20modo%20de%20prueba%20de%20errores%20con%20red%2C%20para%20saber%20eso%20utilizaremos%20la%20funci%C3%B3n%20GetSystemMetrics%20con%20el%20atributo%20SM_CLEANBOOT%20que%20nos%20devolvera%20el%20modo%20de%20inicio%20del%20sistema%20con%20t%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/&amp;title=Detectar+el+modo+de+inicio+de+Windows" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/&amp;title=Detectar+el+modo+de+inicio+de+Windows&amp;srcUrl=http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/&amp;srcTitle=Detectar+el+modo+de+inicio+de+Windows&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2009/12/01/detectar-el-modo-de-inicio-de-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generar números aleatorios con delphi</title>
		<link>http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/</link>
		<comments>http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 17:26:56 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Apuntes de Delphi]]></category>
		<category><![CDATA[referencia]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=225</guid>
		<description><![CDATA[la función Random en delphi nos permite generar números aleatorios, podemos generar con coma flotante o bien enteros
usamos random de la siguiente manera

variable := random;
la variable puede ser float o intenger, pero por defecto random nos devuelve un coma flotante

var
 numero:single;
begin
 numero := random;
end;

si queremos que nos devuelva un entero debemos marca-le un limite
random(100) eso [...]]]></description>
			<content:encoded><![CDATA[<p>la función <span style="color: #99ccff;"><strong>Random </strong></span>en delphi nos permite generar números aleatorios, podemos generar con coma flotante o bien enteros</p>
<p>usamos random de la siguiente manera<br />
<span style="color: #33cccc;"><br />
<span style="color: #99ccff;">variable := random;</span></span></p>
<p>la variable puede ser float o intenger, pero por defecto random nos devuelve un coma flotante</p>
<pre class="brush: delphi;">
var
 numero:single;
begin
 numero := random;
end;
</pre>
<p>si queremos que nos devuelva un entero debemos marca-le un limite</p>
<p><strong><span style="color: #99ccff;">random(100)</span> </strong>eso nos devolverá un valor de 0 a 100 aleatoriamente</p>
<pre class="brush: delphi;">
var
 numero:integer
begin
 numero := random(100);
end;
</pre>
<p>con la función <span style="color: #99ccff;"><strong>RandomRange </strong></span>podemos especificar un rango de números aleatorios, es decir si quisiéramos obtener un numero aleatorio del 10 a 30</p>
<p><span style="color: #99ccff;">numero := randomRange(10,30);</span></p>
<p>Función Randomize que es la quien genera los patrones de los números aleatorios, si no la ponemos el random siempre nos devuelve la misma serie de números aleatorios y si la insertamos en un lugar del programa tendremos 100% números aleatorios</p>
<p>y por ultimo RandSeed que es para saber que numero aleatorio irá a continuación</p>
<p><span style="color: #99ccff;">numero := RandSeed;</span></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/&amp;title=Generar+n%C3%BAmeros+aleatorios+con+delphi" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/&amp;t=Generar+n%C3%BAmeros+aleatorios+con+delphi" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Generar+n%C3%BAmeros+aleatorios+con+delphi+-+http://b2l.me/tsdcw+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/&amp;n=Generar+n%C3%BAmeros+aleatorios+con+delphi&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Generar%20n%C3%BAmeros%20aleatorios%20con%20delphi%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22la%20funci%C3%B3n%20Random%20en%20delphi%20nos%20permite%20generar%20n%C3%BAmeros%20aleatorios%2C%20podemos%20generar%20con%20coma%20flotante%20o%20bien%20enteros%0D%0A%0D%0Ausamos%20random%20de%20la%20siguiente%20manera%0D%0A%0D%0Avariable%20%3A%3D%20random%3B%0D%0A%0D%0Ala%20variable%20puede%20ser%20float%20o%20intenger%2C%20pero%20por%20defecto%20random%20nos%20devuelve%20un%20coma%20flotante%0D%0A%0D%0A%5Bdelphi%5D%0D%0Avar%0D%0A%20nu%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/&amp;title=Generar+n%C3%BAmeros+aleatorios+con+delphi" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/&amp;title=Generar+n%C3%BAmeros+aleatorios+con+delphi&amp;srcUrl=http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/&amp;srcTitle=Generar+n%C3%BAmeros+aleatorios+con+delphi&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2009/11/11/generar-numeros-aleatorios-con-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ventanas parpadeantes con FlashWindow</title>
		<link>http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/</link>
		<comments>http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:20:11 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>
		<category><![CDATA[formulario]]></category>
		<category><![CDATA[truco]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=223</guid>
		<description><![CDATA[frase de busqueda interna
Cómo crear una barra de título intermitente en un formulario, ventana intermitente, formulario parpadeante, formulario intermitente, formulario flashing,Window flashing,  efecto brillo formulario, efecto brillo en ventana,ventana parpadeante en la barra de tareas
Una técnica para avisar al usuario mientras tiene una ventana minimizada es hacerla parpadear en la barra de herramientas, un ejemplo [...]]]></description>
			<content:encoded><![CDATA[<p><small><span style="color: #888888;">frase de busqueda interna<br />
Cómo crear una barra de título intermitente en un formulario, ventana intermitente, formulario parpadeante, formulario intermitente, formulario flashing,Window flashing,  efecto brillo formulario, efecto brillo en ventana,ventana parpadeante en la barra de tareas</span></small></p>
<p>Una técnica para avisar al usuario mientras tiene una ventana minimizada es hacerla parpadear en la barra de herramientas, un ejemplo claro lo hace el famoso programa de meseguería MSN Messenger, que cuando alguien nos habla y tenemos su ventana minimizada, empieza a parpadear hasta que la abrimos, con delphi es muy simple hacer parpadear una ventana con una sola función lo hacemos todo</p>
<p><strong><span style="color: #99ccff;">FlashWindow(Handle,True);</span></strong></p>
<p>En Handle le pasamos el Handle de la ventana que queramos hacerla parpadear, la función solo lo hace una vez, si queremos el efecto repetitivo, una solución seria ponerla dentro de un timer como el siguiente ejemplo</p>
<pre class="brush: delphi;">
Timer1.Interval = n  (Tip for n = 1000  &quot;1 second&quot;)

procedure TForm1.Timer1Timer(Sender: TObject);
begin
 FlashWindow(Handle, true);
 FlashWindow(Application.Handle, true);
end;
</pre>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/&amp;title=Ventanas+parpadeantes+con+FlashWindow" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/&amp;t=Ventanas+parpadeantes+con+FlashWindow" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Ventanas+parpadeantes+con+FlashWindow+-+http://b2l.me/tsdcz+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/&amp;n=Ventanas+parpadeantes+con+FlashWindow&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Ventanas%20parpadeantes%20con%20FlashWindow%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22frase%20de%20busqueda%20interna%0D%0AC%C3%B3mo%20crear%20una%20barra%20de%20t%C3%ADtulo%20intermitente%20en%20un%20formulario%2C%20ventana%20intermitente%2C%20formulario%20parpadeante%2C%20formulario%20intermitente%2C%20formulario%20flashing%2CWindow%20flashing%2C%C2%A0%20efecto%20brillo%20formulario%2C%20efecto%20brillo%20en%20ventana%2Cventana%20parpadeante%20en%20la%20barra%20de%20tareas%0D%0A%0D%0AUna%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/&amp;title=Ventanas+parpadeantes+con+FlashWindow" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/&amp;title=Ventanas+parpadeantes+con+FlashWindow&amp;srcUrl=http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/&amp;srcTitle=Ventanas+parpadeantes+con+FlashWindow&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2009/09/18/ventanas-parpadeantes-con-flashwindow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abrir el panel de control con delphi</title>
		<link>http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/</link>
		<comments>http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 15:43:18 +0000</pubDate>
		<dc:creator>neuronic</dc:creator>
				<category><![CDATA[Trucos Delphi]]></category>
		<category><![CDATA[ShellExecute]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://www.webserveis.com/mundodelphi/?p=220</guid>
		<description><![CDATA[Mostrar el panel de control de windows con delphi y como ejecutar un applet del panel de control especifico
el panel de control de windows lo podemos llamar con la libreria shell32.dll
ShellExecute(Form1.Handle, nil, &#8216;rundll32.exe&#8217;,  &#8217;shell32.dll,Control_RunDLL&#8217;, nil, W_SHOW);
recueda en cargar ShellApi en el uses para utilizar la funcion ShellExecute
si queremos abrir un applet determinado que se encuentra [...]]]></description>
			<content:encoded><![CDATA[<p>Mostrar el panel de control de windows con delphi y como ejecutar un applet del panel de control especifico<br />
el panel de control de windows lo podemos llamar con la libreria shell32.dll</p>
<p><span style="color: #3366ff;">ShellExecute(Form1.Handle, nil, &#8216;rundll32.exe&#8217;,  &#8217;shell32.dll,Control_RunDLL&#8217;, nil, W_SHOW);</span></p>
<p>recueda en cargar ShellApi en el uses para utilizar la funcion ShellExecute</p>
<p>si queremos abrir un applet determinado que se encuentra dentro del panel de control de windows</p>
<p><span style="color: #3366ff;">ShellExecute(Form1.Handle, nil, &#8216;rundll32.exe&#8217;,&#8217;shell32.dll,Control_RunDLL mmsys.cpl&#8217;, nil, SW_SHOW);</span></p>
<p>mmsys.cpl es el applet Multimedia:</p>
<p>se puede especificar el tab que queremos que se abre, aqui se especifica 1 que seria la segunda solapa de applet multimedia</p>
<p><span style="color: #3366ff;">ShellExecute(Form1.Handle, nil, &#8216;rundll32.exe&#8217;,&#8217;shell32.dll,Control_RunDLL mmsys.cpl,,1&#8242;, nil, SW_SHOW);</span></p>
<p><strong>Lista de applets de windows</strong></p>
<p>Podemos hacer una busqueda de archivos con .cpl y obtener sus nombres</p>
<table style="border-collapse: collapse; width: 255pt;" border="0" cellspacing="0" cellpadding="0" width="340">
<col style="width: 160pt;" width="213"></col>
<col style="width: 95pt;" width="127"></col>
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt; width: 160pt;" width="213" height="17">AC3   Filter</td>
<td style="width: 95pt;" width="127">ac3filter.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Adobe Gamma</td>
<td>Adobe Gamma.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Adobe   Version Cue CS2</td>
<td>VersionCueCS2.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Application   paths</td>
<td>apppaths.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Autodesk   Plotter Manager</td>
<td>plotman.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">AvantGo   Connect</td>
<td>agcpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Avira   AntiVir PersonalEdition</td>
<td>avconfig.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">BACKPACK   Finder</td>
<td>bpcpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">BDE   Administrator</td>
<td>bdeadmin.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">ClearCase</td>
<td>cc.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Color   Settings</td>
<td>3dcc.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Compaq   Diagnostics</td>
<td>cpqdiag.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control   Panel</td>
<td>controlp.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Creative   Element Power Tools</td>
<td></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Corel   Versions</td>
<td>verscpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">DANS</td>
<td>danetsvc.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">DiskAccess</td>
<td>dacfg.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Folder size</td>
<td>FolderSize.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">FirebirdSQL   Service Manager</td>
<td>fmmgr.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">HP Jetadmin</td>
<td>jetadmin.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">HP Lock</td>
<td>Hplock.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">IconPackager</td>
<td>ipcpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">ImDisk   Virtual Disk Driver</td>
<td>imdisk.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Intel   Extreme Graphics</td>
<td>igfxcpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">IP   Office Voicemail Pro</td>
<td>ims.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Java</td>
<td>jpicpl32.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">JInitiator   1.x.y.z</td>
<td>plugincpl1xyz.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">MSConfig</td>
<td>MSConfig.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">MultiSite</td>
<td>ms.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Nero   BurnRights</td>
<td>NeroBurnRights.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">nVIDIA   Control panel</td>
<td>nvidia.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Pointer   Devices</td>
<td>tbctlpnl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Quicktime</td>
<td>quicktime.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">RealPlayer</td>
<td>prefscpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Realtek   AC97 Audio Control Panel</td>
<td>alsndmgr.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">RESTrick   Control Panel</td>
<td>rest2.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Safarp</td>
<td>safarp.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Send To Toys</td>
<td>sendtotoys.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Services   and Devices</td>
<td>pserv.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SNTP Service</td>
<td>sntpserv.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Startup</td>
<td>startup.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Symantec   LiveUpdate</td>
<td>s32lucp2.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">System   Information</td>
<td>Sancpl.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">System   Info for Windows</td>
<td>siw.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Trust-No-Exe</td>
<td>trustnoexe.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">VMware Tools</td>
<td>VMControlPanel.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">WIBU-KEY</td>
<td>wibuke32.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Winlogos</td>
<td>wnlgo.cpl</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">X-Setup Pro</td>
<td>xqdcXSPApplet.cpl</td>
</tr>
</tbody>
</table>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://delicious.com/post?url=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/&amp;title=Abrir+el+panel+de+control+con+delphi" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/&amp;t=Abrir+el+panel+de+control+con+delphi" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Abrir+el+panel+de+control+con+delphi+-+http://b2l.me/tsdc3+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-meneame">
			<a href="http://meneame.net/submit.php?url=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
		<li class="sexy-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/&amp;n=Abrir+el+panel+de+control+con+delphi&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="sexy-technorati">
			<a href="http://technorati.com/faves?add=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Abrir%20el%20panel%20de%20control%20con%20delphi%22&amp;body=I+thought+this+article+might+interest+you.%0A%0A%22Mostrar%20el%20panel%20de%20control%20de%20windows%20con%20delphi%20y%20como%20ejecutar%20un%20applet%20del%20panel%20de%20control%20especifico%0D%0Ael%20panel%20de%20control%20de%20windows%20lo%20podemos%20llamar%20con%20la%20libreria%20shell32.dll%0D%0A%0D%0AShellExecute%28Form1.Handle%2C%20nil%2C%20%27rundll32.exe%27%2C%C2%A0%20%27shell32.dll%2CControl_RunDLL%27%2C%20nil%2C%20W_SHOW%29%3B%0D%0A%0D%0Arecueda%20en%20car%22%0A%0AYou+can+read+the+full+article+here%3A%20http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/&amp;title=Abrir+el+panel+de+control+con+delphi" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-googlereader">
			<a href="http://www.google.com/reader/link?url=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/&amp;title=Abrir+el+panel+de+control+con+delphi&amp;srcUrl=http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/&amp;srcTitle=Abrir+el+panel+de+control+con+delphi&amp;snippet=POST_SUMMARY" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
<!-- End SexyBookmarks Menu Code -->

]]></content:encoded>
			<wfw:commentRss>http://www.webserveis.com/mundodelphi/2009/07/29/abrir-el-panel-de-control-con-delphi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
