How to make a fully functional notepadFor this tutorial i will be using Delphi 6 however if your using 7 it should be about the same places and names.
What you'll need on your form-memo-main menu-save dialog-open dialogStandard -> Memo
Delete the text within the Memo
Type'File' Here
Next click the little box that pop's up under 'File' and type in this, 'New'
now type in this under 'New' , 'Open' then finally under 'Open'
type in 'Save' all without the '
now it should look like this:
Okay! now to add the Open and Save Dialog!
Now we have the interface we need to give the buttons functions!
Double click the 'New' button:
- Quote :
memo1.clear;
Now click 'Open' and type in this:
- Quote :
OpenDialog1.Execute;
memo1.Lines.LoadFromFile(OpenDialog1.Filename);
Ok now in 'Save' type in this:
- Quote :
SaveDialog1.Execute;
memo1.Lines.SaveToFile(SaveDialog1.Filename);
You can now run your program using F9.
Dont forget to save as a project.
Hope you found it helpful and dont forget to check back for more tutorials