Re: click event in .net

  • From: "Richard Thomas" <rthomas@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 25 Dec 2007 07:34:03 -0500

Hi Teddy:
Diferent controls have diferent events. You can assign multiple events to a single Sub by adding the event to the Handles list for the Sub like: Private Sub btnCancel_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) _

Handles btnCancel.Click, btnCancel.DoubleClick

I'm not sure it is called DoubleClick but you get the idea? This does work for other multi-selection Subs I've set up.

Also, you have to set some properties to get specific enter key functionallity along with the Event Subs if you want the Enter Key to work in the Box, or not, depending on your requirements.

Rick Farmington Mich/. USA


Couldn't you assign both events to the same Sub so it is executed when either is clicked?
Rick Farmington Mich. USA
Message ----- From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, December 23, 2007 2:07 PM
Subject: Re: click event in .net


Maybe we are just saying it differently -- I think a .NET control can
handle both events, but the click event will fire twice, once on its own
and once when the double click event fires.

Jamal
On Sun, 23 Dec 2007, Octavian
Rasnita wrote:

Date: Sun, 23 Dec 2007 10:35:58 +0200
From: Octavian Rasnita <orasnita@xxxxxxxxx>
Reply-To: programmingblind@xxxxxxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: click event in .net

Ok, thanks. So it seems that a control in a .net application cannot handle
both the click and the doubleClick events.

However I think that this is not true for all the controls... I am thinking
that a list box should accept the click event and also accept the double
click event...

Octavian

----- Original Message -----
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Sunday, December 23, 2007 4:18 AM
Subject: Re: click event in .net


> According to the documentation at the page
>
> "Control.DoubleClick Event (System.Windows.Forms)"
> 
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.doubleclick.aspx
>
> a double click event can be handled by a WinForm control, but a click
> event will also be handled at that time.  If you do not want the click
> event to be handled as well, you may have to override its default > handler.
>
> Hope this helps,
> Jamal
>
> On Sun,
> 23 Dec 2007, Octavian Rasnita
> wrote:
>
>> Date: Sun, 23 Dec 2007 00:45:23 +0200
>> From: Octavian Rasnita <orasnita@xxxxxxxxx>
>> Reply-To: programmingblind@xxxxxxxxxxxxx
>> To: programmingblind@xxxxxxxxxxxxx
>> Subject: Re: click event in .net
>>
>> Ok, thanks, it is not a big problem anyway.
>> But I think it could be helpful if you could show us how can this be >> done
>> in
>> VS.net 2008.
>>
>>
>> Octavian
>>
>> ----- Original Message -----
>> From: "Eunice Klicker" <cattleya@xxxxxxxxxxxxxx>
>> To: <programmingblind@xxxxxxxxxxxxx>
>> Sent: Saturday, December 22, 2007 11:41 PM
>> Subject: Re: click event in .net
>>
>>
>> > Ok, I might have to eat my words here...What version of .Net are you
>> > using? I just took a cursory look for it in my 2008 version, and
>> > couldn't
>> > find it, and to look in 2005 I'll have to install it, but I'm >> > willing
>> > to
>> > if that is the version your using.  Besides, never know when it will
>> > come
>> > in handy, and was going to anyways, but if your using 2005 it will
>> > force
>> > me to quit procrastinating. LOL. Anyways, what I meant by eating >> > my >> > words is this. I should have said, I think it's possible. I think >> > I
>> > remember seeing how to do it, but I'm not absolutely positive as I
>> > don't
>> > have VS2005 open in front of me and I'll take a better look around
>> > 2008.
>> >
>> > ----- Original Message -----
>> > From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
>> > To: <programmingblind@xxxxxxxxxxxxx>
>> > Sent: Saturday, December 22, 2007 12:48 PM
>> > Subject: Re: click event in .net
>> >
>> >
>> >> Oh yes, please tell me how, if it is possible.
>> >>
>> >> Thank you.
>> >>
>> >> Octavian
>> >>
>> >> ----- Original Message -----
>> >> From: "Eunice Klicker" <cattleya@xxxxxxxxxxxxxx>
>> >> To: <programmingblind@xxxxxxxxxxxxx>
>> >> Sent: Saturday, December 22, 2007 7:37 PM
>> >> Subject: Re: click event in .net
>> >>
>> >>
>> >>> Yes, I've seen how it can be done, and if you need help getting it
>> >>> I'll
>> >>> be glad to.
>> >>>
>> >>> ----- Original Message -----
>> >>> From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
>> >>> To: <programmingblind@xxxxxxxxxxxxx>
>> >>> Sent: Saturday, December 22, 2007 11:28 AM
>> >>> Subject: click event in .net
>> >>>
>> >>>
>> >>>> Hi,
>> >>>>
>> >>>> I've seen that the Click event for a button in .net (C#) is >> >>>> actually
>> >>>> an
>> >>>> OnMouseDown event, because if I press the mouse button on a >> >>>> button
>> >>>> in a
>> >>>> .net app, the event is fired immediately, before allowing me to
>> >>>> depress
>> >>>> the mouse button.
>> >>>>
>> >>>> In this case, is it possible in a .net application to create a
>> >>>> button
>> >>>> that has 2 events, a Click event, and a DoubleClick event?
>> >>>>
>> >>>> Thank you.
>> >>>>
>> >>>> Octavian
>> >>>>
>> >>>> __________
>> >>>> View the list's information and change your settings at
>> >>>> //www.freelists.org/list/programmingblind
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>> __________
>> >>> View the list's information and change your settings at
>> >>> //www.freelists.org/list/programmingblind
>> >>>
>> >>
>> >> __________
>> >> View the list's information and change your settings at
>> >> //www.freelists.org/list/programmingblind
>> >>
>> >>
>> >
>> >
>> > __________
>> > View the list's information and change your settings at
>> > //www.freelists.org/list/programmingblind
>> >
>>
>> __________
>> View the list's information and change your settings at
>> //www.freelists.org/list/programmingblind
>>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: