<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://geeks.ms/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Juan Fco. Berrocal -- DotNET y Yo transmitiendo desde GeeKs.Ms : Controles</title><link>http://geeks.ms/blogs/jberrocal/archive/tags/Controles/default.aspx</link><description>Etiquetas: Controles</description><dc:language /><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Formulario y Controles con estilos XP en VB.NET 2003</title><link>http://geeks.ms/blogs/jberrocal/archive/2007/02/13/formulario-y-controles-con-estilos-xp-en-vb-net-2003.aspx</link><pubDate>Tue, 13 Feb 2007 17:53:00 GMT</pubDate><guid isPermaLink="false">2a2e7ade-7474-448b-9de5-1515d8bb7d1b:10373</guid><dc:creator>Juan Fco. Berrocal</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://geeks.ms/blogs/jberrocal/rsscomments.aspx?PostID=10373</wfw:commentRss><comments>http://geeks.ms/blogs/jberrocal/archive/2007/02/13/formulario-y-controles-con-estilos-xp-en-vb-net-2003.aspx#comments</comments><description>&lt;P&gt;Este pequeño "tip" hace tiempo que lo publique en otra pagina, pero ahora lo pongo aqui en geeks.ms para el que lo pueda necesitar.&lt;/P&gt;
&lt;P&gt;1. Creamos una WindowsApplication en VB.NET&lt;BR&gt;&lt;BR&gt;Luego creamos este metodo&lt;BR&gt;&lt;BR&gt;&lt;SPAN&gt;Public Shared &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; main()&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN&gt;Application.EnabledVisualStyles() &lt;/SPAN&gt;&lt;SPAN&gt;'Aqui activamos los estilos visuales XP '&lt;/SPAN&gt;&lt;BR&gt;ApplicationRun(&lt;SPAN&gt;New &lt;/SPAN&gt;&lt;SPAN&gt;Form1) &lt;/SPAN&gt;&lt;SPAN&gt;'Aqui le indicamos sobre que lo queremos '&lt;/SPAN&gt;&lt;BR&gt;&lt;BR&gt;&lt;SPAN&gt;End Sub &lt;/SPAN&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Luego localizamos la propiedad de los&amp;nbsp;controles en este caso sea la propiedad &lt;STRONG&gt;FlatStyle &lt;/STRONG&gt;la pondremos que es igual a &lt;STRONG&gt;System&lt;/STRONG&gt;. &lt;/SPAN&gt;Algo que es curioso es que los TextBox no poseen esta propiedad, pero, inmediatamente hacemos el procedimiento e insertamos un TextBox, cuando compilas, adquieren el estilo XP&lt;BR&gt;sin embargo los botones no.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Un Saludo.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://geeks.ms/aggbug.aspx?PostID=10373" width="1" height="1"&gt;</description><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/VB.NET/default.aspx">VB.NET</category><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/Controles/default.aspx">Controles</category><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/Estilos/default.aspx">Estilos</category><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/Forms/default.aspx">Forms</category><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/VS.NET2003/default.aspx">VS.NET2003</category></item><item><title>Limpiar informacion de los controles (TextBox's) Rapidamente</title><link>http://geeks.ms/blogs/jberrocal/archive/2006/12/14/limpiar-informacion-de-los-controles-textbox-s-rapidamente.aspx</link><pubDate>Thu, 14 Dec 2006 13:34:00 GMT</pubDate><guid isPermaLink="false">2a2e7ade-7474-448b-9de5-1515d8bb7d1b:7500</guid><dc:creator>Juan Fco. Berrocal</dc:creator><slash:comments>35</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://geeks.ms/blogs/jberrocal/rsscomments.aspx?PostID=7500</wfw:commentRss><comments>http://geeks.ms/blogs/jberrocal/archive/2006/12/14/limpiar-informacion-de-los-controles-textbox-s-rapidamente.aspx#comments</comments><description>&lt;P&gt;Esto es un tips muy facilito de como limpiar informacion en los controles de un formulario este caso el TextBox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Como todos saben en &lt;STRONG&gt;.NET&lt;/STRONG&gt; podemos limpiar informacion de un &lt;STRONG&gt;TextBox &lt;/STRONG&gt;con un metodo llamado &lt;STRONG&gt;"Clear ( )"&lt;/STRONG&gt; y tambien lo podemos hacer de esta manera: &lt;STRONG&gt;TextBox1.Text = " ";&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;Pero que pasa si tenemos muchos &lt;EM&gt;TextBox's&lt;/EM&gt; en nuestro formulario, entonces tendriamos que ir uno por uno agregandole el metodo &lt;STRONG&gt;"Clear ( )"&lt;/STRONG&gt;. Pero con foreach lo podemos hacer de la siguiente manera.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;El codigo en C# seria el siguiente.&lt;/STRONG&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;private&lt;/FONT&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt; &lt;/FONT&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; btnLimpiar_Click(&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; sender, &lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#008080 size=2&gt;EventArgs&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt; e)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Limpiar de manera rapida&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; (&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008080 size=2&gt;Control&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; c &lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;in&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt;.Controls)&lt;/FONT&gt;&lt;/P&gt;&lt;B&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; (c &lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;is&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt; &lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#008080 size=2&gt;TextBox&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c.Text = &lt;/FONT&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#800000 size=2&gt;""&lt;/FONT&gt;&lt;B&gt;&lt;FONT size=2&gt;;&lt;/FONT&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt;&lt;FONT color=#008000 size=2&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;//Enfoco en el primer TextBox&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt;.textBox1.Focus();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;y listo!!!, ya todos los controles estaran listos para insertar informacion dentro de ellos.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;NOTA: Se que muchos aqui se sabian esto, para el que se lo sabia pues lo ha repasado y el que no, pues lo ha aprendido.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Saludos desde Rep. Dom. &lt;img src="http://geeks.ms/emoticons/emotion-5.gif" alt="Wink" /&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://geeks.ms/aggbug.aspx?PostID=7500" width="1" height="1"&gt;</description><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://geeks.ms/blogs/jberrocal/archive/tags/Controles/default.aspx">Controles</category></item></channel></rss>