Windows Develop Bookmark and Share   
 index > Windows Forms General > How to read a richtextbox's text but ignore the line begin with a remark(*)
 

How to read a richtextbox's text but ignore the line begin with a remark(*)

I got a text file as show as below,

*THIS IS MACRO #4 LOAD BLADE HOME

*MD4

*AX

*AC20000 VL500 (FOR 1/2 STEP)

*HM0

*MA20 GO (FOR 1/2 STEP)

MD4

AX AC20000 VL500 HM0 MA20 GO

^Z

Then, i had open it and display it at a richtextbox. Now i want todisplay it at another richtextbox except the line begin with a remark(*). The another richtextboxwill only display

MD4

AX AC20000 VL500 HM0 MA20 GO

^Z

Can someone tell me howto do this?

Thank you.

fishy_s  Tuesday, June 27, 2006 9:24 AM

Use the string Split method and split on Environment.NewLine. Then parse each line to see if you want to remove it or not, and build the string you want in your new text box.

cgraus  Tuesday, June 27, 2006 9:26 AM

You can use google to search for other answers

Custom Search

More Threads

• ComboBox Raise ShowItemsList Event
• TabControl not redrawing properly after SplitContainer resize
• WebBrowser. How can I tell it to anchor to a particular webpage?
• File Browser Component
• Visual C++ 2008 Windows Form TabControl
• Reseting data binding in a form to new values from sql table
• Storing configuration information in external XML file
• convert pixel to point
• showing child form in mdi parent
• WebBrowser needed, must be at least IE 5.5 SP1