Foxtable(狐表)用户栏目专家坐堂 → [求助]怎样判断窗口打开并且GroupBox页面是第几个


  共有2754人关注过本帖平板打印复制链接

主题:[求助]怎样判断窗口打开并且GroupBox页面是第几个

帅哥哟,离线,有人找我吗?
紫色幽魂
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:682 积分:5382 威望:0 精华:0 注册:2015/1/23 0:31:00
[求助]怎样判断窗口打开并且GroupBox页面是第几个  发帖心情 Post By:2018/6/28 17:52:00 [只看该作者]

这段代码写在table表里面,计划在窗口打开的时候,并且页面是第一个就执行第一段代码,第二段就执行第二段代码,这个应该怎么改

If Forms("工厂无损录入主界面").Opened = True Then
    If Forms("工厂无损录入主界面").Controls("GroupBox2").SelectedIndex = 0
        '遍历检测方法
        For Each c As Winform.Control In Forms("工厂无损录入主界面").Controls
            If Typeof c Is WinForm.RadioButton Then
                Dim t As WinForm.RadioButton = c
                If t.Name.StartsWith("检测方法") And t.Checked Then
                    e.DataRow("适用类型") = t.Text
                End If
            End If
        Next
    ElseIf Forms("工厂无损录入主界面").Controls("GroupBox2").SelectedIndex = 1
        For Each c As Winform.Control In Forms("工厂无损录入主界面").Controls
            If Typeof c Is WinForm.RadioButton Then
                Dim t As WinForm.RadioButton = c
                If t.Name.StartsWith("单位") And t.Checked Then
                    e.DataRow("单位") = t.Text
                End If
            End If
        Next
    End If
End If

 回到顶部