Hi please help me.

On my form i have a memo and 2 buttons, one is to load a .txt file into the form the other is to save.

I want to use these buttons using the VistaSave and load dialogs.

The save button i want to take the contents of Memo1 and save it to a .txt file.

the load button i want to take the contents of a .txt file and write it to the Memo1.

Please could you help me do this.

Recommended Answers

All 2 Replies

Use the SaveDialog and OpenDialog. That uses the Win32 API to open up the default browsers.

procedure TDatabaseBackupFm.ButtonSaveFileClick(Sender: TObject);
  if SaveDialog1.Execute then

The SaveDialog should be in your toolbox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.