PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Marc van Cauwenberghe on March 21, 2010, 08:05:37 AM

Title: Tab Change
Post by: Marc van Cauwenberghe on March 21, 2010, 08:05:37 AM
Hello,

Is there any way to detect the a user has changed Tab in a Tabcontrol?

Regards,
Marc
Title: Re: Tab Change
Post by: Rolf Brandt on March 21, 2010, 08:35:54 AM
Hi Marc,

you might try this:
Function FORM1_WM_NOTIFY ( _
                         hWndForm     As Dword,     _  ' handle of Form
                         idCtrl       As Dword,     _  ' control ID
                         ByVal pNMHDR As NMHDR Ptr  _  ' pointer to NMHDR structure
                         ) As Long

   Select Case idCtrl
      Case IDC_FORM1_TABCONTROL1
         Select Case @pNMHDR.Code
            Case %TCN_SELCHANGE
               MsgBox "Bingo2
         End Select
   End Select
End Function


It will though fire also when the form loads.
Title: Re: Tab Change
Post by: Marc van Cauwenberghe on March 21, 2010, 08:38:37 AM
Hey Rolf,

Thank you, will try it.

Regards,
Marc
Title: Re: Tab Change
Post by: Rolf Brandt on March 21, 2010, 08:40:42 AM
With
FF_TabControl_GetSelectedTab
you can check which Tab is selected.