Results 1 to 3 of 3

Thread: [RESOLVED] display COM PORTS alphabetically

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    78

    Resolved [RESOLVED] display COM PORTS alphabetically

    Hi,

    How do I display the Ports detected on my device alphabetically?
    Now they are being detected OK, but displayed randomly:

    COM7
    COM4
    COM8
    COM0

    ???

    I'd like them displayed alphabetically:
    COM0
    COM4
    COM7
    COM8

    Dim Ports As String() = IO.Ports.SerialPort.GetPortNames()
    For Each Port In Ports
    cmbPort.Items.Add(Port)
    Next Port
    cmbPort.SelectedIndex = 3

    and as a second matter.....where are all the threads in this subforum (Mobile Development) gone?
    Right now I see only 2 threads (3 including this one of mine).
    What happened to all the old threads?

    Thanks.

  2. #2
    Fanatic Member TDQWERTY's Avatar
    Join Date
    Oct 2003
    Location
    Oporto & Leiria, Portugal / Luanda, Angola
    Posts
    972

    Re: display COM PORTS alphabetically

    Old threads are still here, all you got to do is "Thread Display Options" > Show from beginning
    About your thread, all you need to do is a sort. Such as "Array.Sort(Ports)"
    ::Winamp 5.xx id3v2 & modern skin support::
    ::NetCF DataGrid Programatically Scroll Example::
    Don't forget to rate posts from those who helped you solving your problem, clicking on and rating it.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2010
    Posts
    78

    Re: display COM PORTS alphabetically

    Thank you,

    It's working fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width