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_save. And the same for the Common Control, except call it CD1.
You can now, also, change the caption of the Command button to Save 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. You can allways change it when the application is running.
Coding time!
Double click on the command button. It should come up with code like this:
Private Sub cmd_Save_Click()
End Sub
In the middle of this, insert this code
CD1.Showsave
RTB_Input.SaveFile (CD1.Filename)
You should now have this code
Private Sub cmd_open_Click()
CD1.Showopen
RTB_Input.Savefile (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 to show the Save file dialog. Then, once you've chosen your filename, it is telling the rich text box to save the text in the RTB to the file.
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 save file dialog. You should then choose a file. Then click save. It should save to where you located it too.
When you are done with your application, exit out of it and save.
discuss this topic to forum
