unassign event

Discussion in 'Questions (Windows Mobile)' started by paul j, Dec 15, 2007.

  1. paul j

    paul j Member Licensed User

    On runtime I add events to an object (e.g. onFocus to a textbox), but on closing the form the event stays active so I get errors when swithing to an other form. I cant find a way to remove te event from the object. Is it possible any way?
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can't remove the event.
    You can do something like:
    Sub Globals
     handleFocus = 
    true 'you can use an array or an arraylist instead.
    End Sub

    Sub TextBox_GotFocus
    If Not(handleFocus) then return
    End Sub
  3. paul j

    paul j Member Licensed User

    That's a possible solution. thanks Erel
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice