Results 1 to 3 of 3

Thread: Addhandler

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325

    Question Addhandler

    I have a problem with this code:
    VB Code:
    1. dim y as long =1
    2.  
    3. private sub mysub()
    4.     dim x as new myclass()
    5.     addhandler x.raisedevent,addressof eventdriver
    6.  
    7.     while y=1
    8.         application.doevents
    9.     end while
    10. end sub
    11.  
    12. private sub eventdriver()
    13.     y=0
    14. end sub
    I noticed that eventdriver is never fired. Why?
    Learn, this is the Keyword...

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Because nothing is firing the event. What in myclass is suppose to fire the event?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    myclass is a tcp connection class that i created. I'm sure this class works, and that it fires events.
    Learn, this is the Keyword...

Posting Permissions

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



Click Here to Expand Forum to Full Width