# How do I enter a carriage return in VB 6.0?



## flyfish29 (Jun 27, 2008)

I have about 1.5 years of VB6.0 programming experience. Mostly activeX and raw data technical stuff. I am thinking of doing a custom install for a customer and controlling an LC3272N HD TV just happens to be a part of the VB6 HMI. I will be using a lot of stuff that I have a good grasp on; however, I am having trouble sending data via RS232 to the HP TV. I have found the "HP TVs RS232 control code document online, but it is code totally new to me. I will just paste the link. I have set up the COMM port already. The document is also stating I need to set up the Flow Control to CTS/RTS, but I do not see this option in device manager. The TV is expecting a 3 byte command; a Paameter of 4 bytes; the CR (Carriage Return 0Dh) at the end of string..........A OK+Cr: Success....A ERR + CR: fail.

http://h10025.www1.hp.com/ewfrf/wc/docum...

I am not sure if I have to DIM something or what. I am hoping someone is able to help me out. I can compensate if need be. Here is the text. What I have been attempting is to write code to turn off the TV and turn it on--Just something simple. Here is what I am trying ..............MSComm1.Output = (PWR 0) and then it asks for a carriage return???????????


----------



## flyfish29 (Jun 27, 2008)

Problem solved!!!!!! After I did a little research I was able to fit the missing piece. All I needed to do was the following line of text..........MScomm1.Output = "PWR0 " & Chr$(13) ...Now I can use the other strings to do more stuff via a VB6.0 HMI.


----------

