Published in: VB.NET
Utilises the Windows file copy dialog. Handles the cancel button.
Private Structure FileCopy Public Source As String Public Destination As String Public Sub New(ByVal source As String, ByVal dest As String) Me.Source = source Me.Destination = dest End Sub End Structure Private Sub CopyFile(ByVal fc As FileCopy) Try My.Computer.FileSystem.CopyFile(AppController.TemplatePath & fc.Source, _ AppController.TemplatePath & fc.Destination, Microsoft.VisualBasic.FileIO.UIOption.AllDialogs) Catch ocex As OperationCanceledException 'cancel pressed! End If Exit Sub End Try End Sub
You need to login to post a comment.
