• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

riaing events from ActiveX EXE back to calling app

I have an applciation with an MDI form and a bunch of child forms.

several of the child forms call a method in a separate ActiveX EXE.

I want the ActiveX EXE to raise an event that the MDI form will respond to - not the actual calling child forms.

Is there a way to do this?

I tried instantiating an object of the relevant class of the ActiveX EXE - WithEvents - but it didn't respond to the raised event

Here's the code is use to raise the event in teh ActiveX exe

RaiseEvent ProtectListUpdated(intCurrentlyUsedInKBytes, intAccountSizeInKBytes)

0
kenshaw
Asked:
kenshaw
1 Solution
 
Erick37Commented:
In your MDI Main form:

Public Withevents objMyObj As YourProj.YourClass

Then the events will be listed in the right dropdown box in the code pane after you select your object in the left dropdown box.  It will be something like:

Private Sub objMyObj_ProtectListUpdated(ByVal kBUsed As Long, ByVal kBSize as Long)

Each of the child forms can call methods in the EXE by calling it like:

Call MDIForm1.objMyObj.MyFunction(bla, bla)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now