以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  按钮名称关联  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=115059)

--  作者:yifan3429
--  发布时间:2018/2/28 14:36:00
--  按钮名称关联
Dim tab As WinForm.TabControl = e.Form.Controls("TabControl1")
Dim Name As String = "会议记录"    需要等于当前所在按钮的名称 e.Form.Controls("Button1")  我想动态署名
If tab.TabPages(name) Is Nothing Then
    tab.TabPages.Add(name,name)
    Dim pb = tab.BaseControl
    Forms(Name).OPEN(-1000,-1500)
    Forms(Name).BaseForm.TopLevel = False
    Forms(Name).BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
    Forms(Name).BaseForm.Dock = System.Windows.Forms.DockStyle.Fill
    PB.TabPages(name).Controls.Clear
    PB.TabPages(name).Controls.add(Forms(Name).BaseForm)
End If
tab.SelectedPage = tab.TabPages(name)

--  作者:有点甜
--  发布时间:2018/2/28 15:15:00
--  
Dim Name As String = e.Form.Controls("Button1").Text
--  作者:yifan3429
--  发布时间:2018/2/28 17:31:00
--  
Dim Name As String = e.Form.Controls("Button1").Text

我需要不断的 复制按钮

那么  Button1 就不行了  需要动态修改 按钮标题

--  作者:有点甜
--  发布时间:2018/2/28 17:34:00
--  

改成

 

Dim Name As String = e.Sender.Text