谢了

解决方案 »

  1.   

    Private Sub Command1_Click()
        RichTextBox1.SetFocus
        SendKeys "{End}"
    End Sub
      

  2.   

    RichTextBox1.SelStart=Len(RichTextBox1)
      

  3.   

    如果是用鼠标点击richtextbox ,那么还能实现上述效果吗
      

  4.   

    RichTextBox1.SetFocus
        SendKeys "^{End}"
      

  5.   

    If richtextbox1.visible=true and richtextbox1.enabled=true then
        richtextbox1.setfocus
        sendkeys "{end}"
    end if
      

  6.   

    如果是用鼠标点击richtextbox ,那么还能实现上述效果吗
    ------------user a timer:Private Sub Form_Load()
    RichTextBox1.Text = String(300, "x")
    Timer1.Enabled = True
    Timer1.Interval = 100
    End SubPrivate Sub Timer1_Timer()
    If Me.ActiveControl = RichTextBox1 Then SendKeys "^{end}"
    End Sub
      

  7.   

    在gotfocus事件里加入
    RichTextBox1.SelStart=Len(RichTextBox1)
      

  8.   

    RichTextBox1.SelStart = Len(RichTextBox1.Text)
    RichTextBox1.SetFocus
      

  9.   

    With Text1
            .SelStart = Len(.Text)
            .SelLength = 1
            .SetFocus
        End With
      

  10.   


    回复 northwolves(狼行天下 
    user a timer:Private Sub Form_Load()
    RichTextBox1.Text = String(300, "x")
    Timer1.Enabled = True
    Timer1.Interval = 100
    End SubPrivate Sub Timer1_Timer()
    If Me.ActiveControl = RichTextBox1 Then SendKeys "^{end}"
    End Sub这样虽能实现,但不停地sendkeys好像太浪费资源了,没有别的办法啦
      

  11.   

    这样就可以了,呵呵Private Sub Form_Load()
    RichTextBox1.Text = String(300, "x")
    End SubPrivate Sub RichTextBox1_Click()
        SendKeys "{End}"
    End Sub
      

  12.   

    回复 northwolves(狼行天下) 
    Private Sub RichTextBox1_Click()
        SendKeys "{End}"
    End Sub
    ---------------------
    对了。最好是SendKeys "^{End}"
    谢谢帮忙。