Emergency. problems in serial communication
-
Hi, guys I use MSComm control to write a serial port communication routine. But the event "OnComm" don't response. And I have set RThreshold and SThreshold 1. It 's correct when I send out a character, the OnComm event should response, But it not. What do u think of that? Expect some serial communication specialists' idea. Thank a lot vigorous
-
Hi, guys I use MSComm control to write a serial port communication routine. But the event "OnComm" don't response. And I have set RThreshold and SThreshold 1. It 's correct when I send out a character, the OnComm event should response, But it not. What do u think of that? Expect some serial communication specialists' idea. Thank a lot vigorous
This has nothing to do with serial communications (unless, of course, the serial device is not responding); it has to do with the COM control (it's receiving data and firing events). Make sure you've attached an
EventHandler
to theMSComm.OnComm
event:msComm1.OnComm += new EventHandler(this.OnComm);
If you haven't attached an event handler, your event handler will not be fired (it's a callback). For more information about interop'ing the MSComm control, read http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320[^] from a dev site I haunted long ago.
Microsoft MVP, Visual C# My Articles
-
This has nothing to do with serial communications (unless, of course, the serial device is not responding); it has to do with the COM control (it's receiving data and firing events). Make sure you've attached an
EventHandler
to theMSComm.OnComm
event:msComm1.OnComm += new EventHandler(this.OnComm);
If you haven't attached an event handler, your event handler will not be fired (it's a callback). For more information about interop'ing the MSComm control, read http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320[^] from a dev site I haunted long ago.
Microsoft MVP, Visual C# My Articles
Heath Stewart wrote: from a dev site I haunted long ago Ah, the old days. :sigh: - Nick Parker
My Blog | My Articles -
Heath Stewart wrote: from a dev site I haunted long ago Ah, the old days. :sigh: - Nick Parker
My Blog | My ArticlesNick Parker wrote: Ah, the old days. :sigh: Are you nuts? :) DevHood wasn't very good. CodeProject is much better, despite the connection problems lately.
Microsoft MVP, Visual C# My Articles