[/SIZE][/FONT]
[FONT=Courier New][COLOR=blue]Private[/COLOR] [COLOR=blue]Sub[/COLOR] SaveTextFile()[/FONT]
[FONT=Courier New][COLOR=blue]Dim[/COLOR] fileDialog [COLOR=blue]As[/COLOR] [COLOR=blue]New[/COLOR] System.Windows.Forms.SaveFileDialog[/FONT]
[FONT=Courier New]fileDialog.Filter = [COLOR=maroon]"Memo files (*.memo)|*.memo|All files (*.*)|*.*"[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] fileDialog.ShowDialog = Windows.Forms.DialogResult.OK [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] [COLOR=blue]Not[/COLOR] System.IO.Directory.GetParent(fileDialog.FileName).Exists [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New]System.IO.Directory.GetParent(fileDialog.FileName).Create()[/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New]System.IO.File.WriteAllText(fileDialog.FileName, MyMemoTextSource)[/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]Private[/COLOR] [COLOR=blue]Sub[/COLOR] SaveBinaryFile()[/FONT]
[FONT=Courier New][COLOR=blue]Dim[/COLOR] fileDialog [COLOR=blue]As[/COLOR] [COLOR=blue]New[/COLOR] System.Windows.Forms.SaveFileDialog[/FONT]
[FONT=Courier New]fileDialog.Filter = [COLOR=maroon]"Memo files (*.memo)|*.memo|All files (*.*)|*.*"[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] fileDialog.ShowDialog = Windows.Forms.DialogResult.OK [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] [COLOR=blue]Not[/COLOR] System.IO.Directory.GetParent(fileDialog.FileName).Exists [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New]System.IO.Directory.GetParent(fileDialog.FileName).Create()[/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New]System.IO.File.WriteAllBytes(fileDialog.FileName, MyMemoByteSource())[/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]Private[/COLOR] [COLOR=blue]Sub[/COLOR] OpenTextFile()[/FONT]
[FONT=Courier New][COLOR=blue]Dim[/COLOR] fileDialog [COLOR=blue]As[/COLOR] [COLOR=blue]New[/COLOR] System.Windows.Forms.SaveFileDialog[/FONT]
[FONT=Courier New]fileDialog.Filter = [COLOR=maroon]"Memo files (*.memo)|*.memo|All files (*.*)|*.*"[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] fileDialog.ShowDialog = Windows.Forms.DialogResult.OK [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] [COLOR=blue]Not[/COLOR] System.IO.File.Exists(fileDialog.FileName) [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New]MessageBox.Show([COLOR=maroon]"Ops Not File Found"[/COLOR], [COLOR=maroon]"No File Found"[/COLOR], MessageBoxButtons.OK, MessageBoxIcon.Error)[/FONT]
[FONT=Courier New][COLOR=blue]Exit[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New]MyMemoTextSource = System.IO.File.ReadAllText(fileDialog.FileName)[/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]Private[/COLOR] [COLOR=blue]Sub[/COLOR] OpenBinaryFile()[/FONT]
[FONT=Courier New][COLOR=blue]Dim[/COLOR] fileDialog [COLOR=blue]As[/COLOR] [COLOR=blue]New[/COLOR] System.Windows.Forms.SaveFileDialog[/FONT]
[FONT=Courier New]fileDialog.Filter = [COLOR=maroon]"Memo files (*.memo)|*.memo|All files (*.*)|*.*"[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] fileDialog.ShowDialog = Windows.Forms.DialogResult.OK [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]If[/COLOR] [COLOR=blue]Not[/COLOR] System.IO.File.Exists(fileDialog.FileName) [COLOR=blue]Then[/COLOR][/FONT]
[FONT=Courier New]MessageBox.Show([COLOR=maroon]"Ops Not File Found"[/COLOR], [COLOR=maroon]"No File Found"[/COLOR], MessageBoxButtons.OK, MessageBoxIcon.Error)[/FONT]
[FONT=Courier New][COLOR=blue]Exit[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New]MyMemoByteSource() = System.IO.File.ReadAllBytes(fileDialog.FileName)[/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[FONT=Courier New][COLOR=black]