Solved

Communication Control Problem

Posted on 1998-09-20
7
140 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
Comment Utility
Is Comm2 use by the Mouse or any other device?
0
 
LVL 3

Accepted Solution

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

Expert Comment

by:a111a111a111
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 3

Expert Comment

by:a111a111a111
Comment Utility
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
Comment Utility
inputlen=1 says that i don't want to transfer data greater than 1 byte
0
 
LVL 3

Expert Comment

by:a111a111a111
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now