Click here to Skip to main content
15,917,456 members
Home / Discussions / C#
   

C#

 
Generalstandard controls graphical properties Pin
cignox14-Mar-08 22:57
cignox14-Mar-08 22:57 
GeneralAdding Contact in ACtive directory and reflecting it in Exchange server. Pin
amitcoder834-Mar-08 22:45
amitcoder834-Mar-08 22:45 
QuestionHow to monitor opened serial port by C# Pin
Digital Hyper4-Mar-08 22:39
Digital Hyper4-Mar-08 22:39 
AnswerRe: How to monitor opened serial port by C# Pin
Luc Pattyn5-Mar-08 6:12
sitebuilderLuc Pattyn5-Mar-08 6:12 
QuestionHow to call VC++ ActiveX.exe in C# with ASP.Net Pin
Parvesh K Bansal4-Mar-08 22:06
Parvesh K Bansal4-Mar-08 22:06 
GeneralSerial Port communication Pin
t_nedelchev4-Mar-08 21:17
t_nedelchev4-Mar-08 21:17 
GeneralRe: Serial Port communication - Repost! Pin
DaveyM694-Mar-08 22:29
professionalDaveyM694-Mar-08 22:29 
GeneralRe: Serial Port communication Pin
Bekjong4-Mar-08 22:30
Bekjong4-Mar-08 22:30 
It's a bit of an odd scenario since real serial ports don't tend to disappear, and it doesn't seem this possibility was taken into account when Microsoft wrote the SerialPort class: There's no event that indicates Com-port "disappearance" in it.

I guess your best option would be to start a separate thread that polls SerialPort.IsOpen every now and then: Most likely this will throw the error you got earlier when you disconnect the USB adapter, so you can catch that to see if the port's still there... Of course, you'll need to catch it at any other reference to SerialPort as well, that's just decent programming.

Alternatively, there might be a class somewhere in the .Net framework that monitors USB devices, don't have any experience with that. Could very well be a p/invoke kind of thing.


Standards are great! Everybody should have one!

GeneralRe: Serial Port communication Pin
Himansu Sekhar Nayak2-Aug-08 1:03
Himansu Sekhar Nayak2-Aug-08 1:03 
QuestionHow to overload assignment operator in C# Pin
bankey10104-Mar-08 20:10
bankey10104-Mar-08 20:10 
AnswerRe: How to overload assignment operator in C# Pin
Giorgi Dalakishvili4-Mar-08 20:17
mentorGiorgi Dalakishvili4-Mar-08 20:17 
AnswerRe: How to overload assignment operator in C# Pin
SPanicker*4-Mar-08 23:12
SPanicker*4-Mar-08 23:12 
AnswerRe: How to overload assignment operator in C# Pin
Luc Pattyn5-Mar-08 6:19
sitebuilderLuc Pattyn5-Mar-08 6:19 
GeneralProblem with Print and print preview Pin
D i x y4-Mar-08 20:06
D i x y4-Mar-08 20:06 
QuestionHow can we use Office 2000 from .NET 2005 Pin
mpavas4-Mar-08 19:16
mpavas4-Mar-08 19:16 
GeneralRe: How can we use Office 2000 from .NET 2005 Pin
Pete O'Hanlon4-Mar-08 22:51
mvePete O'Hanlon4-Mar-08 22:51 
GeneralRe: How can we use Office 2000 from .NET 2005 Pin
mpavas4-Mar-08 23:11
mpavas4-Mar-08 23:11 
GeneralLoad RTF With Headre and Footer in C# Pin
Khaleek Ahmad4-Mar-08 19:01
Khaleek Ahmad4-Mar-08 19:01 
GeneralRe: Load RTF With Headre and Footer in C# Pin
Giorgi Dalakishvili4-Mar-08 20:49
mentorGiorgi Dalakishvili4-Mar-08 20:49 
QuestionProgrammatically compiling code with COM references Pin
i_want_to_learn_c#4-Mar-08 18:24
i_want_to_learn_c#4-Mar-08 18:24 
GeneralRe: Programmatically compiling code with COM references Pin
leppie6-Mar-08 3:28
leppie6-Mar-08 3:28 
GeneralHelp Regarding office add-in Pin
tasumisra4-Mar-08 18:10
tasumisra4-Mar-08 18:10 
QuestionHow to continue a process with a button Pin
MAW304-Mar-08 16:41
MAW304-Mar-08 16:41 
AnswerRe: How to continue a process with a button Pin
Parwej Ahamad4-Mar-08 16:50
professionalParwej Ahamad4-Mar-08 16:50 
AnswerRe: How to continue a process with a button Pin
Christian Graus4-Mar-08 16:55
protectorChristian Graus4-Mar-08 16:55 

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.