experchange > vb.* > vb.winapi

jason.vanbrackel (06-29-05, 03:15 PM)
I have a SSTab on a VB6 form that I need to click on the onchange even
of another control. I'm trying to use this code to do it. But it is
not acting as I would like. It's not throwing an error, but its not
clicking the tab either.

Private Sub InitializeTab(lConsTypeID As Long)
'Hide all the tabs
sstDetails.TabVisible(0) = False
sstDetails.TabVisible(1) = False
sstDetails.TabVisible(2) = False
sstDetails.TabVisible(3) = False
sstDetails.TabVisible(4) = False

'Show the necessary tab
sstDetails.Visible = True
sstDetails.TabVisible(m_colDbToTabs(CStr(lConsType ID))) = True
sstDetails.SetFocus
Call SendMessageBynum(sstDetails.hWnd, WM_LBUTTONDOWN, 0, 0)
Call SendMessageBynum(sstDetails.hWnd, BM_SETSTATE, 1, 0)
Call SendMessageBynum(sstDetails.hWnd, WM_LBUTTONUP, 0, 0)
End Sub
Ken Halter (06-29-05, 04:25 PM)
<jason.vanbrackel> wrote in message
news:5550
[..]
> Call SendMessageBynum(sstDetails.hWnd, BM_SETSTATE, 1, 0)
> Call SendMessageBynum(sstDetails.hWnd, WM_LBUTTONUP, 0, 0)
> End Sub


To select an SSTab tab, just use:

SSTab1.Tab = YourZeroBasedNumber
jason.vanbrackel (06-29-05, 08:34 PM)
Thanks Ken. Talk about completely overlooking the obvious DUH!.
Ken Halter (06-30-05, 12:10 AM)
<jason.vanbrackel> wrote in message
news:5760
> Thanks Ken. Talk about completely overlooking the obvious DUH!.


The ol' "Trees/Forest" problem eh?... We've all been there <g>
Similar Threads