[dba-VS] Using RemoveHandler in a Combobox Base Class

Charlotte Foust charlotte.foust at gmail.com
Wed Jun 3 15:39:41 CDT 2015


Why remove the handler rather than branching the code in it?

Charlotte Foust
(916) 206-4336

On Wed, Jun 3, 2015 at 8:09 AM, Dan Waters <df.waters at outlook.com> wrote:

> I have a combobox base class (a custom control) which will cause the
> combobox to drop down when the control is entered and the selectedindex =
> -1
> (it's empty).  This is a convenience for users.
>
>
>
> However, I recently discovered that when the combobox is dropped down, its
> SelectedIndexChanged event also fires, which I want to prevent. In the code
> behind the form, I can just use
>
>
>
> RemoveHandler cboName.SelectedIndexChanged, AddressOf
> cboName_SelectedIndexChanged
>
>
>
> But in the base class, I don't know how to specify what the address is for
> the combobox on the form.
>
>
>
> This is where I'm stuck:
>
> RemoveHandler, Me.SelectedIndexChanged, AddressOf [What is the address?]
>
>
>
> How can this be done?
>
>
>
> Thanks!
>
> Dan
>
>
>
> _______________________________________________
> dba-VS mailing list
> dba-VS at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vs
> http://www.databaseadvisors.com
>


More information about the dba-VS mailing list