Once a user has selected a file with the open file dialog, how can I handle this action? For example, if the user has selected a .txt file and has opened it, how can it get the
Dim dlg_open As New OpenFileDialog()
If (dlg_open.Show() <> DialogResult.OK) Then Return
'if a textfile, then
Dim content As String() = IO.File.ReadAllLines(dlg_open.FileName)
'if an image, then
Dim img As New Bitmap(dlg_open.FileName)
You should put Try...Catch blocks around all operations dealing with IO, you will not be able to prevent all exceptions.