Click here to Skip to main content
15,887,453 members
Home / Discussions / C#
   

C#

 
QuestionWhat's name of this code ? Pin
Mohammad Dayyan16-Mar-09 23:28
Mohammad Dayyan16-Mar-09 23:28 
AnswerRe: What's name of this code ? Pin
DaveyM6916-Mar-09 23:30
professionalDaveyM6916-Mar-09 23:30 
Questionopenfiledialog Pin
abu anas alazuneh16-Mar-09 23:06
abu anas alazuneh16-Mar-09 23:06 
AnswerRe: openfiledialog Pin
SeMartens16-Mar-09 23:07
SeMartens16-Mar-09 23:07 
AnswerRe: openfiledialog Pin
Christian Graus16-Mar-09 23:08
protectorChristian Graus16-Mar-09 23:08 
AnswerRe: openfiledialog Pin
iamalik16-Mar-09 23:31
professionaliamalik16-Mar-09 23:31 
AnswerRe: openfiledialog Pin
Xmen Real 17-Mar-09 0:00
professional Xmen Real 17-Mar-09 0:00 
QuestionHow to get "Name" or any ther property of the virtual SerialPort Pin
Suun16-Mar-09 22:18
Suun16-Mar-09 22:18 
In my DeviceManager i can see 3xCOM port installed. Only one of them is physical port - 2 other are virtual. When I list them:
 string[] portNames = SerialPort.GetPortNames();<br />
<br />
            foreach (string port in portNames)<br />
            {<br />
                listBox1.Items.Add(port);<br />
            }<br />

I get: COM1, COM2, COM3. It tells me nothing - only that 3 ports are installed in my computer. Other way is to use WMI. It works perfectly for physical ports.
<br />
SelectQuery query = new SelectQuery("select * from Win32_SerialPort");<br />
<br />
ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);<br />
<br />
ManagementObjectCollection collection = searcher.Get();<br />
<br />
foreach (ManagementObject port in collection)<br />
{<br />
listBox2.Items.Add(port["Name"].ToString());<br />
}<br />


That way i get only "Name" (Communication Port) of the physical COM port but no virtual ports are listed.
My question is: How to get property "Name" or any other of the virtual serial ports.
Thanks in advance
ps. Sorry for my bad english :]
AnswerRe: How to get "Name" or any ther property of the virtual SerialPort Pin
Christian Graus16-Mar-09 22:52
protectorChristian Graus16-Mar-09 22:52 
AnswerRe: How to get "Name" or any ther property of the virtual SerialPort Pin
Xmen Real 16-Mar-09 22:57
professional Xmen Real 16-Mar-09 22:57 
Questionupload excel from local drive Pin
Mangesh Tomar16-Mar-09 22:17
Mangesh Tomar16-Mar-09 22:17 
AnswerRe: upload excel from local drive Pin
Greg Chelstowski16-Mar-09 22:53
Greg Chelstowski16-Mar-09 22:53 
GeneralRe: upload excel from local drive Pin
Mangesh Tomar16-Mar-09 23:34
Mangesh Tomar16-Mar-09 23:34 
GeneralRe: upload excel from local drive Pin
Mangesh Tomar17-Mar-09 0:24
Mangesh Tomar17-Mar-09 0:24 
GeneralRe: upload excel from local drive Pin
Greg Chelstowski17-Mar-09 0:46
Greg Chelstowski17-Mar-09 0:46 
QuestionFixed columns in DataGridview in windows C# Pin
Rami.P16-Mar-09 21:49
Rami.P16-Mar-09 21:49 
AnswerRe: Fixed columns in DataGridview in windows C# Pin
Spunky Coder16-Mar-09 22:24
Spunky Coder16-Mar-09 22:24 
GeneralRe: Fixed columns in DataGridview in windows C# Pin
Rami.P16-Mar-09 22:43
Rami.P16-Mar-09 22:43 
GeneralRe: Fixed columns in DataGridview in windows C# Pin
Xmen Real 16-Mar-09 22:54
professional Xmen Real 16-Mar-09 22:54 
GeneralRe: Fixed columns in DataGridview in windows C# [modified] Pin
Spunky Coder16-Mar-09 23:13
Spunky Coder16-Mar-09 23:13 
GeneralRe: Fixed columns in DataGridview in windows C# Pin
Rami.P17-Mar-09 0:00
Rami.P17-Mar-09 0:00 
QuestionClose a Child Form Pin
yesu prakash16-Mar-09 21:05
yesu prakash16-Mar-09 21:05 
AnswerRe: Close a Child Form Pin
Xmen Real 16-Mar-09 21:15
professional Xmen Real 16-Mar-09 21:15 
AnswerRe: Close a Child Form Pin
12Code16-Mar-09 22:02
12Code16-Mar-09 22:02 
AnswerRe: Close a Child Form Pin
jaypatel51217-Mar-09 7:20
jaypatel51217-Mar-09 7:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.