Click here to Skip to main content
15,914,416 members
Home / Discussions / C#
   

C#

 
GeneralRe: adjust my machine's utc? Pin
mirko864-Feb-09 5:56
mirko864-Feb-09 5:56 
GeneralRe: adjust my machine's utc? Pin
PIEBALDconsult4-Feb-09 6:53
mvePIEBALDconsult4-Feb-09 6:53 
GeneralRe: adjust my machine's utc? Pin
mirko864-Feb-09 7:18
mirko864-Feb-09 7:18 
GeneralRe: adjust my machine's utc? Pin
PIEBALDconsult4-Feb-09 8:00
mvePIEBALDconsult4-Feb-09 8:00 
GeneralRe: adjust my machine's utc? Pin
mirko864-Feb-09 8:05
mirko864-Feb-09 8:05 
GeneralRe: adjust my machine's utc? Pin
PIEBALDconsult4-Feb-09 8:10
mvePIEBALDconsult4-Feb-09 8:10 
QuestionHow do I change the value in the Title column for a document or folder in a doc lib using c#? Pin
eval994-Feb-09 4:00
eval994-Feb-09 4:00 
QuestionSerialPort output problem Pin
Admin8874-Feb-09 3:45
Admin8874-Feb-09 3:45 
hi,
i connected 2 computers with COM cable (RS232).
i created 2 application for sending and receiving information.

i tried to send information from the first computer and to see it at Listen32 program on the other computer. I get the information correctly with [CR] and [SP] -(that what i wants) .
But In my receiving application i get information without these ( [SP] [CR]).

how can i change the Encode and to get information with [SP] and [CR]?

My Sending Application
namespace WindowsFormsApplication14
{
    public partial class Form1 : Form
    {
        SerialPort port;
        public Form1()
        {
            InitializeComponent();
           port = new SerialPort("COM1", 2400, Parity.None, 8, StopBits.One);
           port.Open();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            port.Write(textBox1.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            port.Close();
        }
    }
}


my receiving application

namespace WindowsFormsApplication3
{
    public partial class Form1 : Form
    {
        private SerialPort p = new SerialPort("COM1", 2400, Parity.None, 8, StopBits.One);

        public Form1()
        {
            InitializeComponent();

            CheckForIllegalCrossThreadCalls = false;
           
            Thread t = new Thread(new ThreadStart(SerialPortProgram));
           
            t.Start(); 
        }


        public void SerialPortProgram()
        {
                p.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
                p.Open();
               Application.Run();

            }

        private void port_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {


            textBox1.Text += p.ReadExisting();
         
        }

AnswerRe: SerialPort output problem Pin
Luc Pattyn4-Feb-09 5:09
sitebuilderLuc Pattyn4-Feb-09 5:09 
GeneralRe: SerialPort output problem Pin
Admin8874-Feb-09 5:51
Admin8874-Feb-09 5:51 
AnswerRe: SerialPort output problem [modified] Pin
Luc Pattyn4-Feb-09 6:13
sitebuilderLuc Pattyn4-Feb-09 6:13 
GeneralRe: SerialPort output problem Pin
Alan N4-Feb-09 7:06
Alan N4-Feb-09 7:06 
AnswerRe: SerialPort output problem [modified] Pin
Luc Pattyn4-Feb-09 7:23
sitebuilderLuc Pattyn4-Feb-09 7:23 
QuestionSql Database LookUp Pin
boiDev4-Feb-09 3:04
boiDev4-Feb-09 3:04 
AnswerRe: Sql Database LookUp Pin
musefan4-Feb-09 3:29
musefan4-Feb-09 3:29 
AnswerRe: Sql Database LookUp Pin
J4amieC4-Feb-09 4:25
J4amieC4-Feb-09 4:25 
JokeRe: Sql Database LookUp Pin
musefan4-Feb-09 4:29
musefan4-Feb-09 4:29 
QuestionInstalling a COM+ interoperable C# dll on machine without .Net Framework Pin
dan!sh 4-Feb-09 2:23
professional dan!sh 4-Feb-09 2:23 
AnswerRe: Installing a COM+ interoperable C# dll on machine without dll Pin
musefan4-Feb-09 2:35
musefan4-Feb-09 2:35 
GeneralRe: Installing a COM+ interoperable C# dll on machine without dll Pin
dan!sh 4-Feb-09 3:43
professional dan!sh 4-Feb-09 3:43 
GeneralRe: Installing a COM+ interoperable C# dll on machine without dll Pin
musefan4-Feb-09 3:50
musefan4-Feb-09 3:50 
GeneralRe: Installing a COM+ interoperable C# dll on machine without dll Pin
dan!sh 4-Feb-09 4:08
professional dan!sh 4-Feb-09 4:08 
GeneralRe: Installing a COM+ interoperable C# dll on machine without dll Pin
musefan4-Feb-09 4:23
musefan4-Feb-09 4:23 
AnswerRe: Installing a COM+ interoperable C# dll on machine without .Net Framework Pin
SeMartens4-Feb-09 3:56
SeMartens4-Feb-09 3:56 
GeneralRe: Installing a COM+ interoperable C# dll on machine without .Net Framework Pin
dan!sh 4-Feb-09 4:07
professional dan!sh 4-Feb-09 4:07 

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.