<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4858096891034168678</id><updated>2024-11-01T04:13:57.524-07:00</updated><title type='text'>Todo Visual Basic .Net</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-5765629190331252751</id><published>2013-06-19T14:41:00.000-07:00</published><updated>2013-06-19T14:43:14.880-07:00</updated><title type='text'>Exportar DataGridView a Microsoft Excel</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Sencilla funcion para exportar un DataGridView a Microsoft excel&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
La presente función exporta el contenido de un datagridview a Excel, crear un archivo temporal y lo muestra al usuario, por lo tanto si no almacenas el documento en el entorno grafico de MS Excel, este no será recuperable&lt;br /&gt;
&lt;br /&gt;
Antes debemos adicionar a nuestro proyecto las referencias necesarias (Interop.excel) dependiendo de la version instalada en tu computador.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Public Function&lt;/span&gt; GridAExcel(&lt;span style=&quot;color: blue;&quot;&gt;ByVal &lt;span style=&quot;color: black;&quot;&gt;DGV&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;As &lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;DataGridView&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;As Boolean&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #6aa84f;&quot;&gt;&#39;Creamos las variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim &lt;/span&gt;exApp &lt;span style=&quot;color: blue;&quot;&gt;As &lt;/span&gt;New Microsoft.Office.Interop.Excel.Application&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim &lt;/span&gt;exLibro &lt;span style=&quot;color: blue;&quot;&gt;As &lt;/span&gt;Microsoft.Office.Interop.Excel.Workbook&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim &lt;/span&gt;exHoja &lt;span style=&quot;color: blue;&quot;&gt;As &lt;/span&gt;Microsoft.Office.Interop.Excel.Worksheet&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exLibro = exApp.Workbooks.Add&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja = exLibro.Worksheets.Add()&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #38761d;&quot;&gt;&#39; ¿Cuantas columnas y cuantas filas?&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim &lt;/span&gt;NCol &lt;span style=&quot;color: blue;&quot;&gt;As Integer&lt;/span&gt; = &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;DGV&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/span&gt;.ColumnCount&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim &lt;/span&gt;NRow &lt;span style=&quot;color: blue;&quot;&gt;As Integer&lt;/span&gt; = &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;DGV&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;&lt;/b&gt;.RowCount&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt; &#39;recorremos todas las filas, y por cada fila todas las columnas&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;y vamos escribiendo.&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For &lt;/span&gt;i &lt;span style=&quot;color: blue;&quot;&gt;As Integer&lt;/span&gt; = 1 To NCol&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja.Cells.Item(1, i)=&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;DGV&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/span&gt;.Columns(i-1).Name.ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For &lt;/span&gt;Fila &lt;span style=&quot;color: blue;&quot;&gt;As Integer&lt;/span&gt; = 0 To NRow - 1&lt;br /&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For &lt;/span&gt;Col &lt;span style=&quot;color: blue;&quot;&gt;As Integer&lt;/span&gt; = 0 &lt;span style=&quot;color: blue;&quot;&gt;To &lt;/span&gt;NCol - 1&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja.Cells.Item(Fila+2, Col+1)=&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;DGV&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.Rows(Fila).Cells(Col).Value()&lt;br /&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;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&#39;Titulo en negrita, Alineado&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja.Rows.Item(1).Font.Bold = 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja.Rows.Item(1).HorizontalAlignment = 3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja.Columns.AutoFit()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&#39;para visualizar el libro&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exApp.Application.Visible = &lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exHoja = &lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exLibro = &lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exApp = &lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Catch &lt;/span&gt;ex As &lt;span style=&quot;color: #3d85c6;&quot;&gt;Exception&lt;/span&gt;&lt;br /&gt;MsgBox(ex.Message, MsgBoxStyle.Critical, &lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;Error al exportar a Excel&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return False&lt;br /&gt;End Try&lt;br /&gt;Return True&lt;br /&gt;End Function&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Luego basta con llamar la funcion anteriormente creada y adicionar como parametro el nombre de nuestro grid&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;GridAExcel(DtgridPacientes)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Y es todo... &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/5765629190331252751/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2013/06/exportar-datagridview-microsoft-excel.html#comment-form' title='29 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5765629190331252751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5765629190331252751'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2013/06/exportar-datagridview-microsoft-excel.html' title='Exportar DataGridView a Microsoft Excel'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-8777211665933739837</id><published>2013-06-05T12:52:00.005-07:00</published><updated>2013-06-05T12:52:50.193-07:00</updated><title type='text'>Verificar si existe directorio, si no existe crearlo</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Verificar si existe directorio, si no existe crearlo&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;El siguiente codigo, verifica si un directorio existe, si este no existe lo crea en el path seleccionado&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Espacio de nombres necesario:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Imports&lt;/span&gt; System.IO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;If Not&lt;/span&gt; &lt;span style=&quot;color: #9fc5e8;&quot;&gt;Directory&lt;/span&gt;.Exists(VariableConPath&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #6fa8dc;&quot;&gt;Directory&lt;/span&gt;.CreateDirectory(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;VariableConPath&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Aquí&amp;nbsp; un ejemplo con el directorio donde se ejecuta nuestra aplicacion y una carpeta dentro de esta&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;If Not&lt;/span&gt; &lt;span style=&quot;color: #9fc5e8;&quot;&gt;Directory&lt;/span&gt;.Exists(&lt;span style=&quot;color: #9fc5e8;&quot;&gt;Application&lt;/span&gt;.StartupPath &amp;amp; &lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;\PDF&quot;&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #6fa8dc;&quot;&gt;Directory&lt;/span&gt;.CreateDirectory(&lt;span style=&quot;color: #6fa8dc;&quot;&gt;Application&lt;/span&gt;.StartupPath &amp;amp; &lt;span style=&quot;color: #cc0000;&quot;&gt;&quot;\PDF&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/8777211665933739837/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2013/06/verificar-si-existe-directorio-si-no.html#comment-form' title='6 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/8777211665933739837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/8777211665933739837'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2013/06/verificar-si-existe-directorio-si-no.html' title='Verificar si existe directorio, si no existe crearlo'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-1882616424156550050</id><published>2013-05-16T10:02:00.001-07:00</published><updated>2014-04-10T09:48:59.012-07:00</updated><title type='text'>Crear un teclado virtual(Virtual Keyboard) </title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Crear un teclado virtual(Virtual Keyboard)&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Con el auge de las nuevas tendencias a monitores y pantallas touch es necesario el desarrollo de apps que esten acorde a dicha tendencia. &lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;En esta ocacion veremos la forma de crear un teclado virtual adecuado a un monitor touch, el cual funcionara de manera independiente, lo que significa que podemos hacer la invocacion de nuestro teclado desde cualquier formulario de cualquier aplicacion donde se requiera, unicamente enviando el id de la ventana que lo invoca, eso para saber donde se enviara cada tecla pulsada.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYTzt-NfOBUOzK6kGjKQD5TW30J2wtU6VOl1thQmdKKnOG8yxAdDddus0pMu0jAx4fC1w5ihmWbowlEAWSiA5Av3c1_R6vQfyqoNDfe67EQhFv-1MTH8Ki2UJRoVjOpUKTT5ZQ67AqKpEW/s1600/KB_cesar%C3%91.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYTzt-NfOBUOzK6kGjKQD5TW30J2wtU6VOl1thQmdKKnOG8yxAdDddus0pMu0jAx4fC1w5ihmWbowlEAWSiA5Av3c1_R6vQfyqoNDfe67EQhFv-1MTH8Ki2UJRoVjOpUKTT5ZQ67AqKpEW/s400/KB_cesar%C3%91.JPG&quot; height=&quot;125&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Para invocar el teclado desde una aplicacion externa basta con&lt;br /&gt;
&lt;br /&gt;
Identificamos cual es el proceso en ejecucion&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Dim process As System.Diagnostics.Process = System.Diagnostics.Process.GetCurrentProcess&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Adicionamos el valor a una variable &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;VariableParaKeyBoard = process.MainWindowHandle&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Verificamos la existencia del ejecutable e iniciamos el proceso enviando la variable capturada anterioemnete como parametro&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;If File.Exists(&quot;KB_.exe&quot;) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process.Start(&quot;KB_.exe&quot;, VariableParaKeyBoard)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;No se ha encontrado: KB_.exe el proceso no puede continuar&quot;, &quot;No se encontro ejecutable&quot;, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Por cuestiones de tiempo unicamente colocare la descarga del proyecto.&lt;br /&gt;
&lt;a href=&quot;https://onedrive.live.com/redir?resid=F66207F2BF6420D!335&amp;amp;authkey=!AFyn71y7-3YQOvE&amp;amp;ithint=file%2c.rar&quot; target=&quot;_blank&quot;&gt;Descargar Proyecto&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/1882616424156550050/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2013/05/crear-un-teclado-virtualvirtual-keyboard.html#comment-form' title='4 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/1882616424156550050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/1882616424156550050'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2013/05/crear-un-teclado-virtualvirtual-keyboard.html' title='Crear un teclado virtual(Virtual Keyboard) '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYTzt-NfOBUOzK6kGjKQD5TW30J2wtU6VOl1thQmdKKnOG8yxAdDddus0pMu0jAx4fC1w5ihmWbowlEAWSiA5Av3c1_R6vQfyqoNDfe67EQhFv-1MTH8Ki2UJRoVjOpUKTT5ZQ67AqKpEW/s72-c/KB_cesar%C3%91.JPG" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-8272073437660531589</id><published>2012-10-15T10:59:00.001-07:00</published><updated>2012-10-15T10:59:29.758-07:00</updated><title type='text'>Validar correo electrónico</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Validar correo electrónico&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Normalmente se nos presenta el inconveniente de saber si la dirección de correo electrónico que están escribiendo nuestros usuarios esta en un formato valido o no, para este fin el proceso a realizar es, la validacion de las partes básicas de &amp;nbsp;un correo electrónico, tal como una @ un . (Punto) y un dominio consecuente&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Para poder lograr esta validacion usaremos una&amp;nbsp;expresión&amp;nbsp;regular, en vb.net&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Espacio de nombres:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Imports &lt;/span&gt;System.Text.RegularExpressions&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: yellow; font-family: Courier New, Courier, monospace;&quot;&gt;Función&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; Public Function&lt;/span&gt; validar_Mail(&lt;span style=&quot;color: blue;&quot;&gt;ByVal &lt;/span&gt;sMail &lt;span style=&quot;color: blue;&quot;&gt;As String&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;As Boolean&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6aa84f; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39; retorna true o false &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return &lt;/span&gt;Regex.IsMatch(sMail, _&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&quot;^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0- &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9-]+)*(\.[a-z]{2,4})$&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; End Function&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: yellow; font-family: Courier New, Courier, monospace;&quot;&gt;Llamado a la funcion la cual puede ser desde el evente leave de el textbox deseado&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If &lt;/span&gt;validar_Mail(LCase(TxtMail.Text)) = &lt;span style=&quot;color: blue;&quot;&gt;False Then&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;MessageBox&lt;/span&gt;.Show(&lt;span style=&quot;color: red;&quot;&gt;&quot;Dirección de correo electronico no valida, &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;el correo debe tener el formato: nombre@dominio.com, &quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &amp;amp; _&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&quot; por favor seleccione un correo valido&quot;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;&quot;Validación de &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;correo electronico&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;MessageBoxButtons&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;.OK,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;MessageBoxIcon&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;.Exclamation)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;TxtMail.Focus()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;TxtMail.SelectAll()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;End If&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Saludos!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Y como siempre dudas o comentarios son bien recibidos&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/8272073437660531589/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2012/10/validar-correo-electronico.html#comment-form' title='14 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/8272073437660531589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/8272073437660531589'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2012/10/validar-correo-electronico.html' title='Validar correo electrónico'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-104659878590195222</id><published>2012-09-28T14:04:00.000-07:00</published><updated>2012-10-18T13:54:28.331-07:00</updated><title type='text'>Uso de control TIMER </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large; text-align: start;&quot;&gt;&lt;b&gt;Uso de control TIMER&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: start;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: start;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
En esta ocación veremos el funcionamiento del control TIMER o cronometro, el cual puede servirnos por ejemplo para la&amp;nbsp;ejecución&amp;nbsp;de alguna&amp;nbsp;función&amp;nbsp;recurrente, la cual podemos controlar y/o ejecutar en una cantidad de tiempo determinada&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Que necesitamos&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
1- Un formulario WinForm&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
2- Adicionar el control Timer1 al formulario&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
3- Un Label para poder mostrar la cuenta regersiva&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwoyLLNvia6ip3E8eaEje-_xHvX7zjnYAiqtoYqLloEz6nGJBfn6_bvbExoh9xIw_QfaVdww6wXpYp-w1EQ2ibYC98g_W5S7miW3L5YpAcpDDWYZXzmp0XztO57I264UqGD3j0_kVswgLj/s1600/Captura.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwoyLLNvia6ip3E8eaEje-_xHvX7zjnYAiqtoYqLloEz6nGJBfn6_bvbExoh9xIw_QfaVdww6wXpYp-w1EQ2ibYC98g_W5S7miW3L5YpAcpDDWYZXzmp0XztO57I264UqGD3j0_kVswgLj/s1600/Captura.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Timer1&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9wtgFkwXpiE3GAKHQdyTMKLfx2vBUpsEMEuOdCWQthf9vT96tJ5nB7MRrdY2V4RKaHFYO6Z39pv4I75McPXjewUahyphenhyphenPgHeL6t9w3UsClp3vUkRu47yPDBEgWOwXgW6RC5QzzNcIo8KlrK/s1600/Captura2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9wtgFkwXpiE3GAKHQdyTMKLfx2vBUpsEMEuOdCWQthf9vT96tJ5nB7MRrdY2V4RKaHFYO6Z39pv4I75McPXjewUahyphenhyphenPgHeL6t9w3UsClp3vUkRu47yPDBEgWOwXgW6RC5QzzNcIo8KlrK/s1600/Captura2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Vista del Label en tiempo de&amp;nbsp;ejecución&amp;nbsp;con la cuenta regresiva&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;Vamos al&amp;nbsp;&lt;/span&gt;código&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
En el load del formulario colocamos la llamada para iniciar el timer, utilizando los pulsos del reloj de Windows&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
llamamos la&amp;nbsp;función&amp;nbsp;TiempoEjecutar y adicionamos como&amp;nbsp;parámetro&amp;nbsp;la cantidad en segundos en cual se ejecutara&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Public Class&lt;/span&gt; Form1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Private &lt;/span&gt;TiempoRestante &lt;span style=&quot;color: blue;&quot;&gt;As Integer&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Private Sub&lt;/span&gt; Form1_load(ByVal sender As Object, ByVal e As System.EventArgs) &lt;span style=&quot;color: blue;&quot;&gt;Handles &lt;/span&gt;Me.Click&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Call TiempoEjecutar(10)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace;&quot;&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Public Function&lt;/span&gt; TiempoEjecutar(ByVal Tiempo As Integer)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TiempoEjecutar = &quot;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TiempoRestante = Tiempo &amp;nbsp;&#39; 1 minutos=60 segundos&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Timer1.Interval = 1000&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Call TimerOn(1000) &#39; Hechanos a andar el timer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Public Sub&lt;/span&gt; TimerOn(ByRef Interval As Short)&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;If &lt;/span&gt;Interval &amp;gt; 0 Then&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Timer1.Enabled = True&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Timer1.Enabled = False&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End If&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Cuando el tiempo termina ejecutamos la&amp;nbsp;&lt;/span&gt;función&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;deseada.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Cada tick del reloj verificamos la cuenta regresiva.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private Sub&lt;/span&gt; Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) &lt;span style=&quot;color: blue;&quot;&gt;Handles &lt;/span&gt;Timer1.Tick&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;If &lt;/span&gt;TiempoRestante &amp;gt;= 0 Then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LblEjecutar.Text = &quot;Ejecutar en: &quot; &amp;amp; TiempoRestante&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TiempoRestante = TiempoRestante - 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Timer1.Enabled = False&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&#39;Ejecuta tu función cuando termina el tiempo&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TiempoEjecutar(10)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Saludos!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/104659878590195222/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2012/09/uso-de-control-timer.html#comment-form' title='8 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/104659878590195222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/104659878590195222'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2012/09/uso-de-control-timer.html' title='Uso de control TIMER '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwoyLLNvia6ip3E8eaEje-_xHvX7zjnYAiqtoYqLloEz6nGJBfn6_bvbExoh9xIw_QfaVdww6wXpYp-w1EQ2ibYC98g_W5S7miW3L5YpAcpDDWYZXzmp0XztO57I264UqGD3j0_kVswgLj/s72-c/Captura.JPG" height="72" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-2732448863618714512</id><published>2012-09-27T07:42:00.001-07:00</published><updated>2012-09-27T12:51:33.685-07:00</updated><title type='text'>Listar impresores y marcar el predeterminado</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Listar impresores y marcar el predeterminado&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
En este ejemplo veremos como listar las impresoras instaladas en tu OS y marcar la impresora definida como predeterminada, asi tambien se mostrará el uso del control listview para agregar iconos a cada item del&amp;nbsp;control&amp;nbsp;mencionado.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Para tal efecto es necesario agregar al proyecto el control llamado ImageList que sera el contenedor de los iconos que utilizaremos en el ListView&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
En&amp;nbsp;teoría&amp;nbsp;lo que se pretende es: Listar los impresores encontrados y añadir un icono en el ListView para representar cada uno de ellos.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Controles necesario&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
ImageList para añadir iconos&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpIxy0RSCU0q4roQnxmIYXLFECcyO94KRG2zBLPmnFDMfrUcG84WCcqw9FXiAId-CKLNarASEXBrD8dIbefgmv3aDpj3Yn2OKmaIwnZRdLvkCh0YmziWhJmej52H-uGNPkC-9tfjgjxrTD/s1600/Captura.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpIxy0RSCU0q4roQnxmIYXLFECcyO94KRG2zBLPmnFDMfrUcG84WCcqw9FXiAId-CKLNarASEXBrD8dIbefgmv3aDpj3Yn2OKmaIwnZRdLvkCh0YmziWhJmej52H-uGNPkC-9tfjgjxrTD/s1600/Captura.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
ListView1 donde se listarán los impresores&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgz4oSn3Mku2W4yrrmtCW4AmS-BYLnEr25MReMCpo8kmW-UAq5q_KtqLfwMIz4HvPyuaTJhJJWYYhO8O_VkrOumhN9Jugaeir5xl9LZOsDp5e4_NV0MbQ_pkQoJ_LuNA010XhO_GxZgxbB/s1600/Captura2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgz4oSn3Mku2W4yrrmtCW4AmS-BYLnEr25MReMCpo8kmW-UAq5q_KtqLfwMIz4HvPyuaTJhJJWYYhO8O_VkrOumhN9Jugaeir5xl9LZOsDp5e4_NV0MbQ_pkQoJ_LuNA010XhO_GxZgxbB/s1600/Captura2.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Una vez adicionados los controles adicionas las imagenes que estaran disponibles en el ImageList, basados en el indice de cada una se seleccionarán para adicionar a cada item del ListView&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrEZgUK0waz4QHZ36ON8NTaFykrI-aMf2WyL3Li8CPsyj1vwjhKarFxE1w-vVxSNN_1IltS4LcIBzVm6MLNmyamMvZI9L41XFnL-7-pFPG-AvPCYKKb5eGGD7rT9_TConTgztPVGIeRvB9/s1600/Captura3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrEZgUK0waz4QHZ36ON8NTaFykrI-aMf2WyL3Li8CPsyj1vwjhKarFxE1w-vVxSNN_1IltS4LcIBzVm6MLNmyamMvZI9L41XFnL-7-pFPG-AvPCYKKb5eGGD7rT9_TConTgztPVGIeRvB9/s320/Captura3.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ok. vamos al codigo&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Espacio de nombre&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Imports &lt;/span&gt;System&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private DFPrinter as string&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;Private Sub &lt;/span&gt;Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) &lt;span style=&quot;color: blue;&quot;&gt;Handles MyBase&lt;/span&gt;.Load&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&#39; Asocioamos el ImageList al ListView para obtener los iconos&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;ListView1.StateImageList = ImageList1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;ImpresorasInstaladas()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Private Sub&lt;/span&gt; ImpresorasInstaladas()&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&lt;/span&gt; pdoc As New PrintDocument&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; Impresoras As String&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt; &#39; Default printer &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;DFPrinter&amp;nbsp;= pdoc.PrinterSettings.PrinterName&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt; &#39; recorre las impresoras instaladas &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt; Each Impresoras In PrinterSettings.InstalledPrinters&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListView1.Items.Add(Impresoras.ToString)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListView1.Focus()&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt; x As Integer = 0 &lt;span style=&quot;color: blue;&quot;&gt;To &lt;/span&gt;ListView1.Items.Count - 1&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;If &lt;/span&gt;ListView1.Items(x).Text =&amp;nbsp;DFPrinter&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListView1.Items(x).StateImageIndex = 1 &lt;span style=&quot;color: #38761d;&quot;&gt;&#39;Indice de icono&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ListView1.Items(x).StateImageIndex = 0&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&#39;Indice de icono&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End If&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Resultado&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLOr4qcXXsD5nNK3eCiFFf1ouQIpvClU4KgZnH28Zomvl9_0ov-LcMzHRR0Qkz3pflh-4wbxxlu_hdeYLPs65OgD3jAR_d3PzUfXv1Py4rAmJMoov0flYiPHu_-jnMYBY-68W0uaR2GQn/s1600/Captura4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXLOr4qcXXsD5nNK3eCiFFf1ouQIpvClU4KgZnH28Zomvl9_0ov-LcMzHRR0Qkz3pflh-4wbxxlu_hdeYLPs65OgD3jAR_d3PzUfXv1Py4rAmJMoov0flYiPHu_-jnMYBY-68W0uaR2GQn/s320/Captura4.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/2732448863618714512/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2012/09/listas-impresores-y-marcar-el.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/2732448863618714512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/2732448863618714512'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2012/09/listas-impresores-y-marcar-el.html' title='Listar impresores y marcar el predeterminado'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpIxy0RSCU0q4roQnxmIYXLFECcyO94KRG2zBLPmnFDMfrUcG84WCcqw9FXiAId-CKLNarASEXBrD8dIbefgmv3aDpj3Yn2OKmaIwnZRdLvkCh0YmziWhJmej52H-uGNPkC-9tfjgjxrTD/s72-c/Captura.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-6561739768133825078</id><published>2012-09-27T07:08:00.002-07:00</published><updated>2012-09-27T07:08:42.981-07:00</updated><title type='text'>Encriptar cadena de texto con MD5</title><content type='html'>En muchas ocaciones nos vemos en la necesidad de encriptar cadenas de texto, ya sea para realizar un Log-In en nuestra aplicacion o para ocultar algun contenido por x razon&lt;br /&gt;
&lt;br /&gt;
a&amp;nbsp;continuación&amp;nbsp;colocaré una funcion sencilla para lograr este objetivo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Espacio de nombres (Imports)&lt;br /&gt;
&lt;br /&gt;
Imports System.Security.Cryptography&lt;br /&gt;
&lt;br /&gt;
llamado de&amp;nbsp;función&lt;br /&gt;
&lt;br /&gt;
Dim MiCadenaEncriptada as string = MD5EncryptPass(&quot;123&quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Public Sub MD5EncryptPass(ByVal StrPass As String)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim md5 As MD5CryptoServiceProvider&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim bytValue() As Byte&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim bytHash() As Byte&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim strPassOutput As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim i As Integer&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strPassOutput = &quot;&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; md5 = New MD5CryptoServiceProvider&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytValue = System.Text.Encoding.UTF8.GetBytes(StrPass)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytHash = md5.ComputeHash(bytValue)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; md5.Clear()&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For i = 0 To bytHash.Length - 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strPassOutput &amp;amp;= bytHash(i).ToString(&quot;x&quot;).PadLeft(2, &quot;0&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PasConMD5 = strPassOutput&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;Resultado obtenido &quot;&lt;span style=&quot;background-color: #f1f1f1; color: #aa0000;&quot;&gt;202cb962ac59075b964b07152d234b70&lt;/span&gt;&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Saludos&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/6561739768133825078/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2012/09/encriptar-cadena-de-texto-con-md5.html#comment-form' title='8 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/6561739768133825078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/6561739768133825078'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2012/09/encriptar-cadena-de-texto-con-md5.html' title='Encriptar cadena de texto con MD5'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-2914151148497776268</id><published>2010-07-21T12:29:00.000-07:00</published><updated>2010-07-21T13:03:38.596-07:00</updated><title type='text'>Uso de crystal reports en VB.NET [Via ODBC]</title><content type='html'>Uso de crystal reports en VB.NET&lt;br /&gt;&lt;br /&gt;Bueno... tomando en cuenta todos los problemas que puede llegar a dar el manejo de reportes, es viable apuntar que tanto CrystalRepots Como .Net hacen una gran pareja para el trabajo ordenado y confiable.&lt;br /&gt;&lt;br /&gt;Iniciemos&lt;br /&gt;&lt;br /&gt;1- Elaboro un reporte fuera de .NET [osea desde el mismo CR] , el cual lleva absolutamente todo lo que necesito osea que si lo ejecuto desde CR este dara los resultados deseados, el reporte puede haber sido creado partiendo de un procedimiento almacenado[SP] o directamente de un grupo de tablas o vistas.&lt;br /&gt;&lt;br /&gt;Ahora lo que necesitamos es que .Net deploye el reporte previamente elaborado.&lt;br /&gt;&lt;br /&gt;Para el ejemplo elabore un reporte el cual fue hecho a partir de un SP [procedimiento almacenado], el cual solicita tres parametros, por ende dichos parametros tengo que enviarlos desde .Net para que sean a su vez capturados por CR y los pueda procesar.&lt;br /&gt;&lt;br /&gt;parametros solicitados por el reporte&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh76QtkAXr3Dfofl6APO7PIZOsffS2a64K8DQ1Ut_S-_IPfQ52TxFQDFqrRG3EKnCI1iHDG4g3-wXoTvpVAjZ331kZLYG9Ue3Mc1srdPXYvdGZvNFyh32tW_Dbqf_ad2z8NipcrosXLcxXv/s1600/Captura1.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 296px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh76QtkAXr3Dfofl6APO7PIZOsffS2a64K8DQ1Ut_S-_IPfQ52TxFQDFqrRG3EKnCI1iHDG4g3-wXoTvpVAjZ331kZLYG9Ue3Mc1srdPXYvdGZvNFyh32tW_Dbqf_ad2z8NipcrosXLcxXv/s320/Captura1.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5496448242024698786&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;OK. OK.&lt;br /&gt;&lt;br /&gt;Ahora en VB.Net crearemos un nuevo proyecto y en el formulario de inicio [Form1] agregaremos un control CrystalReportViewer1, en la propiedad Dock le colocamos Fill&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_aiEERGNMmPZZhkTrkFlESOIdYkotC3u-2w7tzGZuwhVRwIhfcpB_EuHLYQMe283E9ckaXJoYZExef69rhSNM6RZdgsRqlR5jANNx_H953qGbvoSTpEoaLP8uqyJQh2afjXr6lkkcfmf/s1600/Captura.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 60px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_aiEERGNMmPZZhkTrkFlESOIdYkotC3u-2w7tzGZuwhVRwIhfcpB_EuHLYQMe283E9ckaXJoYZExef69rhSNM6RZdgsRqlR5jANNx_H953qGbvoSTpEoaLP8uqyJQh2afjXr6lkkcfmf/s320/Captura.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5496447911254004386&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Espacios de nombre utilizados:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Imports&lt;/span&gt; CrystalDecisions.CrystalReports.Engine&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Imports&lt;/span&gt; CrystalDecisions.Shared&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;En el evento load del Fom1 colocaremos el siguiente codigo.&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39; ---------------------------By CesarL--------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt; &#39; SETEANDO CONEXION PARA CR&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; oConexInfo &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As &lt;/span&gt;ConnectionInfo&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim &lt;/span&gt;oListaTablas &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As &lt;/span&gt; Tables&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; oTabla &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As &lt;/span&gt; Table&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; oTablaConexInfo &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As &lt;/span&gt; TableLogOnInfo&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39; instanciar objeto para guardar datos de conexión&lt;/span&gt;&lt;br /&gt;       oConexInfo = New ConnectionInfo()&lt;br /&gt;       oConexInfo.ServerName = &quot;NombreServidor&quot;&lt;br /&gt;       oConexInfo.DatabaseName = &quot;NombreBaseDatosODBC&quot;&lt;br /&gt;       oConexInfo.UserID = &quot;Usuario&quot;&lt;br /&gt;       oConexInfo.Password = &quot;Password&quot;&lt;br /&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Dim&lt;/span&gt; rpt_id &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As New &lt;/span&gt;ReportDocument&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39; Comprobamos la existencia del reporte, si el reporte no existe abortamos si no continuamos&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; Reporte  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As String&lt;/span&gt; = Application.StartupPath &amp;amp; &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;Reporte.rpt&quot;&lt;/span&gt;&lt;br /&gt;            &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  If Not&lt;/span&gt; IO.File.Exists(Reporte) &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;                  MessageBox.Show(&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;No se encontro reporte:&quot;&lt;/span&gt; &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;                   Reporte&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;, &quot;Report Not Found&quot;&lt;/span&gt;, MessageBoxButtons.OK, MessageBoxIcon.Error)&lt;br /&gt;                  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Me&lt;/span&gt;.Close()&lt;br /&gt;                &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  Exit Sub&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;                End If&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;Una vez verificado el reporte procedemos a cargarlo&lt;/span&gt;&lt;br /&gt;              rpt_id.Load(Reporte)&lt;br /&gt;              oListaTablas = rpt_id.Database.Tables&lt;br /&gt;             &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; For Each&lt;/span&gt; oTabla &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;In&lt;/span&gt; oListaTablas&lt;br /&gt;                  oTablaConexInfo = oTabla.LogOnInfo&lt;br /&gt;                  oTablaConexInfo.ConnectionInfo = oConexInfo&lt;br /&gt;                  oTabla.ApplyLogOnInfo(oTablaConexInfo)&lt;br /&gt;               &lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;   &#39;ENVIANDO VARIABLE A CR&lt;/span&gt;&lt;br /&gt;                   rpt_id.SetParameterValue(&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;@FechaInicio&quot;&lt;/span&gt;, &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;VariableFechaInicial&quot;&lt;/span&gt;)&lt;br /&gt;                  rpt_id.SetParameterValue(&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;@FechaFin&quot;&lt;/span&gt;, &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;VariableFechaFinal&quot;&lt;/span&gt;)&lt;br /&gt;                  rpt_id.SetParameterValue(&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;@Company&quot;&lt;/span&gt;,&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt; &quot;VariableCompany&quot;&lt;/span&gt;)&lt;br /&gt;                  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Me.&lt;/span&gt;CrystalReportViewer1.ReportSource = rpt_id&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Con esto el form1 cuando cargue hara lo siguiente&lt;br /&gt;&lt;br /&gt;1- Seteara las variables de conexion&lt;br /&gt;2- Comprobara la existencia del reporte&lt;br /&gt;3- Si el reporte existe este creara una instancia de tipo CR y enviara los parametros de conexion y los parametros del reporte&lt;br /&gt;4- Finalmente cargara el reporte.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Si quieres los fuentes, dudas o comentrios: cesarlopez1909@gmail.com&lt;br /&gt;&lt;img src=&quot;file:///C:/Users/CESAR%7E1.LOP/AppData/Local/Temp/moz-screenshot-2.png&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;file:///C:/Users/CESAR%7E1.LOP/AppData/Local/Temp/moz-screenshot-3.png&quot; alt=&quot;&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/2914151148497776268/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2010/07/uso-de-crystal-reports-en-vbnet-via.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/2914151148497776268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/2914151148497776268'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2010/07/uso-de-crystal-reports-en-vbnet-via.html' title='Uso de crystal reports en VB.NET [Via ODBC]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh76QtkAXr3Dfofl6APO7PIZOsffS2a64K8DQ1Ut_S-_IPfQ52TxFQDFqrRG3EKnCI1iHDG4g3-wXoTvpVAjZ331kZLYG9Ue3Mc1srdPXYvdGZvNFyh32tW_Dbqf_ad2z8NipcrosXLcxXv/s72-c/Captura1.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-4701402539297066626</id><published>2010-07-12T15:24:00.001-07:00</published><updated>2010-07-13T06:46:44.904-07:00</updated><title type='text'>Convertir .doc a .pdf</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Convertir .doc a .pdf&lt;br /&gt;&lt;br /&gt;Muchas veces nos hemos visto en la necesidad de realizar una conversion de documentos entre estos dos tipos de formatos, existen muchas herramientas en la red que hacen dicho proceso, sin enbargo como programadores nos vemos en la necesidad muchas veces de manipular dicha conversion por tal motivo se inicia este pequeño tutorial.&lt;br /&gt;&lt;br /&gt;Comenzemos...&lt;br /&gt;&lt;br /&gt;Usaremos VB .Net 2008&lt;br /&gt;Office 2010 [Version actualmente en mi PC]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Primero crearemos un nuevo proyecto.&lt;br /&gt;&lt;br /&gt;En el formulario de inicio [Form1] agregaremos los siguientes controles&lt;br /&gt;1- Caja de texto [TxtSource]&lt;br /&gt;2- Boton Examinar [BtnExaminar]&lt;br /&gt;3- Boton Convertir a PDF [BtnConvertir]&lt;br /&gt;4- Un label [Label1]&lt;br /&gt;&lt;br /&gt;El formulario se vera asi:&lt;br /&gt;&lt;/span&gt;&lt;img src=&quot;file:///C:/Users/CESAR%7E1.LOP/AppData/Local/Temp/moz-screenshot-1.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;&lt;img src=&quot;file:///C:/Users/CESAR%7E1.LOP/AppData/Local/Temp/moz-screenshot.png&quot; alt=&quot;&quot; /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFggIG0HT-M47Cwd20xnH78oVNXPON5WUzbqYQHR95oofJMsJ6OefXcUzOJ2q2YR1lap3JY7iSxIWJ2FcISpOscDJpXYMVezYW6xfNCwzME5rfXSlaFZr7ULoPTVCvaxfKfFpJGW1ORaPs/s1600/Captura.JPG&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjBy8eZsA_IAESf-5JcJ9qwKipisCMFpCh3gR2ab9Hrc5jfnw7NTnjckRA1Z6xkUluDpmu1JceYpJ1bo9zzuaPtq7_XRQCq_ZlPwtuP9iwDyQ-ixjc3FbLd5NIHUW6VLNOGRtIM3N96TUt/s1600/Captura.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 77px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjBy8eZsA_IAESf-5JcJ9qwKipisCMFpCh3gR2ab9Hrc5jfnw7NTnjckRA1Z6xkUluDpmu1JceYpJ1bo9zzuaPtq7_XRQCq_ZlPwtuP9iwDyQ-ixjc3FbLd5NIHUW6VLNOGRtIM3N96TUt/s320/Captura.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5493151582850260050&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;A nuestro proyecto debemos agregar la referencia correspondiente a Word&lt;br /&gt;para mi caso es &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;Microsoft Word 14.0 Object Library&lt;/span&gt;&lt;br /&gt;Si tienes otra version de offices debes agregar la libreria correspondiente a tu version.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiinb5ExVP-9iK-_PoezrCZCRhPBkwTk3wFB0uqQ-EDK9xINC0RsDeFw5dy1ntT_0uXn-VzrI9nTuOI0T9RBq9BRQh5dQ1NB53FVduolJ5RNqU_Fkh-TeBljJVVwY06GmNiltRQkcknqxeH/s1600/Captura.JPG&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 220px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiinb5ExVP-9iK-_PoezrCZCRhPBkwTk3wFB0uqQ-EDK9xINC0RsDeFw5dy1ntT_0uXn-VzrI9nTuOI0T9RBq9BRQh5dQ1NB53FVduolJ5RNqU_Fkh-TeBljJVVwY06GmNiltRQkcknqxeH/s320/Captura.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5493385420639356850&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Vamos al codigo...&lt;br /&gt;&lt;br /&gt;En el evento click del boton examinar haremos lo siguiente, esto lo que hace es habrir un dialogo el cual nos permitira seleccionar un documento de Word y almacenara la ruta en el TxtSource&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;Seleccionar  Tipo de Fichero&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; TipoFichero &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As String&lt;/span&gt;&lt;br /&gt;   TipoFichero = &quot;&quot;&lt;br /&gt;   TipoFichero = &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;Fichero MSWord |*.doc;*.docx&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;    Try&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim &lt;/span&gt;oFD &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As New &lt;/span&gt;OpenFileDialog&lt;br /&gt;       &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;With&lt;/span&gt; oFD&lt;br /&gt;           .Filter = TipoFichero&lt;br /&gt;           .FileName = TxtSource.Text&lt;br /&gt;           &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;If&lt;/span&gt; .ShowDialog = DialogResult.OK &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;               TxtSource.Text = .FileName&lt;br /&gt;           &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;End If&lt;/span&gt;&lt;br /&gt;       &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;End With&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Catch&lt;/span&gt; oexcep &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As&lt;/span&gt; Exception&lt;br /&gt;       MessageBox.Show(&lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;Error: //Abriendo Documento// &quot;&lt;/span&gt; &amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;                       &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;Use una ubicación diferente&quot; &lt;/span&gt;&amp;amp; vbCrLf &amp;amp; _&lt;br /&gt;                       ControlChars.CrLf &amp;amp; _&lt;br /&gt;                       oexcep.Message &amp;amp; ControlChars.CrLf)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;        End Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Luego en el evento click del boton ConvertirArchivo!!!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;       &#39;----Pasando documento de Word a PDF ---------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;        &#39;----By CesarL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  Dim&lt;/span&gt; wordApplication &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As&lt;/span&gt; ApplicationClass = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;New&lt;/span&gt; ApplicationClass()&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; wordDocument &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As&lt;/span&gt; Document = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Nothing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Dim&lt;/span&gt; paramSourceDocPath &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As String&lt;/span&gt; = TxtSource.Text&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim &lt;/span&gt;paramExportFilePath As String = &lt;span style=&quot;color: rgb(204, 0, 0);&quot;&gt;&quot;C:\Test.pdf&quot;&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  Dim&lt;/span&gt; paramExportFormat As WdExportFormat = _&lt;br /&gt;        WdExportFormat.wdExportFormatPDF&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; paramOpenAfterExport &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Boolean&lt;/span&gt; = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;False&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; paramExportOptimizeFor As WdExportOptimizeFor = _&lt;br /&gt;        WdExportOptimizeFor.wdExportOptimizeForPrint&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Dim&lt;/span&gt; paramExportRange As WdExportRange = _&lt;br /&gt;        WdExportRange.wdExportAllDocument&lt;br /&gt;  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  Dim&lt;/span&gt; paramStartPage As Int32 = 0&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim &lt;/span&gt;paramEndPage As Int32 = 0&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; paramExportItem As WdExportItem = _&lt;br /&gt;        WdExportItem.wdExportDocumentContent&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Dim&lt;/span&gt; paramIncludeDocProps &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Boolean &lt;/span&gt;= &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;True&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Dim&lt;/span&gt; paramKeepIRM&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt; As Boolean&lt;/span&gt; = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;True&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  Dim &lt;/span&gt;paramCreateBookmarks As WdExportCreateBookmarks = _&lt;br /&gt;        WdExportCreateBookmarks.wdExportCreateWordBookmarks&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; paramDocStructureTags &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Boolean&lt;/span&gt; = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;True&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim &lt;/span&gt;paramBitmapMissingFonts &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Boolean&lt;/span&gt; = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;True&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; paramUseISO19005_1 &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Boolean&lt;/span&gt; = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Try&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;Abrir documento basados en el que selecciono&lt;/span&gt;&lt;br /&gt;        wordDocument = wordApplication.Documents.Open(paramSourceDocPath)&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39; Exportar al formato deseado&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;            &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;If&lt;/span&gt; Not wordDocument &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Is Nothing Then&lt;/span&gt;&lt;br /&gt;            wordDocument.ExportAsFixedFormat(paramExportFilePath, _&lt;br /&gt;                paramExportFormat, paramOpenAfterExport, _&lt;br /&gt;                paramExportOptimizeFor, paramExportRange, paramStartPage, _&lt;br /&gt;                paramEndPage, paramExportItem, paramIncludeDocProps, _&lt;br /&gt;                paramKeepIRM, paramCreateBookmarks, _&lt;br /&gt;                paramDocStructureTags, paramBitmapMissingFonts, _&lt;br /&gt;                paramUseISO19005_1)&lt;br /&gt;     &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;   End If&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Catch&lt;/span&gt; ex &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Exception&lt;/span&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;Aqui una exepcion no controlada&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;    &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;    Finally&lt;/span&gt;&lt;br /&gt;      &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;cerrar documento&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;            &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;If Not &lt;/span&gt;wordDocument &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Is Nothing Then&lt;/span&gt;&lt;br /&gt;            wordDocument.Close(&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;False&lt;/span&gt;)&lt;br /&gt;            wordDocument = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Nothing&lt;/span&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;  End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&#39;Quit a la aplicacion WinWord&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;         &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;   If&lt;/span&gt; Not wordApplication&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; Is Nothing Then&lt;/span&gt;&lt;br /&gt;            wordApplication.Quit()&lt;br /&gt;            wordApplication = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        GC.Collect()&lt;br /&gt;        GC.WaitForPendingFinalizers()&lt;br /&gt;        GC.Collect()&lt;br /&gt;        GC.WaitForPendingFinalizers()&lt;br /&gt;   &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt; End Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt; &#39; Fin de proceso -----------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ahora solo ejecutamos nuestro proyecto, seleccionamos el archivo .doc ó .docx y presionamos el boton ConvertirArchivo!!! y se convertira el documento seleccionado y se almacenara en &quot;C:\Test.pdf&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/4701402539297066626/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2010/07/convertir-doc-pdf.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/4701402539297066626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/4701402539297066626'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2010/07/convertir-doc-pdf.html' title='Convertir .doc a .pdf'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjBy8eZsA_IAESf-5JcJ9qwKipisCMFpCh3gR2ab9Hrc5jfnw7NTnjckRA1Z6xkUluDpmu1JceYpJ1bo9zzuaPtq7_XRQCq_ZlPwtuP9iwDyQ-ixjc3FbLd5NIHUW6VLNOGRtIM3N96TUt/s72-c/Captura.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-7555090540628460128</id><published>2010-06-02T15:33:00.000-07:00</published><updated>2010-06-02T15:42:33.567-07:00</updated><title type='text'>Embedir Imagen en e-mail [VB.Net]</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Embedir Imagen en e-mail [VB.Net]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Buenoooooo, en esta ocacion mostrare como embedir un archivo de imagen en un correo electronico, no es simplemente atachar en el correo, si no que desplegar dicha imagen en el cuerpo del correo, como que se tratase de una edicion de OutLook.&lt;br /&gt;&lt;br /&gt;Comencemos....&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39; Espacio de nombres a importar&lt;/span&gt;&lt;br /&gt;Imports System.Net.Mail&lt;br /&gt;&lt;br /&gt;Private Sub EnviandoMailAt()&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;Funcion de envio de correo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dim SMTP As New System.Net.Mail.SmtpClient &#39;Variable con la que se envia el correo&lt;br /&gt;Dim CORREO As New System.Net.Mail.MailMessage&lt;br /&gt;CORREO.From = New System.Net.Mail.MailAddress(Desdemail, &quot;Correo Electronico&quot;, System.Text.Encoding.UTF8)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(&quot;Cuerpo del correo&quot;, Nothing, &quot;text/html&quot;)&lt;br /&gt;&#39;Path de la imagen&lt;br /&gt;Dim logo As New LinkedResource(&quot;IMG\LOGOLSAL.png&quot;)&lt;br /&gt;logo.ContentId = &quot;companylogo&quot;&lt;br /&gt;&#39;Adicionando logo&lt;br /&gt;htmlView.LinkedResources.Add(logo)&lt;br /&gt;     &lt;br /&gt;           CORREO.To.Add(&quot;cliente@mail.com&quot;)&lt;br /&gt;            &#39;Adicionando copia oculta&lt;br /&gt;           CORREO.Bcc.Add(&quot;cliente@mail.com&quot;)&lt;br /&gt;  &lt;br /&gt;       CORREO.IsBodyHtml = True&lt;br /&gt;       CORREO.AlternateViews.Add(htmlView)&lt;br /&gt;&lt;br /&gt;       CORREO.Subject = &quot;Confirmación de recarga  - AutoMailer -&quot;&lt;br /&gt;       SMTP.Host = &quot;ServidorSMTP&quot;&lt;br /&gt;       SMTP.Port = &quot;Puerto&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       Try&lt;br /&gt;           SMTP.Credentials = New System.Net.NetworkCredential(&quot;UsuarioSMTP&quot;, &quot;PassSMTP&quot;)&lt;br /&gt;           SMTP.Send(CORREO)&lt;br /&gt;&lt;br /&gt;       Catch ex As System.Net.Mail.SmtpException&lt;br /&gt;           MessageBox.Show(&quot;Fallo el envio: &quot; &amp;amp; ex.Message)&lt;br /&gt;       End Try</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/7555090540628460128/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/embedir-imagen-en-e-mail-vbnet.html#comment-form' title='4 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/7555090540628460128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/7555090540628460128'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/embedir-imagen-en-e-mail-vbnet.html' title='Embedir Imagen en e-mail [VB.Net]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-5802442751748978446</id><published>2010-06-02T15:06:00.000-07:00</published><updated>2010-06-02T15:32:02.687-07:00</updated><title type='text'>Obtener Fecha y Hora de un servidor MSSQL 2005</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Obtener Fecha y Hora de un servidor MSSQL 2005&lt;/span&gt;&lt;br /&gt;Muchas veces nos vemos en la obligacion de obtener la fecha de nuestro servidor, esto para efectos de auditoria de las transacciones realizadas por los usuarios.&lt;br /&gt;&lt;br /&gt;Para eso aca pongo un ejemplo de como obtener dicho dato, ojala le sirva a alguien...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39; Espacio de nombres a importar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Imports System.Data.SqlClient&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39; Funcion para realizar consulta&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function SetFechaHoraServer()&lt;br /&gt;     SetFechaHoraServer = &quot;&quot;&lt;br /&gt;     Try&lt;br /&gt;&lt;br /&gt;Dim CmdSsql As New SqlCommand(&quot;SELECT YEAR(NOW()) AS AÑO, MONTH(NOW()) AS MES, DAY(NOW()) AS DIA, &quot; &amp;amp; _&lt;br /&gt;&quot;HOUR(NOW(&#39;h&#39;)) AS HORA, MINUTE(NOW()) AS MINUTO, SECOND(NOW()) AS SEGUNDO&quot;, MyConex)&lt;br /&gt;         Dim Rd As SqlDataReader&lt;br /&gt;         MyConex.Open()&lt;br /&gt;         Rd = CmdSsql.ExecuteReader&lt;br /&gt;         Rd.Read()&lt;br /&gt;&lt;br /&gt;         If Rd.HasRows = False Then&lt;br /&gt;             MsgBox(&quot;No hay datos para formar hora actual del servidor&quot;)&lt;br /&gt;             MyConex.Close()&lt;br /&gt;             Exit Function&lt;br /&gt;         End If&lt;br /&gt;&lt;br /&gt;FechaHoraServer = Rd(0) &amp;amp; &quot;-&quot; &amp;amp; Rd(1) &amp;amp; &quot;-&quot; &amp;amp; Rd(2) &amp;amp; &quot; &quot; &amp;amp; Rd(3) &amp;amp; &quot;:&quot; &amp;amp; Rd(4) &amp;amp; &quot;:&quot; &amp;amp; Rd(5)&lt;br /&gt;&lt;br /&gt;         MyConex.Close()&lt;br /&gt;&lt;br /&gt;Catch oexcep As SqlException&lt;br /&gt;MessageBox.Show(&quot;Error al conectar con BD o actualizar, Proceso: Consultando fecha del servidor&quot; &amp;amp; _&lt;br /&gt;ControlChars.CrLf &amp;amp; _&lt;br /&gt;oexcep.Message &amp;amp; ControlChars.CrLf)&lt;br /&gt;MyConex.Close()&lt;br /&gt;End Try&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Finalmente obtenemos la fecha en el formato deseado, segun el ejemplo el formato que obtendremos seria: &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;2010-06-02 04:10:35&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Dudas o comentarios a: cesarlopez1909@gmial.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/5802442751748978446/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/obtener-fecha-y-hora-de-un-servidor.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5802442751748978446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5802442751748978446'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/obtener-fecha-y-hora-de-un-servidor.html' title='Obtener Fecha y Hora de un servidor MSSQL 2005'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-3156975747457653786</id><published>2010-06-02T14:21:00.000-07:00</published><updated>2010-06-02T14:59:50.205-07:00</updated><title type='text'>Aplicar MD5 a String [VB.Net]</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8d8acvy9VDsTJqFmrBBpCP3kI70tZENtexVI3-Cb6_FiBqtKz_jmcdalJc2MxTEZsvkDJJ4NkTRrgclZqbOIOGWpmk5_WDxbkeVviReAo4zQHBRJVGSFhxsOyxs5M-BPjq-L3rp_2q9PB/s1600/Sin+t%C3%ADtulo.png&quot;&gt;&lt;br /&gt;&lt;/a&gt;El Proceso consta de obtener una cadena encriptada, partiendo de una cadena normal, este tipo de funciones son utiles normalmente para encriptar password´s en nuestros sistemas, pues con esto agregamos un poco mas de seguridad a los mismos.&lt;br /&gt;&lt;br /&gt;espero a alguien le sirva....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39; Hacer la llamada a la funcion y enviar el parametro solicitado&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Call MD5EncryptPass(TxtPassword.Text)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39; Espacio de nombres a importar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Imports System.Security.Cryptography&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;Funcion de encriptado&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Private Sub MD5EncryptPass(ByVal StrPass As String)&lt;br /&gt;      PasConMd5 = &quot;&quot;&lt;br /&gt;      Dim md5 As New MD5CryptoServiceProvider&lt;br /&gt;      Dim bytValue() As Byte&lt;br /&gt;      Dim bytHash() As Byte&lt;br /&gt;      Dim i As Integer&lt;br /&gt;&lt;br /&gt;        bytValue = System.Text.Encoding.UTF8.GetBytes(StrPass)&lt;br /&gt;&lt;br /&gt;      bytHash = md5.ComputeHash(bytValue)&lt;br /&gt;      md5.Clear()&lt;br /&gt;&lt;br /&gt;      For i = 0 To bytHash.Length - 1&lt;br /&gt;             PasConMd5 &amp;amp;= bytHash(i).ToString(&quot;x&quot;).PadLeft(2, &quot;0&quot;)&lt;br /&gt;      Next&lt;br /&gt;&lt;br /&gt;      MsgBox(PasConMd5)&lt;br /&gt;&lt;br /&gt;  End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;El resultado&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8d8acvy9VDsTJqFmrBBpCP3kI70tZENtexVI3-Cb6_FiBqtKz_jmcdalJc2MxTEZsvkDJJ4NkTRrgclZqbOIOGWpmk5_WDxbkeVviReAo4zQHBRJVGSFhxsOyxs5M-BPjq-L3rp_2q9PB/s1600/Sin+t%C3%ADtulo.png&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 268px; height: 155px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8d8acvy9VDsTJqFmrBBpCP3kI70tZENtexVI3-Cb6_FiBqtKz_jmcdalJc2MxTEZsvkDJJ4NkTRrgclZqbOIOGWpmk5_WDxbkeVviReAo4zQHBRJVGSFhxsOyxs5M-BPjq-L3rp_2q9PB/s320/Sin+t%C3%ADtulo.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5478299013372275538&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Dudas o consultas a: cesarlopez1909@gmail.com</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/3156975747457653786/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/aplicar-md5-string-vbnet.html#comment-form' title='7 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/3156975747457653786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/3156975747457653786'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/aplicar-md5-string-vbnet.html' title='Aplicar MD5 a String [VB.Net]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8d8acvy9VDsTJqFmrBBpCP3kI70tZENtexVI3-Cb6_FiBqtKz_jmcdalJc2MxTEZsvkDJJ4NkTRrgclZqbOIOGWpmk5_WDxbkeVviReAo4zQHBRJVGSFhxsOyxs5M-BPjq-L3rp_2q9PB/s72-c/Sin+t%C3%ADtulo.png" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-700294748591994792</id><published>2010-06-02T06:36:00.000-07:00</published><updated>2010-06-02T07:04:13.547-07:00</updated><title type='text'>ComboBox Dependientes [VB.Net]</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWhgB7_nX4tOcpsvhD3_tgcx8q8N7aRb_L8egCXp9hgVlmHnRhDxxNADrIjIF4GzMfLcQa4FD_E0rzvQpplXutSjqksu_tPzcaiE4TsCfjmxXjhR0FUTeqj1-ijfkYMm-v7Bjw29W32Tdb/s1600/Sin+t%C3%ADtulo.png&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Añadir un dataset a un ComboBox [VB.Net]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Para el ejemplo se usaran datos extraidos desde una BD MySQL&lt;br /&gt;La tematica del ejemplo es simple, siempre con la misma filosofia añadir dataset a un combo luego realizar indexacion para realizar una neva busqueda y alimentar un nuevo dataset el cual sera asignado a su vez a otro combo.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;espacios de nombres a importar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Imports MySql.Data.MySqlClient&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Declaraciones&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Public AdapterCats As MySqlDataAdapter&lt;br /&gt;Public AdapterSubCats As MySqlDataAdapter&lt;br /&gt;Public CDatasetCats As DataSet&lt;br /&gt;Public CDatasetSubCats As DataSet&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39; Primero en el evento load del formulario hacemos el llenado del Combo categorias&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;&lt;br /&gt;Try&lt;br /&gt;&lt;br /&gt;AdapterCats = New MySqlDataAdapter(&quot;SELECT CATEGORIA, NOMBRE FROM.CATEGORIA&quot;, MyConex)&lt;br /&gt;&lt;br /&gt;        CDatasetCats = New DataSet()&lt;br /&gt;        MyConex.Open()&lt;br /&gt;        AdapterCats.Fill(CDatasetCats, &quot;CATS&quot;)&lt;br /&gt;        MyConex.Close()&lt;br /&gt;&lt;br /&gt;CmbCategoria.DataSource = CDatasetCats.Tables(&quot;CATS&quot;)&lt;br /&gt;CmbCategoria.DisplayMember = CDatasetCats.Tables(&quot;CATS&quot;).Columns(&quot;NOMBRE&quot;).ToString&lt;br /&gt;CmbCategoria.ValueMember = CDatasetCats.Tables(&quot;CATS&quot;).Columns(&quot;CATEGORIA&quot;).ToString&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Catch oexcep As MySqlException&lt;br /&gt;MessageBox.Show(&quot;Error al conectar con BD o actualizar, Proceso: Consultando datos &quot; &amp;amp; _&lt;br /&gt;                                ControlChars.CrLf &amp;amp; _&lt;br /&gt;                                oexcep.Message &amp;amp; ControlChars.CrLf)&lt;br /&gt;        MyConex.Close()&lt;br /&gt;    End Try&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;file:///C:/Users/CESAR%7E1.LOP/AppData/Local/Temp/moz-screenshot-2.png&quot; alt=&quot;&quot; /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKz1Xlpj_LDnomz9c0aIC5lE1SpZDYndiAAedyJws_jfTS5ax3nOTvPuua9ZT2JES-lbpxP13lb3zi2ufXYRS4L0QkZOhyphenhyphenIuHZRLD8-tE8AL7LoDhKIpStYc5qDkztDinjlk8oesAt2RPX/s1600/Sin+t%C3%ADtulo.png&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 51px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKz1Xlpj_LDnomz9c0aIC5lE1SpZDYndiAAedyJws_jfTS5ax3nOTvPuua9ZT2JES-lbpxP13lb3zi2ufXYRS4L0QkZOhyphenhyphenIuHZRLD8-tE8AL7LoDhKIpStYc5qDkztDinjlk8oesAt2RPX/s320/Sin+t%C3%ADtulo.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5478173639505019778&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Luego en el evento de cambio de indice del combo hacemos el llenado del la subcategorias, recordemos que una categoria puede tener &#39;n&#39; subcategorias&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub CmbCategoria_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbCategoria.SelectedIndexChanged&lt;br /&gt;     Dim CatBuscar As String&lt;br /&gt;CatBuscar = CDatasetCats.Tables(&quot;CATS&quot;).Rows(CmbCategoria.SelectedIndex)(&quot;CATEGORIA&quot;)&lt;br /&gt;     Try&lt;br /&gt;&lt;br /&gt;AdapterSubCats = New MySqlDataAdapter(&quot;SELECT SUBCAT, NOMBRE FROM &quot; &amp;amp; BaseDatos &amp;amp; &quot;.SUBCATEGORIA WHERE CATEGORIA = &#39;&quot; &amp;amp; CatBuscar &amp;amp; &quot;&#39;&quot;, MyConex)&lt;br /&gt;&lt;br /&gt;         CDatasetSubCats = New DataSet()&lt;br /&gt;         MyConex.Open()&lt;br /&gt;         AdapterSubCats.Fill(CDatasetSubCats, &quot;SUBCATS&quot;)&lt;br /&gt;         MyConex.Close()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CmbSubcategoria.DataSource = CDatasetSubCats.Tables(&quot;SUBCATS&quot;)&lt;br /&gt;CmbSubcategoria.DisplayMember = CDatasetSubCats.Tables(&quot;SUBCATS&quot;).Columns(&quot;NOMBRE&quot;).ToString&lt;br /&gt;CmbSubcategoria.ValueMember = CDatasetSubCats.Tables(&quot;SUBCATS&quot;).Columns(&quot;SUBCAT&quot;).ToString&lt;br /&gt;&lt;br /&gt;Catch oexcep As MySqlException&lt;br /&gt;MessageBox.Show(&quot;Error al conectar con BD o actualizar, Proceso: Consultando datos &quot; &amp;amp; _&lt;br /&gt;                                 ControlChars.CrLf &amp;amp; _&lt;br /&gt;                                 oexcep.Message &amp;amp; ControlChars.CrLf)&lt;br /&gt;         MyConex.Close()&lt;br /&gt;     End Try&lt;br /&gt; End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWhgB7_nX4tOcpsvhD3_tgcx8q8N7aRb_L8egCXp9hgVlmHnRhDxxNADrIjIF4GzMfLcQa4FD_E0rzvQpplXutSjqksu_tPzcaiE4TsCfjmxXjhR0FUTeqj1-ijfkYMm-v7Bjw29W32Tdb/s1600/Sin+t%C3%ADtulo.png&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 461px; height: 106px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWhgB7_nX4tOcpsvhD3_tgcx8q8N7aRb_L8egCXp9hgVlmHnRhDxxNADrIjIF4GzMfLcQa4FD_E0rzvQpplXutSjqksu_tPzcaiE4TsCfjmxXjhR0FUTeqj1-ijfkYMm-v7Bjw29W32Tdb/s320/Sin+t%C3%ADtulo.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5478174725854824002&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Esto ha sido todooooooo... dudas o comentarios a cesarlopez1909@gmail.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;file:///C:/Users/CESAR%7E1.LOP/AppData/Local/Temp/moz-screenshot-1.png&quot; alt=&quot;&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/700294748591994792/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/combobox-dependientes-vbnet.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/700294748591994792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/700294748591994792'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2010/06/combobox-dependientes-vbnet.html' title='ComboBox Dependientes [VB.Net]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKz1Xlpj_LDnomz9c0aIC5lE1SpZDYndiAAedyJws_jfTS5ax3nOTvPuua9ZT2JES-lbpxP13lb3zi2ufXYRS4L0QkZOhyphenhyphenIuHZRLD8-tE8AL7LoDhKIpStYc5qDkztDinjlk8oesAt2RPX/s72-c/Sin+t%C3%ADtulo.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-2498523508332682804</id><published>2009-06-17T13:36:00.000-07:00</published><updated>2009-06-17T13:57:07.398-07:00</updated><title type='text'>Abrir una imagen con PAINT desde VB.Net</title><content type='html'>En esta ocacion aprenderemos a cargar imagenes con una aplicacion externa a la nuestra, la idea es hacer como una galeria de imagenes (thumbails) y abrirlas con un editor de imagenes, para el siguiente ejemplo solo se tomara una imajen como ejemplo.&lt;br /&gt;&lt;br /&gt;Bueno Iniciemos&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;primero creamos un nuevo proyecto y le adicionamos un Boton y un PictureBox a este ultimo le agregaremos un recurso de una vista previa de  la imagen que queremos mostrar, esto en la propiedad imagen del elemento&lt;br /&gt;&lt;br /&gt;el formulario nos quedara algo como esto:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0L9NpR2LaZPuO6PEVd2Y5u_uRwoPH6FRcDrejs6-q-XM1hnKkZSO_ADfvLe0rqgRwohqwc0q_mmQqIyMFQHdtTbWBEz72QooVkIDLOwEN1fWY4vVGpzxm-ptVptzQpUHW6cug3SaGuzUZ/s1600-h/imagen1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 296px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0L9NpR2LaZPuO6PEVd2Y5u_uRwoPH6FRcDrejs6-q-XM1hnKkZSO_ADfvLe0rqgRwohqwc0q_mmQqIyMFQHdtTbWBEz72QooVkIDLOwEN1fWY4vVGpzxm-ptVptzQpUHW6cug3SaGuzUZ/s320/imagen1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5348400339638448946&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;En el Load del formulario escribimos lo sigueinte&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; bmp &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As&lt;/span&gt; Bitmap&lt;br /&gt;     bmp = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Me&lt;/span&gt;.PictureBox1.Image&lt;br /&gt;     bmp.Save(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;C:\imagen.jpg&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------&lt;br /&gt;En el evento click del boton1&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;Process.Start(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;C:\WINDOWS\system32\mspaint.exe&quot;, &quot;C:\imagen.jpg&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Si queremos usar una aplicacion distinta solo cambiamos el path del el Process.Start&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;al precionar el boton nos dara este resultado&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyPZ5bXCjQlXjua1_3q0CpxWbTteyuORLtvwARo4FJwW5YgT-l_2iLfU8DA38XVwJWOx2iCXkWVhJ41VKjwmoI-UtTZEe23dJh0EGCsEPcHKeqIL5GVHRpV4TL5pyaqPtTGdamaVzs59yp/s1600-h/imagen2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 186px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyPZ5bXCjQlXjua1_3q0CpxWbTteyuORLtvwARo4FJwW5YgT-l_2iLfU8DA38XVwJWOx2iCXkWVhJ41VKjwmoI-UtTZEe23dJh0EGCsEPcHKeqIL5GVHRpV4TL5pyaqPtTGdamaVzs59yp/s320/imagen2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5348402983171467394&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Saludos!!!</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/2498523508332682804/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2009/06/abrir-una-imagen-con-paint-desde-vbnet.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/2498523508332682804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/2498523508332682804'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2009/06/abrir-una-imagen-con-paint-desde-vbnet.html' title='Abrir una imagen con PAINT desde VB.Net'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0L9NpR2LaZPuO6PEVd2Y5u_uRwoPH6FRcDrejs6-q-XM1hnKkZSO_ADfvLe0rqgRwohqwc0q_mmQqIyMFQHdtTbWBEz72QooVkIDLOwEN1fWY4vVGpzxm-ptVptzQpUHW6cug3SaGuzUZ/s72-c/imagen1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-6659878043371191650</id><published>2009-06-17T12:54:00.000-07:00</published><updated>2009-06-17T13:08:20.981-07:00</updated><title type='text'>Ejecutar cmd desde Visual Basic.Net</title><content type='html'>Muchas veces nos hemos encontrado que para nuestras aplicaciones es necesario ejecutar x comando en Ms-Dos o su ambiente CMD, pues con la clase Process podemos hacerlo.&lt;br /&gt;&lt;br /&gt;La clase Process y su sintaxis basica es asi:&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;codigo&quot;&gt;Process.Start(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;notepad.exe&quot;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Tambien podemos pasar parametros asi:&lt;br /&gt;&lt;br /&gt;Process.Start(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;notepad.exe&quot;, &quot;C:\miarchivo.txt&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Recordando que notepad.exe se encuentra en la ruta c:\Windows\ , por tanto no hay por que agregar ningun path para iniciar el proceso, de la misma forma si una aplicacion se encuentra, en el folder de nuestra aplicacion tambien podemos ejecutarla de la misma forma, pero si queremos ejecutar una aplicacion ajena tanto a windows como a nuestra aplicacion debemos especificar la ruta del *.exe&lt;br /&gt;&lt;br /&gt;Process.Start(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;C:\....&quot;&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;Ejecutando proceso (CMD.EXE) y corriendo una sentencia de linea  de comandos&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Dim&lt;/span&gt; Pross &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As&lt;/span&gt; Process = &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;New&lt;/span&gt; Process&lt;br /&gt;Console.WriteLine(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Iniciando el proceso&quot;&lt;/span&gt;)&lt;br /&gt;Console.Readline()&lt;br /&gt;               Pross .StartInfo.FileName = &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;cmd.exe&quot;&lt;/span&gt;&lt;br /&gt;               Pross .StartInfo.Arguments = &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;/C  instruccón /y&quot;&lt;/span&gt;&lt;br /&gt;               Pross .StartInfo.WindowStyle = ProcessWindowStyle.Hidden&lt;br /&gt;               Pross.StartInfo.CreateNoWindow = True&lt;br /&gt;               Pross .Start()&lt;br /&gt;&lt;br /&gt;Console.WriteLine(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Fin del Proceso&quot;&lt;/span&gt;)&lt;br /&gt;Console.Readline()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Saludos</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/6659878043371191650/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2009/06/ejecutar-cmd-desde-visual-basicnet.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/6659878043371191650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/6659878043371191650'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2009/06/ejecutar-cmd-desde-visual-basicnet.html' title='Ejecutar cmd desde Visual Basic.Net'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-5317258181912892823</id><published>2009-05-29T15:15:00.000-07:00</published><updated>2009-05-29T15:29:18.372-07:00</updated><title type='text'>Comparar dos Cadenas (String) en vb.net</title><content type='html'>Haciendo una aplicacion, la cual deberia tener un login de usuarios (como todo software), me vi en la necesidad de compara dos passwords para poder insertarlos en la base de datos, despues de un rato encontre la solución aca la pongo por si hay alguien esta con el mismo problema&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tipos Posibles de comparacion&lt;br /&gt;&lt;br /&gt;&lt;a id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl01&quot; onclick=&quot;javascript:Track(&#39;ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl01&#39;,this);&quot; href=&quot;http://msdn.microsoft.com/es-es/library/system.string.compare%28VS.80%29.aspx&quot;&gt;String.Compare :&lt;/a&gt;&lt;br /&gt;Compara los valores de dos cadenas. Devuelve un valor entero.&lt;br /&gt;&lt;br /&gt;&lt;a id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl02&quot; onclick=&quot;javascript:Track(&#39;ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl02&#39;,this);&quot; href=&quot;http://msdn.microsoft.com/es-es/library/system.string.compareordinal%28VS.80%29.aspx&quot;&gt;String.CompareOrdinal&lt;/a&gt;&lt;br /&gt;Compara dos cadenas independientemente de la referencia cultural local. Devuelve un valor entero.&lt;br /&gt;&lt;br /&gt;&lt;a id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl03&quot; onclick=&quot;javascript:Track(&#39;ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl03&#39;,this);&quot; href=&quot;http://msdn.microsoft.com/es-es/library/system.string.compareto%28VS.80%29.aspx&quot;&gt;String.CompareTo&lt;/a&gt;&lt;br /&gt;Compara el objeto de cadena actual con otra cadena. Devuelve un valor entero.&lt;br /&gt;&lt;br /&gt;&lt;a id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl04&quot; onclick=&quot;javascript:Track(&#39;ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl04&#39;,this);&quot; href=&quot;http://msdn.microsoft.com/es-es/library/system.string.startswith%28VS.80%29.aspx&quot;&gt;String.StartsWith&lt;/a&gt;&lt;br /&gt;Determina si una cadena comienza con la cadena que se pasa. Devuelve un valor booleano.&lt;br /&gt;&lt;br /&gt;&lt;a id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl05&quot; onclick=&quot;javascript:Track(&#39;ctl00_MTContentSelector1_mainContentContainer_ctl00|ctl00_MTContentSelector1_mainContentContainer_ctl05&#39;,this);&quot; href=&quot;http://msdn.microsoft.com/es-es/library/system.string.endswith%28VS.80%29.aspx&quot;&gt;String.EndsWith&lt;/a&gt;&lt;br /&gt;Determina si una cadena termina con la cadena que se pasa. Devuelve un valor booleano.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://msdn.microsoft.com/es-es/library/fbh501kz%28VS.80%29.aspx&quot;&gt;Fuente&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sintaxis en Vb.Net&lt;br /&gt;&lt;br /&gt;&#39; CAPTURAMOS LAS VARIABLES&lt;br /&gt;&lt;br /&gt;      Pass1 = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Me&lt;/span&gt;.TxtPass1.Text&lt;br /&gt;      Pass2 = &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Me&lt;/span&gt;.TxtPass2.Text&lt;br /&gt;  &lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Dim&lt;/span&gt; Compare &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;As Integer&lt;/span&gt;&lt;br /&gt;      Compare = Pass1.CompareTo(Pass2)&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;If&lt;/span&gt; Compare = 1 &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;          MessageBox.Show(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Password No Coinciden Verifiquelos e Intentelo de uevo&quot; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;, &amp;amp; _&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Error&quot;&lt;/span&gt;, MessageBoxButtons.OK, MessageBoxIcon.Error)&lt;br /&gt;          &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Exit Sub&lt;/span&gt;&lt;br /&gt;                &lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;        End If&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/5317258181912892823/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2009/05/como-conectar-vbnet-2005-mysql_29.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5317258181912892823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5317258181912892823'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2009/05/como-conectar-vbnet-2005-mysql_29.html' title='Comparar dos Cadenas (String) en vb.net'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4858096891034168678.post-5930508756357143592</id><published>2009-05-28T06:57:00.000-07:00</published><updated>2009-05-28T12:08:53.069-07:00</updated><title type='text'>Como Conectar Vb.Net 2005 a MySql</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;Como Conectar Vb.Net a Mysql&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Bueno dejeme contarles que hace unos dias me tope con la insertidumbre de conectar vb.net con MySql, pues lo necesitaba para crear una aplicación en la cual no necesitara una BD con licencia y con la admiracion que le tengo a MySql me parecio la mejor Opcion.&lt;br /&gt;&lt;br /&gt;Bueno al mismo tiempo  se añadira a este tutorial la creacion de ODBC para Mysql&lt;br /&gt;&lt;br /&gt;Ok. comencemos&lt;br /&gt;&lt;br /&gt;Que necesitamos&lt;br /&gt;&lt;br /&gt;1- &lt;a href=&quot;http://dev.mysql.com/downloads/&quot;&gt;MySql&lt;/a&gt; 5 o superior&lt;br /&gt;2- Mysql &lt;a href=&quot;http://dev.mysql.com/downloads/connector/odbc/5.1.html&quot;&gt;Odbc/Conector&lt;/a&gt;&lt;br /&gt;3- MySql &lt;a href=&quot;http://sourceforge.net/projects/mysqldrivercs/&quot;&gt;Drivers Conector/Net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1- Relizamos la instalacion de estos tres componentes en nuestro ordenador&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2-  creamos un nuevo proyecto en nuestro VB 2005 y lo llamamos pruebas&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHW78YBdKgG5TNrTSwQTifOR_3CErKU3s9fwtdLIsdjTyqqTFLeLukYV8UWxmNiouMpB3pSXdcU24z4gf1nho94t_DgNE3gDFhRyHKiz5tLFi6Lt6al2qusnKqw9BQPYGSJ8PLRZdxP0l0/s1600-h/Crear1.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 194px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHW78YBdKgG5TNrTSwQTifOR_3CErKU3s9fwtdLIsdjTyqqTFLeLukYV8UWxmNiouMpB3pSXdcU24z4gf1nho94t_DgNE3gDFhRyHKiz5tLFi6Lt6al2qusnKqw9BQPYGSJ8PLRZdxP0l0/s320/Crear1.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5340877583307776818&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;3-  Renombramos el formulario de unicio se llamara Conectar.vb, adicionamos un boton con el nombre BtnConectar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS2-9yOVfMECUWTSr5LadQw9ipBr5gnvMLow0ug1j0cJLk8jCwuslaEik7_Kn88A3eRjoxQ00gTwUr0YhAVbJKOj_4LPWscJQxcz-qyF_cugtLAVR0IWkIH3d5Tr0v-_MEUvUl3rOOrtCA/s1600-h/cread2.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 282px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS2-9yOVfMECUWTSr5LadQw9ipBr5gnvMLow0ug1j0cJLk8jCwuslaEik7_Kn88A3eRjoxQ00gTwUr0YhAVbJKOj_4LPWscJQxcz-qyF_cugtLAVR0IWkIH3d5Tr0v-_MEUvUl3rOOrtCA/s320/cread2.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5340878537163737778&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;4-  Ahora debemos adicionar las referencias de MySql a nuestro proyecto&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsQUM6PZaexBmXfd_OjIOXsLry52C_d0_pQE0HF8cWWETFozVBExGjhSdfY5jGkdQa5mbv-Du0A5e4Z2rLbG4_EhlQaWW3GIlSRI4irZLa98OdO6uiMAI5R4gJ0vaPYh00qvVuMvLyEsfe/s1600-h/crear3.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 449px; height: 324px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsQUM6PZaexBmXfd_OjIOXsLry52C_d0_pQE0HF8cWWETFozVBExGjhSdfY5jGkdQa5mbv-Du0A5e4Z2rLbG4_EhlQaWW3GIlSRI4irZLa98OdO6uiMAI5R4gJ0vaPYh00qvVuMvLyEsfe/s320/crear3.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5340879412469556034&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;5- Importamos las tools necesarias para realizar la conexion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Imports&lt;/span&gt; MySql.Data.MySqlClient&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;6- Declaramos y creamos la cadena de conexion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Public&lt;/span&gt; myconex &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As &lt;/span&gt;MySqlConnection&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Private Sub&lt;/span&gt; Conectar_Load(&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;ByVal&lt;/span&gt; sender &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As &lt;/span&gt;System.Object, &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As &lt;/span&gt;System.EventArgs) &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Handles MyBase&lt;/span&gt;.Load&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&lt;/span&gt;       &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt; Dim&lt;/span&gt; connStr &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As&lt;/span&gt; String&lt;br /&gt;&lt;br /&gt;  connStr = &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Server=youserver;&quot; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&amp;amp; _&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                  &quot;Database=youbd;&quot; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&amp;amp; _&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                  &quot;Uid=youuser;&quot; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&amp;amp; _&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                  &quot;Pwd=youpass;&quot; &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&amp;amp; _&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                  &quot;Connect Timeout=30;&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  myconex = &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;New&lt;/span&gt; MySqlConnection(connStr)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;7- Ahora realizamos la conexion mediante BtnConectar con este codigo en el evento click&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Private Sub&lt;/span&gt; BtnConectar_Click(&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;ByVal&lt;/span&gt; sender &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As&lt;/span&gt; System.Object, &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As &lt;/span&gt;System.EventArgs) &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Handles&lt;/span&gt; BtnConectar.Click&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      myconex.Open()&lt;br /&gt;      MessageBox.Show(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Ahora estoy conectado a Mysql&quot;&lt;/span&gt;, &quot;Confirmación&quot;, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;&lt;br /&gt;      myconex.Close()&lt;br /&gt;      MessageBox.Show(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Ahora estoy desconectado de Mysql&quot;&lt;/span&gt;, &quot;Confirmación&quot;, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 204, 0);&quot;&gt;&#39; Si existe alguna excepcion al conectarse con el servidor capturamos el error y mostramos un mensage con el resultado&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;Catch&lt;/span&gt; oexcep &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;As&lt;/span&gt; MySqlException&lt;br /&gt;      MessageBox.Show(&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&quot;Error al conectar con BD&quot;&lt;/span&gt; &amp;amp; _&lt;br /&gt;                              ControlChars.CrLf &amp;amp; _&lt;br /&gt;                              oexcep.Message &amp;amp; ControlChars.CrLf)&lt;br /&gt;      myconex.Close()&lt;br /&gt;      &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;Exit Sub&lt;/span&gt; &lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;        End Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Resultados&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierbCWL4QbeDS3D9HT1Efmq9dOo0d60oHENB3ckpBksVYJd0EADYglmLOJ9LpQ63Y4p-unxNpHec8VldgdOUs297CRjGP3GT1dtDDD00ENbGkKYisdtYg-hjjS_8moE-bhmuJ_V6_A3wHD/s1600-h/cread4.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 303px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierbCWL4QbeDS3D9HT1Efmq9dOo0d60oHENB3ckpBksVYJd0EADYglmLOJ9LpQ63Y4p-unxNpHec8VldgdOUs297CRjGP3GT1dtDDD00ENbGkKYisdtYg-hjjS_8moE-bhmuJ_V6_A3wHD/s320/cread4.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5340884118728108178&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizpbaBrvQ_QOOnck-83Q60mMbDSK6L4SSpnb8ppvWd4VUvygzkhN6HII_DS4B-QPNtECGknZEGTE59gZ5MBG1_7bf-tb2lXZCLUNvE47RPRX8VMyfynB4AeG5UrESa7Ro-g8NOpl3axUFo/s1600-h/cread5.jpg&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 296px; height: 320px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizpbaBrvQ_QOOnck-83Q60mMbDSK6L4SSpnb8ppvWd4VUvygzkhN6HII_DS4B-QPNtECGknZEGTE59gZ5MBG1_7bf-tb2lXZCLUNvE47RPRX8VMyfynB4AeG5UrESa7Ro-g8NOpl3axUFo/s320/cread5.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5340884226280914306&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbasic-net.blogspot.com/feeds/5930508756357143592/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://vbasic-net.blogspot.com/2009/05/como-conectar-vbnet-2005-mysql.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5930508756357143592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4858096891034168678/posts/default/5930508756357143592'/><link rel='alternate' type='text/html' href='http://vbasic-net.blogspot.com/2009/05/como-conectar-vbnet-2005-mysql.html' title='Como Conectar Vb.Net 2005 a MySql'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHW78YBdKgG5TNrTSwQTifOR_3CErKU3s9fwtdLIsdjTyqqTFLeLukYV8UWxmNiouMpB3pSXdcU24z4gf1nho94t_DgNE3gDFhRyHKiz5tLFi6Lt6al2qusnKqw9BQPYGSJ8PLRZdxP0l0/s72-c/Crear1.jpg" height="72" width="72"/><thr:total>1</thr:total></entry></feed>