Public Class Form1の全コード
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'OpenFileDialogを開く
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
'ファイルの内容を変数bytesに入力
Dim bytes() As Byte = My.Computer.FileSystem.ReadAllBytes(OpenFileDialog1.FileName)
'SaveFileDialogを開く
If SaveFileDialog1.ShowDialog() = DialogResult.OK Then
'bytesの内容をファイルに出力
My.Computer.FileSystem.WriteAllBytes(SaveFileDialog1.FileName, bytes, False)
End If
End If
End Sub
End Class