The information in this article applies to:
SUMMARYIf a message box is displayed in a TabStrip control's BeforeClick event handler, the TabStrip control's Click event handler will not be fired, even if the Cancel parameter is set to False. In some situations it may be necessary to validate the information in the BeforeClick event handler and then display a message box to determine if the user wishes to continue. If so, the Click event should be fired. MORE INFORMATIONThe optimum workaround depends upon the situation: Situation 1:If you don't need to reference the TabStrip1.SelectedItem.Index property in the Click event handler, you can call the function directly. For example:
Situation 2:If the Click event handler is called inside the BeforeClick event, the index value has not yet been changed. So if you must reference the TabStrip1.SelectedItem.Index property, you must call the Click event after exiting the BeforeClick event. One solution is to use a Timer control. For example:
REFERENCESFor more information regarding the TabStrip control, especially the BeforeClick and Click events, please see the MSDN Library. Additional query words:
Keywords : kbActiveX kbActivexEvents kbTabCtrl kbVBp kbVBp500 kbVBp600 kbGrpVB kbDSupport |
Last Reviewed: August 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |