Intercepting closing DropDown of a ComboBox

C

Carlo

Good morning

I've not found an event that notify me when drop-down part of a BomboBox is
closed. OnDropDown just notify when the drop-down is displayed, not when it
is closed.

Is there a message in WndProc that can be used to intercept a drop-down
closing?

Thank you very much.

Carlo
 
H

Herfried K. Wagner [MVP]

Carlo said:
I've not found an event that notify me when drop-down part of a BomboBox
is closed. OnDropDown just notify when the drop-down is displayed, not
when it is closed.

Is there a message in WndProc that can be used to intercept a drop-down
closing?

Listen for 'WM_COMMAND' of the parent window and check if 'wParam''s
high-order word is 'CBN_CLOSEUP'.
 
C

Carlo

Hello Herfried,
thank you for your help.

The problem is that I don't have a parent window available (do you means
parent form?) because I'm working on a control that inherits from
System.Windows.Forms.ComboBox.
I checked all messages raised by WndProc of my ComboBox, but I've seen any
WM_COMMAND.

Carlo
 
C

Claes Bergefall

C

Carlo

This is exactly what I was searching for!

Thank you to Herfried and thank you to Claes.

Carlo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top