Solved

Communication Control Problem

Posted on 1998-09-20
7
144 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

803 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