Post by Deleted on Jun 3, 2015 21:34:17 GMT 10
So, I'm really stuck at the moment.
I have 2 textbox, 2 OpenFolderDialog, and 3 buttons.
Here the following code I have so far
Imports System.IO Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FolderBrowserDialog1.ShowDialog() TextBox1.Text = FolderBrowserDialog1.SelectedPath End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click FolderBrowserDialog2.ShowDialog() TextBox2.Text = FolderBrowserDialog2.SelectedPath End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim path As String = TextBox2.Text Dim destination As String = TextBox1.Text For Each hfile In Directory.GetFiles(path) File.Copy(path & "/" & hfile, destination) Next
End Sub End Class
Enjoy!
|
|
Post by Nathan Lecompte on Jun 4, 2015 8:54:13 GMT 10
Could you explain what the problem is (eg: what part isn't working) or is it just the fact that the code provided isn't functioning the way you want it to?
|
|
Post by dar on Jun 4, 2015 22:27:16 GMT 10
Can I suggest something; change this to something like this If folderbrowserdialog2.showdialog() = ok then TextBox2.Text = FolderBrowserDialog2.SelectedPath
Just a suggestion ?
|
|
Post by efwwww on Jun 5, 2015 5:33:43 GMT 10
Try this:
Dim result As Integer = FolderBrowserDialog2.ShowDialog() If result = 1 Then Textbox1.Text = FolderBrowserDialog2.SelectedPath End If
Last Edit: Jun 5, 2015 5:34:57 GMT 10 by efwwww
|
|
Post by Deleted on Jun 10, 2015 0:10:57 GMT 10
Thanks.. I am Published By My Concept
|
|