How to launch a process which will open a text file in any editor and automatically move cursor to a certain line number?

后端 未结 3 617
长情又很酷
长情又很酷 2021-01-05 04:22

From c#, I want to launch a process which will open a text file in any editor and automatically move cursor to a certain line number.

I can open a file using

3条回答
  •  醉话见心
    2021-01-05 04:40

    Perhaps you are going this the wrong way. I'm not sure what you are trying to accomplish, but I think it would be alot easier to just open the text file in an editor that belongs to your application. Perhaps another form with a WYSIWYG editor control. That way you have full control on where the cursor will land in that editor. Otherwise, there are just way too many unknowns for anything feasibly workable.

提交回复
热议问题