[Another Question] Autoscroll RichTextBox without stealing focus? menu

User Tag List

Results 1 to 5 of 5
  1. #1
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Another Question] Autoscroll RichTextBox without stealing focus?

    Okay, well im here again ><

    This time my question is how can we Autoscroll a RichTextBot without stealing the focus.

    Currently im using richTextBox1.AppendText() to add to the EditBox, I must use a RichExitBox, as I want to use colours, I have the colours working, but when the texts gets to long, it doesn't automatically scroll. So how can I do this without stealing my focus on another window?

    Thanks
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    [Another Question] Autoscroll RichTextBox without stealing focus?
  2. #2
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick and dirty way to do it is just to use sendmessage on the thing. Apoc might know a nicer way, but here's how to do what I said:

    Declarations:
    Code:
    using System.Runtime.InteropServices;
    [DllImport("user32.dll")]
    public static extern IntPtr SendMessage(
    IntPtr window, int message, int wparam, int lparam);
     
    const int WM_VSCROLL = 0x115;
    const int SB_BOTTOM = 7;
    Event Code:
    Code:
    SendMessage(richTextBox1.Handle, WM_VSCROLL, SB_BOTTOM, 0);

  3. #3
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    richTextBox1.ScrollToCarat();

    Done.

  4. #4
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought ScrollToCarat needed focus?

  5. #5
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ReidE96 View Post
    I thought ScrollToCarat needed focus?
    Thats because it does Or atleast it did when I tested it
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

Similar Threads

  1. PvP Gold and Another Question
    By hax0rz in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 01-22-2009, 07:56 PM
  2. THANKS! and another question! hostile/friendly/neutral
    By ShoniShilent in forum WoW Memory Editing
    Replies: 26
    Last Post: 12-02-2008, 03:17 AM
  3. [Question] model changing without modeleditfix.exe
    By sovok in forum WoW ME Questions and Requests
    Replies: 5
    Last Post: 10-18-2007, 06:44 AM
  4. another question
    By Adrenalin3 in forum Art & Graphic Design
    Replies: 0
    Last Post: 05-09-2007, 06:52 PM
  5. Another question regarding Title Screens
    By Naravus in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 04-17-2007, 05:27 PM
All times are GMT -5. The time now is 02:24 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search