none
Force vertical scroll of rich text box on the top of the report after run RRS feed

  • Question

  • Is there any control in rich text box to make the vertical scroll on the top of the report (after the run), that in my case the scroll in the bottom of the report and I don't know how to forced in the top of the report?

    Hany Metry

    Sunday, June 5, 2016 10:35 AM

Answers

All replies

  • RichTextBox1.SelectionStart = 0

    RichTextBox1.ScrollToCaret


    La vida loca

    • Marked as answer by Hany Metry Sunday, June 5, 2016 2:39 PM
    Sunday, June 5, 2016 11:07 AM
  • RichTextBox1.SelectionStart = 0
    RichTextBox1.ScrollToCaret()
    I wrote the above code but that not solve the problem, still the scroll in the bottom of the rich text box

    Hany Metry

    Sunday, June 5, 2016 11:20 AM
  • RichTextBox1.SelectionStart = 0
    RichTextBox1.ScrollToCaret()
    I wrote the above code but that not solve the problem, still the scroll in the bottom of the rich text box

    Hany Metry

    Perhaps the description of the issue you provided is confusing or inaccurate. Code works for me. The code forces vertical scroll of RichTextBox whether a RichTextBox is on anything.

        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            RichTextBox1.SelectionStart = 0
            RichTextBox1.ScrollToCaret()
        End Sub


    La vida loca

    Sunday, June 5, 2016 11:58 AM
  • I put the code in form20 load and rich text box is the main content of form20.

    Hany Metry

    Sunday, June 5, 2016 12:35 PM
  • try using form20_Shown instead...

    thanks for any help

    • Marked as answer by Hany Metry Sunday, June 5, 2016 2:39 PM
    Sunday, June 5, 2016 12:50 PM
  • I put the code in form20 load and rich text box is the main content of form20.

    Hany Metry


    When does the RTB have information placed in it causing it to scroll? You need to run the code after that occurs or sometime after the Form displays and the RTB has scrolled. Code can not to foresee the future and perform at some point in the future foreseen.

    La vida loca

    Sunday, June 5, 2016 1:50 PM