So I have two ListBoxes. Listbox1 gathers files from a directory and I have an add button to add selected files from Listbox1 over to Listbox2.
Is there a way to manually sort these items? Maybe with an up down buttons?
The reason I'd like to sort/reorder is I'll have a process that will run those selected files and each file will have to produce another file unique to the filename.
A quick example would be process FILE1.txt and produce FILE1.pdf, etc.
Is there an easier way to accomplish the sort/reorder?
UPDATE
Here is currently how I'm populating my listbox1, before adding anything to listbox2, which is the ListBox I'd like to have sorted so way or another.
Dim directoryInfo As _ New System.IO.DirectoryInfo(FolderBrowserDialog1.SelectedPath) Dim fileInfos() As System.IO.FileInfo
I have 2 listboxes, and i can't get out what i need to do for the method. The method is, if a item in listbox1 is selected, it will select the same line in listbox2 and same in reverse. there can be many many items.
I am making a password program that remembers what the password is for and what the password is. I have two listboxes: 'listbox1' for what the password is for, and 'listbox2' for the password. I also have a remove button. I would like it so when you press the remove button, the selected item in listbox1 is removed and the password in listbox2 is also deleted. The passwords are stored in two settings: what, and pw. The items that will be deleted will have the same value. By value i mean they will be the same number item. E.G. the 1st item, or the 3rd item in the list.
Uploaded with ImageShack.us how can i move the highlighted listbox on the right side to the empty row(the one that is highlighted on the left side) using a button.
here i have 2 listbox i already have the code for the selected item moving right and moving left but i don't know how to move all of the listbox1 to listbox2 by just click >> or listbox2 to listbox1 <
I have a listbox2 and it is bound to my ms access database. I want to number them using listbox1. Example
[Code]...
** the listbox1 must automatically number the items depending on how many items inside the listbox2. -I already know that i can make it by creating autonumber in ms access, for certain reasons i cant do that.
Okay as an example i am opening images through listboxes. Say I have the name of the photo in listbox1 and the location name of it in listbox2.Okay so what i want to do is make it so if i select an item in listbox1 that it will select that item down the list in listbox2 but by location not names.
I have already achieved above but the main difficult part is I also want numbering in listbox2 to go green or red based on listbox1 item (Corresponding items)
in form1 i have two listboxs listbox1 listbox2 loadbutton and savebutton this code will write listbox1.selecteditem into a txt file and loadbutton will load info in listbox2 but i want when i click loadbutton it check if that item is already exist in listbox2 , if not so write selected item from listbox1 and if that item is already exist in listbox2 then do not save it (msg"this item is already exist in listbox2")
I'm using the following code to get all of the files from a DVD drive and load them into a bindinglist and then a datagridview:
mAddBL.Clear() ' Try Dim dir As New IO.DirectoryInfo(Form1.m_DVDdrive & ":")
[Code]....
This shows all files and folder names on the disc. If I want it to show all files, regardless of the folder they're in, is there a built-in method to do that or do I need to take an entry, identify it as a directory and then use that as my source to read the files in it?
I would like to list all files of a partition such as "C: " and put them on a listbox , I tried but it didn't work ... i said that maybe it was because of the privileges , here's a snapshot containing the code, the form and the error: [URL]
I'd like to use System.Net to connect to FTP Server and it does, but now i want to have a form to display the contents of the FTP Server (example: It shows the files and folders and allows the viewing of another folder, like an ftp client but not used for that)
What is wrong with this code...... it should remove all folders and files on the "J" drive i am using win7 and would like to just format the drive
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load My.Computer.FileSystem.DeleteDirectory("J:", FileIO.DeleteDirectoryOption.DeleteAllContents, FileIO.RecycleOption.DeletePermanently, FileIO.UICancelOption.DoNothing) End Sub End Class
i have two listbox who contain Directories File one listbox show Full Path of Files..Second Listbox Show Name Like Show in Picture:i want to start new process by click on Listbox2. selected item( contain only name of files )
I need help with file enumeration. I'm trying to create a program that can list files, folders and sub folders locations in a log file for diagnostic purposes. After it searches it can open notepad and display the results. The problem I'm having is that I'm a beginner and not familiar with file enumeration.
im trying to search a selected folder for all extension in listbox1
here is my current code. it only works if i highlight the listbox1 i want it to go thru all the extentsion in the list box. if possible when they click the button can it do a OpenFileDialog and use that dir and add them to listbox2 intead of "c:"
Dim count As Integer = (ListBox1.Items.Count - 1) Dim words As String For a = 0 To count
I have a CheckedListBox with some stuff in it and a ListBox with nothing in it. I'm using this code to get the Selected one in CheckedListBox1 to ListBox1 and splitting it:
i have a list box which is populated with folder names via directoryinfo, and i have a second listbox which is also populated with folder names from a user selected folder. So listbox1 is populated like this: