• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • 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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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