[dba-VS] Using RemoveHandler in a Combobox Base Class
Dan Waters
df.waters at outlook.com
Wed Jun 3 16:00:25 CDT 2015
Hi Charlotte,
I will add the handler back in a few lines of code down.
What do you mean 'branching the code'?
Dan
-----Original Message-----
From: dba-VS [mailto:dba-vs-bounces at databaseadvisors.com] On Behalf Of
Charlotte Foust
Sent: Wednesday, June 03, 2015 3:40 PM
To: Development in Visual Studio
Subject: Re: [dba-VS] Using RemoveHandler in a Combobox Base Class
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
>
_______________________________________________
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