G
Guest
Hi all
I am having a problem reading from a serial port, first of all I have now resorted to using the MSComm ActiveX control on my Windows Forms to provide me with the interface to my serial port. is there no other way to do this - it has to be simple or well explained because I'm still new to the .NET world and c#. I did stumble across an article on the MSDN site where I downloaded a file NetSerialComm.exe - I think it was from one of the msdn magazines? But anyway I don't know what the heck is going on here! there are so many classes, I don't know which ones to instantiate or if I'm supposed to write my own classes derived from these?! I would just like something simple that would give me the capabilities of reading and writing to a comport. I know that for reading a port is alot harder than writing to one because you're not really in control, you basically have to do it on an Event basis - but I don't know how to construct me form/class to raise an event when data is coming through the port
Plainly put, that is why I resorted to the MSComm.ocx. But now when I set my Card reader up and I plug it in and I swipe my transponder card the OnComm event of the Active X control executes 3 times and I get 3 sections of the number thats on the card! - where as in Hyperterminal I get 1 long string. I have no Idea why the event would be raised 3 times? any suggestions?
I would like to break away from the MSComm control purely because I want a .NET component, but this product I want to make will be sold so I am screwed by open source liscence agreements!lo
Please can someone give me some help or point me in a direction where I can find this sort of stuff explained in plain english:
Thanks
Kevin
I am having a problem reading from a serial port, first of all I have now resorted to using the MSComm ActiveX control on my Windows Forms to provide me with the interface to my serial port. is there no other way to do this - it has to be simple or well explained because I'm still new to the .NET world and c#. I did stumble across an article on the MSDN site where I downloaded a file NetSerialComm.exe - I think it was from one of the msdn magazines? But anyway I don't know what the heck is going on here! there are so many classes, I don't know which ones to instantiate or if I'm supposed to write my own classes derived from these?! I would just like something simple that would give me the capabilities of reading and writing to a comport. I know that for reading a port is alot harder than writing to one because you're not really in control, you basically have to do it on an Event basis - but I don't know how to construct me form/class to raise an event when data is coming through the port
Plainly put, that is why I resorted to the MSComm.ocx. But now when I set my Card reader up and I plug it in and I swipe my transponder card the OnComm event of the Active X control executes 3 times and I get 3 sections of the number thats on the card! - where as in Hyperterminal I get 1 long string. I have no Idea why the event would be raised 3 times? any suggestions?
I would like to break away from the MSComm control purely because I want a .NET component, but this product I want to make will be sold so I am screwed by open source liscence agreements!lo
Please can someone give me some help or point me in a direction where I can find this sort of stuff explained in plain english:
Thanks
Kevin