Tuesday, October 16, 2007

Visual Basic 2005 FileDialog Example

Below is a simple example of a Save As dialog could look like.

' Save Dialog
With SaveFileDialog1
.DefaultExt = "exp" ' Default extension if user doesn't add one
.Filter = "Exp file (*.exp)|*.exp|Any (*.*)|*.*" ' Using *.exp as filter OR show all
.FilterIndex = 0 ' Use *.exp as default
.InitialDirectory = "C:\"
.Title = "Save TwinCat *.Exp file to .."
If .ShowDialog() = Windows.Forms.DialogResult.Cancel Then Exit Sub ' User pressed Cancel so exit

End With
' Append some text to this file
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, "Test", True)

No comments:

MySQL to MariaDB

 Here is a good description how to migrate to MariaDb MySQL to MariaDb Example of how to dump data from MySQL port=3307: mysqldump --user=ro...