473,394 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ComboBox MouseDoubleClick Event Never Fires

Hello All,

For some reason, the MouseDoubleClick event for my ComboBox does not
appear to be working. I am not subscribed to any other events for this
control. I pulled out Spy++ and noticed that the WM_LBUTTONDBCLICK
message is indeed occurring. The ComboBox does not provide a
DoubleClick event like other controls do.

The Windows application is being developed in VS 2005.

Any ideas?

Thank you in advance,

--
Sean
Sep 15 '06 #1
4 14603
"The ComboBox does not provide a DoubleClick event like other controls do."
.......and therein lies the answer.

every time you left click the WM_LBUTTONDBCLICK will fire, doesn't mean your
combo is listening to it. You have to assign that event to the combo. In
visual studio this is really easy, in the designer click the combo, in the
properties windo on the right click the lightening symbol and scroll down to
the left click or whatever event it is (cant remember exact name of my head)
and double click in there. it hooks the event and creates the method for
you. Put your code in that method .

"senfo" <en**********@yahoo.comI-WANT-NO-SPAMwrote in message
news:eV**************@TK2MSFTNGP06.phx.gbl...
Hello All,

For some reason, the MouseDoubleClick event for my ComboBox does not
appear to be working. I am not subscribed to any other events for this
control. I pulled out Spy++ and noticed that the WM_LBUTTONDBCLICK
message is indeed occurring. The ComboBox does not provide a DoubleClick
event like other controls do.

The Windows application is being developed in VS 2005.

Any ideas?

Thank you in advance,

--
Sean

Sep 15 '06 #2
Daniel wrote:
"The ComboBox does not provide a DoubleClick event like other controls do."
......and therein lies the answer.

every time you left click the WM_LBUTTONDBCLICK will fire, doesn't mean your
combo is listening to it. You have to assign that event to the combo. In
visual studio this is really easy, in the designer click the combo, in the
properties windo on the right click the lightening symbol and scroll down to
the left click or whatever event it is (cant remember exact name of my head)
and double click in there. it hooks the event and creates the method for
you. Put your code in that method .
Hi Daniel,

Thank you for your reply. The problem isn't with subscribing to the
event, the problem is that the event is never raised. Some controls
provide the "Action" events Click, DoubleClick, MouseClick, and
MouseDoubleClick. The MouseClick events are similar to the Click
events; however, the MouseEvent events have an extended EventArgs class
for providing more detail about the click. The ComboBox control does
not provide the DoubleClick event; however, the other three (Click,
MouseClick, and MouseDoubleClick) do exist.

The *only* event that I subscribe to on the ComboBox is the
MouseDoubleClick event. I've read cases where the MouseDoubleClick
event is not raised when, for example, you subscribe to the Click event.
However, since I am not subscribed to anything else, I don't
understand why the event would not be raised.

Thank you again,

--
Sean
Sep 15 '06 #3
Hi again ok to make it easier...

Assuming you want the value of the combo at the point of change (when the
click a choice)

You want to double click the event that says SelectionValueChanged

Then do this int he method created

private void comboBox1_SelectedValueChanged(object sender, EventArgs e)

{

ComboBox senderComboBox = (ComboBox)sender;

MessageBox.Show(senderComboBox.Text);

}

Code above will fire a message box showing the value selected. Anything you
need you can access from the senderComboBox .

"senfo" <en**********@yahoo.comI-WANT-NO-SPAMwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Daniel wrote:
>"The ComboBox does not provide a DoubleClick event like other controls
do."
......and therein lies the answer.

every time you left click the WM_LBUTTONDBCLICK will fire, doesn't mean
your
combo is listening to it. You have to assign that event to the combo. In
visual studio this is really easy, in the designer click the combo, in
the
properties windo on the right click the lightening symbol and scroll down
to
the left click or whatever event it is (cant remember exact name of my
head)
and double click in there. it hooks the event and creates the method for
you. Put your code in that method .

Hi Daniel,

Thank you for your reply. The problem isn't with subscribing to the
event, the problem is that the event is never raised. Some controls
provide the "Action" events Click, DoubleClick, MouseClick, and
MouseDoubleClick. The MouseClick events are similar to the Click events;
however, the MouseEvent events have an extended EventArgs class for
providing more detail about the click. The ComboBox control does not
provide the DoubleClick event; however, the other three (Click,
MouseClick, and MouseDoubleClick) do exist.

The *only* event that I subscribe to on the ComboBox is the
MouseDoubleClick event. I've read cases where the MouseDoubleClick event
is not raised when, for example, you subscribe to the Click event.
However, since I am not subscribed to anything else, I don't understand
why the event would not be raised.

Thank you again,

--
Sean

Sep 15 '06 #4
Daniel wrote:
Hi again ok to make it easier...

Assuming you want the value of the combo at the point of change (when the
click a choice)

You want to double click the event that says SelectionValueChanged

Then do this int he method created

private void comboBox1_SelectedValueChanged(object sender, EventArgs e)

{

ComboBox senderComboBox = (ComboBox)sender;

MessageBox.Show(senderComboBox.Text);

}
Hi Daniel,

Thank you again for your reply. Unfortunately, this won't work for me.
I really need the double click event to be raised.

I read in a blog post somewhere that the ComboBox has an internal
TextBox, which "eats" the DoubleClick event. I have not confirmed this,
nor have I found a workaround other than using a timer.

Thank you again,

--
Sean
Sep 18 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Wajih-ur-Rehman | last post by:
I am developing a C# app. I want to do something when someone double clicks on a combo box. But this event never fires. Any suggestions? Thanx!
4
by: Randy | last post by:
Hello, I've got a Form which has a dataGrid on it. In one of the columns of the dataGrid, I've implemented a ComboBox using a DataGridComboBoxColumn Class. I've also over ridden the other...
2
by: blue_nirvana | last post by:
I use a AddHandler statement in the load event of a form to assoicate a routine with a combobox. When I populate the form, I select the approiate value from the combobox by using...
5
by: docw | last post by:
SelectionChangeCommitted event fires twice Hi, Please have a look at the following ComboBox behavior. With the code below, if you click in the dropdown list with the mouse to select an item ,...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
2
by: David Jackson | last post by:
Hello, I have an unbound DataGridView of which one of the columns is a ComboBox colum containing category data, plus an additional option called <newSo when the ComboBox is dropped down it looks...
0
by: =?Utf-8?B?RWQgQ29oZW4=?= | last post by:
I am having trouble getting any of the combo boxes to respond to a mouse double click. Nothing happens! I do get a response using the mousedown event, but not a mousedouble click event. I am using...
1
by: Jacob | last post by:
For some reason, the MonthCalendar class (control) does not show the MouseDoubleClick method (event) in the VS IDE. I added an event handler but can't get the succker to fire the event it points...
12
by: Gerhard | last post by:
This is bizarre... Im having problems with the combobox AfterUpdate event: Im running Access 2003. I created an unbound combobox with 3 columns on a form. The Row Source is from a table....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.