Proyecto AjpdSoft
Principal
· Inicio
· Buscar
· Contactar
· Descargas
· Enciclopedia
· Estadísticas
· Eventos
· Foros
· Manuales, Artículos
· Nuestra historia
· Quiénes somos
· Recomiéndanos
· Temas
· Top 10
· Trucos Delphi, PHP, Java, Visual Studio
· Tu cuenta
Descargas

Últimas Descargas
· AjpdSoft Acceso MySQL Android

· AjpdSoft Acceso MySQL con ADO.NET en C#

· AjpdSoft Gestión Integral código fuente Delphi

· AjpdSoft Indexar Texto PDF C# iTextSharp

· AjpdSoft Capturar Pantalla C#

· AjpdSoft Gestión de Transportes Ficheros instalación manual

· AjpdSoft Separar Páginas PDF código fuente C# C Sharp .Net

· AjpdSoft Convertir Texto a PDF código fuente VB.Net

· AjpdSoft Generador y Lector códigos QR VB.Net

· AjpdSoft Socket VB.Net

· AjpdSoft Acceso nativo MySQL enlazado VB.Net

· AjpdSoft Acceso nativo MySQL VB.Net

· AjpdSoft Envío SMS puerto serie módem GSM VB.Net

· AjpdSoft InfoWifi Android

· AjpdSoft Lector Códigos de Barras Android paquete apk para instalar


Lo más descargado
· AjpdSoft Registro de OCX y DLL Código Fuente Delphi

· AjpdSoft Generador de códigos de barras

· AjpdSoft Conversor Hexadecimal, Decimal, Texto - Código Fuente Delphi

· Borland Database Desktop 7.0

· AjpdSoft Aviso cambio IP pública

· AjpdSoft Inventario PCs

· AjpdSoft Administración Bases de Datos Código Fuente Delphi

· AjpdSoft Facturación Código Fuente Delphi

· AjpdSoft Puerto Paralelo Código Fuente Delphi

· AjpdSoft Inventario PCs Código Fuente Delphi

· Cómo trabajar con tablas Paradox en red

· Cómo compilar un fichero MDB Base de Datos Access

· AjpdSoft Aviso cambio IP pública Código Fuente Delphi

· AjpdSoft Conexión BD Visual Basic .Net

· AjpdSoft Agenda Código Fuente Delphi

Términos enciclopedias
Últimos
· Telnet
Enc.: Informática

· OSI
Enc.: Informática

· LTO
Enc.: Informática

· DoS, DDoS
Enc.: Informática

· NVRAM
Enc.: Informática

· DATE_SUB (date, INTERVAL)
Enc.: Funciones MySQL

· CURDATE ()
Enc.: Funciones MySQL

· DES
Enc.: Informática

· RSA
Enc.: Informática

· VMFS
Enc.: Informática

· OVF
Enc.: Informática

· Doctrine
Enc.: Programas/Software

· HTTP
Enc.: Informática

· YAML
Enc.: Informática

· AJAX
Enc.: Informática


Lo más visitado

· Attrib
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· At
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· Arp
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· URL
Enc.: Informática

· net use unidad: \\nombrepc\recursocompartido
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· bootcfg addsw
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· MSKSrvr.exe
Enc.: Procesos en memoria

· ODBC
Enc.: Informática

· Mozilla Firefox
Enc.: Programas/Software

· xcopy
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· Call
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· Gpupdate
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· netstat -n
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· Assoc
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· net view
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)
Eventos
Mayo

DLMMJVS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Consejos
Lenguajes
Selecciona Idioma de la Interfaz:

Webs recomendadas
Orasite.com



Coloca tu web aquí
Language english
English
Obtener puertos serie COM de un equipo VB.Net
Lenguaje de programación Visual Basic .Net

Mostramos una función que obtiene los puertos serie (COM) disponibles en un equipo. Obtiene el nombre de cada puerto serie del equipo (COM1, COM2, COM3, ...). Para ello usaremos Microsoft Visual Basic .Net y el espacio de nombres Computer.Ports.SerialPortNames.


    Function obtenerPuertosSeriePC() As List(Of String)
        Dim puertosSerie As List(Of String)

        puertosSerie = New List(Of String)
        Try
            puertosSerie = New List(Of String)
            For Each puertosSerieObtenidos As String In My.Computer.Ports.SerialPortNames
                puertosSerie.Add(puertosSerieObtenidos)
            Next
            obtenerPuertosSeriePC = puertosSerie
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical +
                   MsgBoxStyle.OkOnly)
            obtenerPuertosSeriePC = puertosSerie
        End Try
    End Function
Ejemplo de llamada y uso:
    Private Sub btObtenerPuertos_Click(sender As System.Object,
                  e As System.EventArgs) Handles btObtenerPuertos.Click
        Dim puertosSerie As List(Of String)
        Dim i As Integer

        txtPuerto.Items.Clear()

        puertosSerie = obtenerPuertosSeriePC()
        For i = 0 To puertosSerie.Count - 1
            txtPuerto.Items.Add(puertosSerie(i).ToString)
        Next

        If txtPuerto.Items.Count >= 1 Then
            txtPuerto.Text = txtPuerto.Items(0)
        Else
            txtPuerto.Text = ""
        End If

        If puertosSerie.Count = 0 Then
            MsgBox("No se han detectado puertos serie en su equipo, " +
                   "asegúrese de que están correctamente configurados.",
                   MsgBoxStyle.Information + MsgBoxStyle.OkOnly)
        End If
    End Sub









Publicado el: 2011-08-14

Content ©
Este sitio web NO CONTIENE malware, todos los programas con código fuente aquí. Autor: Alonso Javier Pérez Díaz Búscanos en Google+