Solved

Communication Control Problem

Posted on 1998-09-20
7
146 Views
Last Modified: 2010-04-30
I have VB5.0.
I have used communication control to transfer data between
2 computers in the following manner:

comm2.comport=2
comm2.portopen=true
comm2.inputlen=true
.
. Transferring data
.
comm2.portopen=false

When the EXE program finishes my computer STOPS (i must to
restart it). What may be a problem ?

Note: when i run the program from Visual Basic environment       there isn't the problem.
.
0
Comment
Question by:alexgo
  • 5
  • 2
7 Comments
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1435738
Is Comm2 use by the Mouse or any other device?
0
 
LVL 3

Accepted Solution

by:
a111a111a111 earned 50 total points
ID: 1435739
Change the
comm2.comport=2
to : comm2.CommPort = 2
0
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1435740
What is "comm2.InputLen = True" ?
It should have a value like 10 : "comm2.InputLen = 10"

The InputLen Property:
Sets and returns the number of characters the Input property reads from the receive buffer.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 3

Expert Comment

by:a111a111a111
ID: 1435741
If I am in the right direction than:

Private Sub Form_Load()
comm2.CommPort = 2
    comm2.PortOpen = True
    comm2.InputLen = 10 'True
    '.
    '.Transferring Data
    '.
    comm2.PortOpen = False
    MsgBox "done"
    End
End Sub

0
 

Author Comment

by:alexgo
ID: 1435742
inputlen=1 says that i don't want to transfer data greater than 1 byte
0
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1435743
inputlen=1 is fine.

So change it to:
Private Sub Form_Load()
       comm2.CommPort = 2
           comm2.PortOpen = True
           comm2.InputLen = 1 'True
           '.
           '.Transferring Data
           '.
           comm2.PortOpen = False
           MsgBox "done"
           End
       End Sub
0
 

Author Comment

by:alexgo
ID: 1435744
For a111a111a111:
I'm sorry on my error that i did in submitting. My proram is written as you sugest:
Private Sub Form_Load()
             comm2.CommPort = 2
                 comm2.PortOpen = True
                 comm2.InputLen = 1 'True
                 '.
                 '.Transferring Data
                 '.
                 comm2.PortOpen = False
                 MsgBox "done"
                 End
             End Sub

And in this case i have the described problem.
Thank you.
 
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question