CFanatic

Go Back   CFanatic > Advance Programming > Network Programming


  #1  
Old 07-02-2010, 12:31 AM
Junior Member
 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
mrx3cas is on a distinguished road
| More
Post Serial Communication Problem

Hi,


For the purpose of serial communication I am created two applications in vb6.0 and I am used SaxComm control for this purpose.

I am deployed both applications in two different pcs and both pcs are connected with null modem cable.


I want to assign the data entered in the text box of first application to the text box of second application.


From the first application I am sending data using the following code to write data to a serial port.

SaxComm1.output=Text1.Text 'Name of the text box is Text1

I am receiving data in the second application like below.

In the receive event of SaxComm control I am written the following code for the purpose of receiving data.

I tried this in two ways.

First Way
-------------

SaxComm1.InputMode = comInputModeBinary
Dim Buffer() As Byte
ReDim Buffer(SaxComm1.InBufferCount - 1)
Buffer = SaxComm1.Input
MsgBox (Buffer)
Dim I As Integer
For I = 0 To UBound(Buffer) - 1
Text1.SelText = str(Buffer(I))
Next I

Second Way
----------------

SaxComm1.InputMode = comInputModeText
Dim str As String
SaxComm1.InputLen = 0
str = SaxComm1.Input
Text1.Text =str

when I want to assign it text box the data is not coming properly as how I am entered in the first system.


in the first way when I entered HI it shown the data in the text box as 84.

in the second way nothing is showing in the text box.

I kept watch on str. the value of str is shown as like below


"€€"


what is the problem exactly and can anybody tell me what modification i need to do if I want to assign the text what I entered in the first application as its in the text box of second application??

when I used MSComm32 control I am able to do the same thing.I am getting issue with SaxComm control only.

Thanks in advance.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Communication between two exe. i.e. When second starts disable screen of first HermanTabbert Game Development 0 06-28-2010 10:41 PM
how work serial port in c# morteza bazrafshan C# Programming 1 04-26-2009 08:53 PM
Serial Programming-really beginner's ? fab Win32 Programming 0 08-14-2008 10:27 PM
Inter Process Communication imaginative.bibhas Win32 Programming 1 07-29-2008 09:00 AM
pda communication with serial port sleepyzzz C Programming 0 03-24-2007 12:29 AM

 

Follow CFanatic on Twitter
CFanatic Search
Custom Search

Advertisement

Go4Expert's Job Board
Powered by

Go4Expert Newsletter
Enter your Name and Email Address below and Click Subscribe.

Subscriber Counter

Not planning to subscribe yet, browse Go4Expert's Newsletter Archive

All times are GMT -5. The time now is 06:17 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Looking for work in C, C++, C#? Sign up at Elance and search over 30,000 Freelancing jobs today.