See my COM Port terminal example here:http://www.lvr.com/serport.htm
In my example, see the DataReceived function.