Solved

passing mscomm to dll

Posted on 2004-10-05
1
499 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 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…
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…

785 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