回 帖 发 新 帖 刷新版面

主题:如何在VB中实现文本全选?

比如这些文本筐,用什么代码能实现全选文本啊?谢谢 [em14]

回复列表 (共1个回复)

沙发

On error resume next
dim t as control
for each t in form1.controls
   if typeof t is TextBox then 
       t.selStart=0
       t.selLength=Len(t.text)
   End if 
Next

我来回复

您尚未登录,请登录后再回复。点此登录或注册