01.
Imports
System.IO
02.
03.
Public
Class
Form1
04.
Private
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button1.Click
05.
Dim
dInfo
As
New
DirectoryInfo(TextBox1.Text)
06.
Dim
filelist
As
FileInfo() = dInfo.GetFiles()
07.
Dim
i
As
Integer
08.
For
i = 0
To
filelist.Length() - 1
09.
filelist(i).CopyTo(TextBox2.Text +
"\"
+ filelist(i).Name)
10.
Next
11.
End
Sub
12.
13.
Private
Sub
Button2_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button2.Click
14.
Dim
t
As
Type =
GetType
(Environment.SpecialFolder)
15.
With
FolderBrowserDialog1
16.
If
(.ShowDialog() = Windows.Forms.DialogResult.OK)
Then
17.
TextBox1.Text = .SelectedPath
18.
End
If
19.
End
With
20.
End
Sub
21.
22.
Private
Sub
Button3_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button3.Click
23.
Dim
t
As
Type =
GetType
(Environment.SpecialFolder)
24.
With
FolderBrowserDialog1
25.
If
(.ShowDialog() = Windows.Forms.DialogResult.OK)
Then
26.
TextBox2.Text = .SelectedPath
27.
End
If
28.
End
With
29.
End
Sub
30.
End
Class