I have an SSTab control with 4 tabs. I need the user to be able to cycle through the tabs using the keystroke: alt-f ...(crtl-tab works by default, but I also need alt-f). ...
THE PROBLEM is that there's apparently a bug (see KB article: 149273) in the SSTab control whereby key events get fired twice. I'm noticing this behavior: if I click a tab and then use alt-f to switch between them, it skips a tab... Interestingly, the alt-f behavior is fine *until* I click a tab with the mouse, after which point the key event gets fired twice every time I hit alt-f...
I'm looking for a workaround, or a fix of some sort... The Knowledgebase article suggests using a global to ignore the 2nd keyevent if focus is on the sstab, but this will not work for me as I need alt-f to work regardless of what control has focus (ie, the sstab may already have focus anyway)...
Here's the code I'm using (keyPreview = true is set in form load...), and the Microsoft Knowledgebase article describing the aforementioned bug in sstab:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbAltMask Then
Select Case KeyCode
Case vbKeyF: Call moveToNextTab
Private Sub moveToNextTab
If SSTab1.Tab >= 3 Then
SSTab1.Tab = 0
SSTab1.Tab = SSTab1.Tab + 1