by adam
23. October 2009 15:44
The following snippet of code can be used to determine whether a Windows Mobile ComboBox is currently dropped down or not:
using Microsoft.WindowsCE.Forms;
...
private const int CB_GETDROPPEDSTATE = 0x0157;
private bool IsComboBoxDroppedDown(ComboBox comboBox)
{
Message comboBoxMessage = Message.Create(comboBox.Handle, CB_GETDROPPEDSTATE,
IntPtr.Zero, IntPtr.Zero);
MessageWindow.SendMessage(ref comboBoxMessage);
return (comboBoxMessage.Result != IntPtr.Zero);
}
