Re: firing events from server

Mark Burns <[email protected]> Tue, 28 May 2002 12:05:27 -0400
Newsgroups gmane.comp.windows.devel.vbcom
Message-ID <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAM4zfucMf7ki18ZSBD7ZyeGKEAAAQAAAAHfttcXBH60KMk3lqshKCWAEAAAAA@quixnet.net>
Francis,

Are you using the remote COM object, within a class or within a VB
module?
In order to process events from a remote com object it must be declared
WithEvents in a class module within your project.

Unless I'm misunderstanding what you are asking, check out the VB online
help for the WithEvents keyword.
Like:

==== in a class module within your project ====
Dim Withevents X as myComServerEventGenerationObject

Private Sub/Function X_WhateverTheEventNameIsFromYourCOMServerObject()
  <event handling code here>
End Sub/Function

Regards,
- Mark
Harrison Career Institute, Inc.
Voorhees, NJ
(856) 751-8181 x118

> -----Original Message-----
> From: VBCOM [mailto:[email protected]] On Behalf Of
> Knebels, Francis
> Sent: Tuesday, May 28, 2002 10:23 AM
> To: [email protected]
> Subject: [VBCOM] firing events from server
>
>
> Has anyone run into a problem firing events from COM
> components.  Here's my scenario.
>
> I have a COM server that fires an event.  I have a standard
> EXE that should catch the event.  the standard EXE has a
> treeview control and I create an instance of the COM server
> in the NodeClick event of the treeview.  Events from this
> object instance are never fired up to the client.  If I take
> the object creation out of the NodeClick and put it in the
> Form_load event, everything works properly.  Is this a known
> issue?  I searched the MSKB but didn't find anything.
>
> Francis X. Knebels
> Merck Vaccine Division
> WP97-3W507
> 215.652.7710
>
>
> --------------------------------------------------------------
> ----------------
> Notice: This e-mail message, together with any attachments,
> contains information of Merck & Co., Inc. (Whitehouse
> Station, New Jersey, USA) that may be confidential,
> proprietary copyrighted and/or legally privileged, and is
> intended solely for the use of the individual or entity named
> on this message. If you are not the intended recipient, and
> have received this message in error, please immediately
> return this by e-mail and then delete it.
>
> ==============================================================
> ================
>
> You can read messages from the VBCOM archive, unsubscribe
> from VBCOM, or subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
>

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.