The following snippet of code can be used to determine whether a Windows Mobile ComboBox (in .NET Compact Framework) is currently dropped down or not:
1 2 3 4 5 6 7 8 9 10 11 12 | 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); } |