• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

Go to a specific line number in RichTextBox

How can I go to a specific line number in a RichTextBox control ?

Thanks
0
delphi112497
Asked:
delphi112497
  • 2
  • 2
1 Solution
 
vigridCommented:
http://www.freevbcode.com/ShowCode.asp?ID=5434

Just look here. An answer for your question.
0
 
vigridCommented:
Sorry. That was only VB5/6 code. Here's a tip how to do it in .NET (C# version only, but it's all the same functionality)

http://www.syncfusion.com/FAQ/WinForms/FAQ_c89c.asp (point 22.6)

HTH. If you need a translation to VB.NET - tell me.
0
 
delphi112497Author Commented:
vigrid, can you please give me the VB.NET translation ?

I tried this but it didn't work:

SendMessage((HWND)richTextBox1->Handle.ToPointer(), 187, 5, NULL);
richTextBox1->Focus();

thanks!
0
 
delphi112497Author Commented:
never mind ... I thought you meant a translation from VB -> C ...

thanks a lot!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now