How can we open a folder? I need to open a window to show the contents of a folder..only could find how to open Files and Create Directories..
Nguyen Dinh Quy
Posts
-
Newbie!! -
Newbie hereAhh i guess my first post was horribly phased ;P Anyway yah, users can choose from the dialog box which files to be copied, but the location where the files are copied to is fixed. With "Files", i mean any types of files.. e.g. User chooses Example.txt from C:\, and it is copied to D:\.So now there's C:\Example.txt and D:\Example.txt. The 1st question here is that i don't know how to do it.
-
Newbie hereDim dlg as New OpenFileDialog if dlg.ShowDialog() = DialogResult.Ok then System.IO.File.Copy(dlg.FileName, "C:\a.txt") EndIf Yah, this will create a text file in C:\...but what if the user chooses other types of files? (.exe, .pdf) I tried choosing an .exe file, but it creates a .txt file, using notepad to read the .exe file. :( Dim dlg as New OpenFileDialog if dlg.ShowDialog() = DialogResult.Ok then System.IO.File.Copy(dlg.FileName, "C:\" + dlg.FileName) EndIf I tried this, but it gives an error indicating "The given path's format is not supported".
-
Newbie herePrivate Sub MenuItem16_Click(ByVal sender as System.Object,ByVal e as EventArgs)Handles MenuItem16.Click Dim FileDialog As OpenFileDialog Dim Test As New Test 'The Test class from MSDN if FileDialog.ShowDialog() = DialogResults.Ok then Test.Main() End If There's no build error, but after I chose a file from the dialog box, no file was copied to the new location :( What's my problem here? Dim dlg as New OpenFileDialog if dlg.ShowDialog() = DialogResult.Ok then System.IO.File.Copy(dlg.FileName, "C:\") EndIf ' Will copy the chosen file to C:\ I tried this as well, but after clicking OK in the dialog box, it gives an error indicating "Directory Exists", so i couldn't copy my chosen file to C:\ as well...why?
-
Newbie hereHmm..but it doesn't teach us how to rename a file? Sorry but i'm really weak in Vb.Net >.<
-
Newbie hereThanks guys..another question.. Can i change the filename while copying the file to the new location? So that it will be renamed when it is copied to the new location?
-
Newbie hereSo how do i code it to copy the chosen file to another destination?
-
Newbie hereWhat's the code for Vb.Net to open a dialog window, and after choosing a file, you will copy that particular file to a pre-determined location?
-
HelpAre there any ways to bind information from a XML file into a listbox for Vb.Net? e.g I need to display all the products that are in the XML file into the listbox for the user to choose from. Another question would be how do we edit XML files? e.g After creating a XML file, I need to add more products into the XML file my project is mainly about product inventory
-
Need helpI'm supposed to do a project using only XML, Microsoft Excel and Vb.Net. My problem here is that I'm supposed to plot a graph out with values extracted from an Excel file. Are there any ways to plot the graph without considering the size restrictions in Vb.Net (the size of the graph might be big), and how do we extract the values from the Excel file?