Hello I'm building a small program like notepad and wanted to know how to make it save and load a file

Public Class Form1

    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        txtNotes.Text = ""
    End Sub

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click

    End Sub

    Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
        ofdNotes.OpenFile()
    End Sub
End Class

I don't know how to properly address OpenFileDialog and LoadFileDialog, so i called it ofdNotes and lfdNotes.

Hi
To Refer to the OpenFileDialog you would use something like this:

dim MyDialog as New OpenFileDialog

You should be able to find out how to use the dialog here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx
To actually open, edit and save the file then you should use System.IO Namespace if you look it up on Google you'll see lots of examples of using it.

Be a part of the DaniWeb community

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