0
我有这个程序应该在选定的选项卡上执行一段代码。我该怎么做? 我已经试过:如何知道在vb.net的选项卡控件中选择了哪个选项卡
if tabcontrol1.tabcount=1 then
'Execute this code'
else if tabcontrol1.tabcount=2 then
'execute this code
end if
- 但是不工作,有什么做的正确方法?
我有这个程序应该在选定的选项卡上执行一段代码。我该怎么做? 我已经试过:如何知道在vb.net的选项卡控件中选择了哪个选项卡
if tabcontrol1.tabcount=1 then
'Execute this code'
else if tabcontrol1.tabcount=2 then
'execute this code
end if
- 但是不工作,有什么做的正确方法?
在Tabcontrol_selected
事件中,您可以使用selectedindex
属性值来获取当前选项卡。