Foxtable(狐表)用户栏目专家坐堂 → [求助]每一窗口的菜单按钮刚开始必须按两下才能使用,关闭窗口重新打开又得按两下,有项目


  共有2337人关注过本帖树形打印复制链接

主题:[求助]每一窗口的菜单按钮刚开始必须按两下才能使用,关闭窗口重新打开又得按两下,有项目

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/7/27 9:12:00 [显示全部帖子]

Dim tab As WinForm.TabControl = Forms("主界面").Controls("导航")
tab.Select

For ig As Integer = 0 To tab.TabPages.Count -1
    If Forms("主界面").Controls("导航").TabPages(ig).text = "窗口1" Then
        Forms("主界面").Controls("导航").SelectedIndex = ig
        Return
    End If
Next
Dim Name As String = "窗口1"

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)
tab.SelectedPage = tab.TabPages(name)


 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/7/27 9:33:00 [显示全部帖子]

Dim tab As WinForm.TabControl = Forms("主界面").Controls("导航")
For ig As Integer = 0 To tab.TabPages.Count -1
    If tab.TabPages(ig).text = "窗口1" Then
        tab.SelectedIndex = ig
        tab.Form.Select
        tab.Select
        Return
    End If
Next
Dim Name As String = "窗口1"

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)
tab.SelectedPage = tab.TabPages(name)
tab.Form.Select
tab.Select


 回到顶部