dcsimg
Results 1 to 3 of 3

Thread: [RESOLVED] Implements with events?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,223

    Resolved [RESOLVED] Implements with events?

    Hello,

    I wrote the interface that I want for a Class object in another Class.

    Then I have a declaration in the first Class:

    Code:
    Implements MyInterface
    And off course I wrote all the members for the interface.

    But now I need to also raise an event.

    How can I do that?
    vbExtra: Print preview for VB6, print FlexGrids and more.
    MSDN online for VB6, Language reference.

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    3,834

    Re: Implements with events?

    Quote Originally Posted by Eduardo- View Post
    Hello,

    I wrote the interface that I want for a Class object in another Class.

    Then I have a declaration in the first Class:

    Code:
    Implements MyInterface
    And off course I wrote all the members for the interface.

    But now I need to also raise an event.

    How can I do that?
    VBs Standard-Events will work only on the Default-(Main-)Interface of a given Class.
    The easiest way would be, to just enhance your secondary interface about a kind of "SubScribe"-method,
    which then receives a little CallBack-Object-instance (which itself also implements another interface - one you define for the Events you plan to raise).

    Olaf

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,223

    Re: Implements with events?

    Quote Originally Posted by Schmidt View Post
    VBs Standard-Events will work only on the Default-(Main-)Interface of a given Class.
    The easiest way would be, to just enhance your secondary interface about a kind of "SubScribe"-method,
    which then receives a little CallBack-Object-instance (which itself also implements another interface - one you define for the Events you plan to raise).

    Olaf
    Ok, thank you.
    vbExtra: Print preview for VB6, print FlexGrids and more.
    MSDN online for VB6, Language reference.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width