I just cannot get the onFocus (or onEnter) event to work for add in combo box.
The onSelChange works and the update works all the time but I would like to get an event BEFORE you open the scroll of the combo.
Couple of questions to ask first.. Does your addin control support an onFocus or Enter event? Not all add-ins do.... Have you tested whether or not the onFocus event was raised?
in VB I do something like this:
Option Explicit Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As IntegerPrivate Const VK_TAB = &H9 Private Sub Combo1_GotFocus() If IsTabbed Then MsgBox "You used tab" Else MsgBox "You used mouse" End IfEnd Sub Public Function IsTabbed() As Boolean IsTabbed = False If GetKeyState(VK_TAB) And -256 Then IsTabbed = True End IfEnd Function
Finally the order of events is important... you can get some info on them here...
Control.GotFocus Event (System.Windows.Forms)
Retrieving data ...