How to "click a tab in a TabControl" from code?

donaldc104

Freshman
Joined
Jan 4, 2003
Messages
32
Is there a way to "mouse-click a tab" on the top of a TabControl from code? I've tried several tactics but can't make it work yet.
 
If you mean you want to change the selected tab from code, just do something like this:

Code:
TabControl1.SelectedTag = TabPage1
 
This works great - thanks !

This works great ! Thank you very much, Divil !

Just one small typo: "Tab" not "Tag"

NG: TabControl1.SelectedTag = TabPage1
OK: TabControl1.SelectedTab = TabPage1


I searched high and low and couldn't find this. But it's so obvious after you spell it out.
 
Back
Top