No TabClick event will be raised if the first Tab of the TabControl is selected and I call the SelectTab-method.
Example:
- Tab 1 (the first tab) is selected and
- I call the SelectTab method
I think the following part of the SelectTab-method has an bug:
lR = SendMessageLong(m_hWnd, TCM_SETCURSEL, lIndex, 0) If (lR = 0) Then <= IMO 0 means that the first tab has selected ' Failed.. Else If Not (bNoEvents) Then RaiseEvent TabClick(lIndex + 1) End If End IfAccording to the MSDN the value -1 is returned if SendMessage fails. I think 0 is returned if the first tab has been selected.
|