K
kimiraikkonen
Hi,
I use system.io.file class to copy files but i have a difficulty about
implementing a basic / XP-like progress bar indicator during copying
process.
My code is this with no progress bar, or i couldn't find sth which
give totalbytes/written bytes class. And does system.io.file class
provide awaring of the chunks / bytes of the files bytes which are
written?
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
If opendlg.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = opendlg.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
If savedlg.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox2.Text = savedlg.FileName
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
File.Copy(TextBox1.Text, TextBox2.Text)
End Sub
End Class
I use system.io.file class to copy files but i have a difficulty about
implementing a basic / XP-like progress bar indicator during copying
process.
My code is this with no progress bar, or i couldn't find sth which
give totalbytes/written bytes class. And does system.io.file class
provide awaring of the chunks / bytes of the files bytes which are
written?
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
If opendlg.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = opendlg.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
If savedlg.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox2.Text = savedlg.FileName
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
File.Copy(TextBox1.Text, TextBox2.Text)
End Sub
End Class