//Introduction
Hey, Welcome.....
This is the tutorial
//EndIntro
//Help1
Select a Stock
To use this software you first need to select the stock. To do that, simply enter the stock symbol in the stock text-box (such as "MSFT").
To continue enter "MSFT" in the stock symbol box.
//EndHelp1
//Help2
Download Stock Data
Next step is to to download the stock data from the online servers. To start the process simply press the "Update" button or hit the <ENTER> key.
After stock data is downloaded the "Refresh" button will appear instead. Press it when you want to refresh the data with the latest quote.
To continue make sure you are online and press the "Update" button
//EndHelp2
First time I want to display the content between //Introduction and //EndIntro then second time the content between //Help1 and //EndHelp1 and so on.
That’s a very open-ended question – what sort of file? To read binary data from it you’d usually use:
or
To read text you could use any of:
or
or
If you could give more details about the kind of file you want to read, we could help you with more specific advice.
EDIT: To display content from an RTF file, I suggest you load it as text (but be careful of the encoding – I don’t know what encoding RTF files use) and then display it in a
RichTextBoxcontrol by setting theRtfproperty. Make the control read-only to avoid the user editing the control (although if the user does edit the control, that wouldn’t alter the file anyway).If you only want to display part of the file, I suggest you load the file, find the relevant bit of text, and use it appropriately with the
Rtfproperty. If you load the whole file as a single string you can useIndexOfandSubstringto find the relevant start/end markers and take the substring between them; if you read the file as multiple lines you can look for the individual lines as start/end markers and then concatenate the content between them.(I also suggest that next time you ask a question, you include this sort of detail to start with rather than us having to tease it out of you.)
EDIT: As Mark pointed out in a comment, RTF files should have a header section. What you’ve shown isn’t really an RTF file in the first place – it’s just plain text. If you really want RTF, you could have a header section and then the individual sections. A better alternative would probably be to have separate files for each section – it would be cleaner that way.