Hi everyone,
this is my first post. ive been working on a project as a way of learning VB.NET 3.5.
the problem that im having is that im not sure how to assign a custom extension to my files that i create (".epcr"). so far, the registry recognizes my custom file type, i create the directory where i want the file saved, the file is named by the user.... but.... its saved as type "file" not type ".epcr"
heres some code:
----------------------------------------------------
System.IO.Directory.CreateDirectory("c:\EPCR")
Dim v_newFileName As String
v_newFileName = PtGivenNameTextBox.Text & PtSurnameTextBox.Text
SaveEpcrFileDialog.InitialDirectory = "C:\EPCR"
SaveEpcrFileDialog.Filter = "EPCR FILES | *.epcr"
SaveEpcrFileDialog.FileName = PtGivenNameTextBox.Text & PtSurnameTextBox.Text
SaveEpcrFileDialog.ShowDialog()
System.IO.File.Create("c:\EPCR\" & (PtGivenNameTextBox.Text & PtSurnameTextBox.Text))
End Sub
---------------------------------------
im still new to this and im teaching myself. any help would would be appreciated.
this is my first post. ive been working on a project as a way of learning VB.NET 3.5.
the problem that im having is that im not sure how to assign a custom extension to my files that i create (".epcr"). so far, the registry recognizes my custom file type, i create the directory where i want the file saved, the file is named by the user.... but.... its saved as type "file" not type ".epcr"
heres some code:
----------------------------------------------------
System.IO.Directory.CreateDirectory("c:\EPCR")
Dim v_newFileName As String
v_newFileName = PtGivenNameTextBox.Text & PtSurnameTextBox.Text
SaveEpcrFileDialog.InitialDirectory = "C:\EPCR"
SaveEpcrFileDialog.Filter = "EPCR FILES | *.epcr"
SaveEpcrFileDialog.FileName = PtGivenNameTextBox.Text & PtSurnameTextBox.Text
SaveEpcrFileDialog.ShowDialog()
System.IO.File.Create("c:\EPCR\" & (PtGivenNameTextBox.Text & PtSurnameTextBox.Text))
End Sub
---------------------------------------
im still new to this and im teaching myself. any help would would be appreciated.