'为选项添加Tab
<CommandMethod("AddOptionsTab")> _
Public Sub AddOptionsTab()
AddHandler Application.DisplayingOptionDialog, AddressOf OptionsTab1
End Sub
Sub OptionsTab1(ByVal sender As Object, ByVal e As TabbedDialogEventArgs)
Dim Tab As UserControl = New UserContro1
'点击选项对话框的确定按钮事件
Dim OnPress As TabbedDialogAction = New TabbedDialogAction(AddressOf OnButtonOK)
e.AddTab("新添加的Tab", New TabbedDialogExtension(Tab, OnPress))
End Sub
Sub OnButtonOK()
MsgBox("这是你新添加的Tab")
End Sub
<CommandMethod("AddOptionsTab")> _
Public Sub AddOptionsTab()
AddHandler Application.DisplayingOptionDialog, AddressOf OptionsTab1
End Sub
Sub OptionsTab1(ByVal sender As Object, ByVal e As TabbedDialogEventArgs)
Dim Tab As UserControl = New UserContro1
'点击选项对话框的确定按钮事件
Dim OnPress As TabbedDialogAction = New TabbedDialogAction(AddressOf OnButtonOK)
e.AddTab("新添加的Tab", New TabbedDialogExtension(Tab, OnPress))
End Sub
Sub OnButtonOK()
MsgBox("这是你新添加的Tab")
End Sub
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |