How can I know if a .net event is already handled?

前端 未结 8 2154

I\'ve written some code to handle an event as follows:

AddHandler myObject.myEvent, AddressOf myFunction

It seemed that everything was work

8条回答
  •  抹茶落季
    2020-12-31 10:19

    You may use IsHandleCreated property to check your event already has an handle or not.

      If e.Control.IsHandleCreated = False Then
                AddHandler e.Control.KeyPress, AddressOf TextBox_keyPress
      End If
    

提交回复
热议问题