Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Event is captured in project but not when referenced

Event is captured in project but not when referenced

Scheduled Pinned Locked Moved Visual Basic
comhelptutorial
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fawxes
    wrote on last edited by
    #1

    I have a project with a number of classes from which I've created a dll. Within this project is a usercontrol object. When I reference the dll created from the project I can't handle any events that I've created myself. I can handle the leave event for example. I presume that the event is being raised because if I try and handle it using code inside the initial project containing the usercontrol the evtn is raised and handled. The usercontrol is defined as friend and withevents and all the events are public that I want to handle. The events are passed through three objects. For example, usercontrol1 has a child object1 and object1 has a child object2. usercontrol-->object1-->object2 The initial event is raised in object2, handled by object1 which raises its own event, this is handled by usercontrol which then raises its own event and it is this final event, triggered by the first event, that I want to handle. I seem to figure it will be something to do how I idnetify things (public/private/protected/friend) as it works inside and not outside the project. I just don't know where. Any help would be gratefully appreciated. An optimist's glass is half full. A pesimist's glass is half empty. An engineer goes and gets the right size glass. -- modified at 18:43 Tuesday 20th December, 2005 I've found the solution at: http://www.vbip.com/books/1861004915/chapter\_4915\_09.asp

    F 1 Reply Last reply
    0
    • F Fawxes

      I have a project with a number of classes from which I've created a dll. Within this project is a usercontrol object. When I reference the dll created from the project I can't handle any events that I've created myself. I can handle the leave event for example. I presume that the event is being raised because if I try and handle it using code inside the initial project containing the usercontrol the evtn is raised and handled. The usercontrol is defined as friend and withevents and all the events are public that I want to handle. The events are passed through three objects. For example, usercontrol1 has a child object1 and object1 has a child object2. usercontrol-->object1-->object2 The initial event is raised in object2, handled by object1 which raises its own event, this is handled by usercontrol which then raises its own event and it is this final event, triggered by the first event, that I want to handle. I seem to figure it will be something to do how I idnetify things (public/private/protected/friend) as it works inside and not outside the project. I just don't know where. Any help would be gratefully appreciated. An optimist's glass is half full. A pesimist's glass is half empty. An engineer goes and gets the right size glass. -- modified at 18:43 Tuesday 20th December, 2005 I've found the solution at: http://www.vbip.com/books/1861004915/chapter\_4915\_09.asp

      F Offline
      F Offline
      Fawxes
      wrote on last edited by
      #2

      I've found the solution at: http://www.vbip.com/books/1861004915/chapter\_4915\_09.asp An optimist's glass is half full. A pesimist's glass is half empty. An engineer goes and gets the right size glass.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups