以文本方式查看主题

-  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=75172)

--  作者:苍风霁月
--  发布时间:2015/9/29 11:04:00
--  引用系统自带的查找功能,能否用代码设置默认匹配方式?
如题?
--  作者:大红袍
--  发布时间:2015/9/29 11:08:00
--  

全局代码

 

Public Sub textBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Keys.Enter
    sender.parent.Controls("FindNext").PerformClick
End If
End Sub

 

计划管理

 

Dim frm = Windows.forms.Form.ActiveForm
If frm IsNot Nothing Then
    If frm.name = "Class108" Then
        Dim ContentFind As windows.Forms.ComboBox = frm.controls("ContentFind")
        removehandler ContentFind.Keydown, addressof textbox1_keydown
        addhandler ContentFind.Keydown, addressof textbox1_keydown
    End If
End If


--  作者:大红袍
--  发布时间:2015/9/29 11:19:00
--  

简单一点

 

static sfrm = Nothing
Dim frm = Windows.forms.Form.ActiveForm
If frm IsNot Nothing Then
    If frm.name = "Class108" AndAlso (sfrm Is Nothing OrElse sfrm.tostring <> frm.tostring) Then
        frm.controls("MatchMode").Text = "任意位置"
        sfrm = frm
    End If
End If


--  作者:苍风霁月
--  发布时间:2015/9/29 12:03:00
--  
谢谢!
--  作者:shenyl0211
--  发布时间:2015/9/29 21:45:00
--  

那么如何不选不常用的“区分大小写”?

替换中的替换方式“全部内容”如何改为“匹配内容”呢?


--  作者:大红袍
--  发布时间:2015/9/29 21:48:00
--  

你循环每个控件,看看文件名是什么就知道怎么做了。如

 

For each c As Object in frm.Controls

    output.Show(c.Name & " " & c.Gettype.Name)

Next


--  作者:shenyl0211
--  发布时间:2015/9/29 23:31:00
--  
谢谢
--  作者:wangglby
--  发布时间:2020/3/18 22:09:00
--  
请问要把这代码放在哪里?
--  作者:有点蓝
--  发布时间:2020/3/19 9:15:00
--  
这个用法已经过时无法使用