Solved

passing mscomm to dll

Posted on 2004-10-05
1
501 Views
Last Modified: 2008-02-01
I have a dll with a form with mscomm ocx and a main class but the ocx doens't raise an port event when character incomming to the port (I follow other instruccion of

code of class
Dim f1 As New FrmPpal 'form
Private WithEvents mycomm As mscommlib.MSComm

Public Sub inicializa() ' i call this of other programm
   
  Set mycomm = f1.MSComm1
  mycomm.CommPort = 4
  mycomm.Settings = "9600,N,8,1"
  mycomm.RTSEnable = False
  mycomm.PortOpen = True
  mycomm.Output = "STATUS"
 
End Sub

Sub mycomm_onevent() ' when character incomming never raise
 
 Select Case mycomm.CommEvent
 
   ' ok
 
 End Select

0
Comment
Question by:cquiroga2
1 Comment
 
LVL 32

Accepted Solution

by:
Erick37 earned 250 total points
ID: 12231131
I believe the sub is OnComm, not OnEvent...

Private Sub mycomm_OnComm()
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

756 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