The save file dialog just allows the user to specify where they want to save the file.
If you want to save a file without this dialog you will have to specify the filename yourself.
You can use one of the following code snippets to save the file:
For a Text File:
My.Computer.FileSystem.WriteAllText("C:\SomeDir\YourFile.txt", "Text", True)
For a Binary file:
Dim fileContents() As Byte = {244, 123, 56, 34}
My.Computer.FileSystem.WriteAllBytes("C:\SomeDir\YourFile.bin", fileContents, True)
Note: These are straight from the standard snippets in Visual Studio. Press Ctrl+K
, Ctrl+X
then navigate to Fundamentals > FileSystem