不可以,我的意思是说,只是选中文本(high light),而后不做任何操作。程序就对所选字符进行处理。

解决方案 »

  1.   

    那用timer控件,每隔一定的时间,检查所有能接受用户输入的控件,如果seltext不为空,就操作行吗?
      

  2.   

    如果是捕获你工程内的,可以使用类似下面的方法
    private text1_mousemove(button,x,y)
     if button=vbleftbutton then
        text2.text=text1.seltext
     end if
    end sub
    如果是捕获windows的,只能使用api
      

  3.   

    the Seltext method only can be used in textfield, but i am using ricgtextbox, it's no effective in richtextbox.
      

  4.   

    你的提示很有用,谢谢,但是我使用的是rich text box, 按照你的方法就不可以了。你能告诉我另外的方法吗?谢谢!
      

  5.   

    这样那Private Sub RichTextBox1_SelChange()
      MsgBox "选择了"
    End Sub
      

  6.   

    如果这样可不可以?
    Private Sub RichTextBox1_SelChange()
       'MsgBox "有了"
       Dim seltxt As String
       seltxt = RichTextBox1.SelText
       MsgBox seltxt
    End Sub
      

  7.   

    有了你的帮助,选中文本的问题解决了。先放分,感谢大家。有可能的话,你能告诉我鼠标取词怎么做吗?我的email: [email protected]