Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]控件

1楼
苏州老街 发表于:2024/11/21 20:30:00
老师,用户登录窗口的控件不能通过按钮集合代码扫描出来。

Dim tv As WinForm.TreeView = e.Form.Controls("TreeView3")
Functions.Execute("按钮集合",tv)


Dim tv As WinForm.TreeView = Args(0)
tv.Nodes.Clear
Dim nd As WinForm.TreeNode
Dim name As String
Dim sname() As String
For Each f As WinForm.Form In Forms
    name = f.Category
    sname = name.Split("\")
    Dim frmnd As WinForm.TreeNode
    If sname.Length = 1 AndAlso sname(0) = "" Then
        frmnd = tv.Nodes.Add(f.name)
    Else
        If tv.Nodes.Contains(sname(0)) = False Then
            nd = tv.Nodes.Add(sname(0))
        Else
            nd = tv.Nodes(sname(0))
        End If
        For i As Integer = 1 To sname.Length - 1
            If nd.Nodes.Contains(sname(i)) = False Then
                nd = nd.Nodes.Add(sname(i))
            Else
                nd = nd.Nodes(sname(i))
            End If
        Next
        frmnd = nd.Nodes.Add(f.name)
    End If
    Dim opened = f.Opened
    f.Open
    For Each c As object In f.controls
        try
            frmnd.Nodes.Add(c.name, c.name & " | " & c.Text)
        catch ex As exception
            frmnd.Nodes.Add(c.name)
        End try
    Next
    If opened = False Then f.Close
Next
2楼
有点蓝 发表于:2024/11/21 20:40:00
不能是模式窗口,先改为独立窗口,处理完毕再改回模式窗口
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .04688 s, 2 queries.