Click here to Skip to main content
15,903,175 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Using dynamic enum as type in a parameter of a method Pin
Not Active21-May-10 2:27
mentorNot Active21-May-10 2:27 
GeneralRe: Using dynamic enum as type in a parameter of a method Pin
dashingsidds21-May-10 3:05
dashingsidds21-May-10 3:05 
GeneralRe: Using dynamic enum as type in a parameter of a method Pin
Not Active21-May-10 3:15
mentorNot Active21-May-10 3:15 
GeneralRe: Using dynamic enum as type in a parameter of a method Pin
Shameel23-May-10 4:08
professionalShameel23-May-10 4:08 
GeneralRe: Using dynamic enum as type in a parameter of a method Pin
Not Active23-May-10 4:30
mentorNot Active23-May-10 4:30 
GeneralRe: Using dynamic enum as type in a parameter of a method Pin
PIEBALDconsult23-May-10 6:51
mvePIEBALDconsult23-May-10 6:51 
QuestionCheck the serial port event PinChanged Pin
feromontalvo20-May-10 3:09
feromontalvo20-May-10 3:09 
AnswerRe: Check the serial port event PinChanged Pin
Luc Pattyn20-May-10 5:05
sitebuilderLuc Pattyn20-May-10 5:05 
You may have any of the following issues, or combination thereof:

1.
AFAIK you need to open the serial port, and obviously you need to wire an event handler to it, for the handler to become active at all.

2.
connecting RTS to CTS may or may not work, one is an input pin, one is an output pin; if the unconnected input pin has the same logic level as the output pin, then connecting them together won't change a thing. So your scheme will only work for one specific value of the RTS pin. I never can remember the levels, so you would have to look up the details.

3.
almost all asynchronous handlers, and the SerialPort ones for sure, run on ThreadPool threads. Which means they cannot reliably access any GUI Controls. You can (for debugging purposes) include a MessageBox.Show(), that should work; but you can't simply do myLabel.Text="CTS has changed";
This article[^] provides more information about that.

Some remarks:
- a mechanical switch will "bounce", so for throwing the switch once, you are likely to get several "pin changed" events.
- all serial port events get queued; if your event handler takes longer, additional events will get queued and will call your handler with some delay, so you loose the real-time behavior. (That would also be true with you clicking a Button that has a slow handler).

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: Check the serial port event PinChanged Pin
feromontalvo21-May-10 0:38
feromontalvo21-May-10 0:38 
GeneralRe: Check the serial port event PinChanged Pin
Luc Pattyn21-May-10 2:10
sitebuilderLuc Pattyn21-May-10 2:10 
GeneralRe: Check the serial port event PinChanged Pin
feromontalvo21-May-10 8:32
feromontalvo21-May-10 8:32 
GeneralRe: Check the serial port event PinChanged Pin
Luc Pattyn21-May-10 8:48
sitebuilderLuc Pattyn21-May-10 8:48 
GeneralRe: Check the serial port event PinChanged Pin
feromontalvo24-May-10 23:07
feromontalvo24-May-10 23:07 
Questioncollection of different sections in app.config file Pin
dashingsidds20-May-10 0:43
dashingsidds20-May-10 0:43 
AnswerRe: collection of different sections in app.config file Pin
Richard MacCutchan20-May-10 2:12
mveRichard MacCutchan20-May-10 2:12 
GeneralRe: collection of different sections in app.config file Pin
dashingsidds20-May-10 19:57
dashingsidds20-May-10 19:57 
QuestionDataSet.AddTable order dependence? Pin
Marc Clifton19-May-10 10:28
mvaMarc Clifton19-May-10 10:28 
AnswerRe: DataSet.AddTable order dependence? Pin
Not Active19-May-10 13:02
mentorNot Active19-May-10 13:02 
QuestionResize a monochrome bitmap without using any class Pin
Mehdi Ghiasi19-May-10 7:54
Mehdi Ghiasi19-May-10 7:54 
AnswerRe: Resize a monochrome bitmap without using any class Pin
Luc Pattyn19-May-10 14:55
sitebuilderLuc Pattyn19-May-10 14:55 
QuestionRe: Resize a monochrome bitmap without using any class Pin
Mehdi Ghiasi20-May-10 2:06
Mehdi Ghiasi20-May-10 2:06 
AnswerRe: Resize a monochrome bitmap without using any class Pin
Luc Pattyn20-May-10 2:19
sitebuilderLuc Pattyn20-May-10 2:19 
QuestionRe: Resize a monochrome bitmap without using any class Pin
Mehdi Ghiasi20-May-10 7:18
Mehdi Ghiasi20-May-10 7:18 
AnswerRe: Resize a monochrome bitmap without using any class Pin
Thomas Krojer21-May-10 4:08
Thomas Krojer21-May-10 4:08 
JokeRe: Resize a monochrome bitmap without using any class Pin
T M Gray21-May-10 5:24
T M Gray21-May-10 5:24 

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.