以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  控件悬停 提示  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=176051)

--  作者:yifan3429
--  发布时间:2022/3/28 19:40:00
--  控件悬停 提示
 Dim Button14 As WinForm.CheckBox
Button14 = e.Form.CreateControl("升序", ControlTypeEnum.CheckBox)
\'Button14.Image = GetImage("SortAndFilter.ico")
\'Button14.Appearance = Appearance.Button
Button14.Width = 30
Button14.Height = 30
Button14.Left = Button.Left + Button.Width
Button14.CheckAlign = ContentAlignment.MiddleCenter    \'控件复选框位置
Button14.Top = 5
Button14.BackColor = Color.White
e.Form.AddControl(Button14)

只要鼠标停留 就会显示的提示  离开就会消失 
试了  ShowToolTip 不要用 对动态的不行吗

--  作者:有点蓝
--  发布时间:2022/3/28 20:29:00
--  
Dim Button14 As WinForm.CheckBox
Button14 = e.Form.CreateControl("升序", ControlTypeEnum.CheckBox)
e.Form.AddControl(Button14)
Button14.ToolTip = "123"

--  作者:yifan3429
--  发布时间:2022/4/1 22:03:00
--  
 Dim lbl As WinForm.Button
    If dr("窗口按键_按键") < > Nothing Then
        Dim Value As String = dr("窗口按键_按键")
        Dim sps() As Char = {"|"}
        Dim Names() As String  = Value.Split(sps)
        Dim s As Integer = 2
        Dim t As Integer = 5
        For i As Integer = 0 To Names.length - 1
            If i <> 0 Then
                If i Mod 3 = 0 Then
                    s = 2
                    t = t  + 31
                Else
                    s = s + 66.5
                End If
            End If
            Dim nm As String = Names(i)
            lbl = Forms("主窗菜单").CreateControl(nm, ControlTypeEnum.Button)
            lbl.Text = nm
            lbl.name = nm
            lbl.Left = s + 8
            lbl.Top = t + 2
            lbl.Width = 66
            lbl.Height = 30
            \'Forms("主窗菜单").AddControl(lbl)
            lbl.FlatStyle = FlatStyle.flat
            \'lbl.BackColor = Color.Sienna
            lbl.BorderSize = 0
            Forms("主窗菜单").Controls("TabControl1").Tabpages(0).AddControl(lbl)
        Next
        lbl.ToolTip = lbl.Text   这个好像只能提示最后一个控件 如何让所有的控件都有提示
    End If
--  作者:有点蓝
--  发布时间:2022/4/2 8:53:00
--  
注意代码位置咯

            \'lbl.BackColor = Color.Sienna
            lbl.BorderSize = 0
            Forms("主窗菜单").Controls("TabControl1").Tabpages(0).AddControl(lbl)
        lbl.ToolTip = lbl.Text   这个好像只能提示最后一个控件 如何让所有的控件都有提示
        Next
    End If