How to open a text file in a Rich Text Box
Firstly, to start off, open up Visual Basic 6.0.
When you've done that, it should prompt you with a dialog box asking you what type of project you want to make. Choose Standard EXE and press open.
Once you have done that, you should have something that looks like this:
Now we are going to set up the design of the application. To do this we are going to need one Rich Text Box, one command button and one Common Dialog.
So go over to your toolbox (the thing that says "General" and has lots of little icons), and select the command button (the one circled in blue in the picture below) and create one of them on the form.


Now we need to insert the common dialog into the toolbox and also the Rich Text Box. We do this because they are not there when we start up Visual Basic 6.0. So go ahead and press CONTROL+T. This will bring up the components window. Scrooooolll down until you find something that says, "Microsoft Common Dialog Control 6.0" or similar. Select it. Now find "Microsoft Rich Text Box Control" and press OK.
You will notice two new icons in your toolbox. Add both of them to your form.

Now we need to name these objects. To do this, click on the Rich Text Box and go to the properties dialog (it's on the right hand side).
Go to the name arena. Change the value from "Richtextbox1"to "RTB_Input". Do the same for the command button. But instead, call it cmd_open. And the same for the Common Control, except call it CD1.
You can now, also, change the caption of the Command button to Open or whatever you like. Do this the same way we did for the name. Except look for "Caption" instead of Name. You can change the value of the rich text box as well. Click on it and scroll down to Text on the properties dialog. Change it to whatever you want (it doesn't really matter, it's gonna get changed anyway).
Coding time!
Double click on the command button. It should come up with code like this:
Private Sub cmd_Open_Click()
End Sub
In the middle of this, insert this code
CD1.Showopen
RTB_Input.loadfile (CD1.Filename)
You should now have this code
Private Sub cmd_open_Click()
CD1.Showopen
RTB_Input.loadfile (CD1.Filename)
End Sub
What this is telling the application to do is, when you press the command button it is telling the Common Dialog o show the Open file dialog. Then, once you've chosen your file, it is telling the rich text box to load a file. And the file to load is the file name that you chose.
Now press F5. This will run your application. Alternitivly you can press this button (the one highlighted in blue):
You should be able too, now, when your application is running, be able to press one button and it opens an open dialog. You should then choose a file. Then click open. And it should display it in the richtext box.
When you are done with your application, exit out of it and save.