[RESOLVED] TabControl and Click Control
I have a form with a tabcontrol with several tabs.
When the user clicks on the final tab - I want that tabclick to be the same as the "click" on a command button and run the code ...
is there an easy way to do this? I can't seem to find a "tab_click" --
Thanks!
Re: TabControl and Click Control
Capture the Tabcontrol.tabindexchanged event.
Enter a handler in your form startup or main like:
VB Code:
AddHandler tabControl1.SelectedIndexChanged, AddressOf tab_changed
Then a sub that does what you want it to do when the last item is clicked, i.e:
VB Code:
Public Sub tab_changed(ByVal sender As Object, ByVal e As EventArgs)
If tabControl1.SelectedIndex = tabControl1.TabCount - 1 Then MsgBox("hi")
End Sub
Bill
Re: TabControl and Click Control
GREAT, thank you!
I'll give that a shot!
Worked great ... thank you!