Delete Selected Listbox1 Item And Listbox2 Item With Same Value?
Mar 1, 2012
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.
[Code]...
View 2 Replies
ADVERTISEMENT
May 29, 2012
I have two listboxes. [code]..
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)
View 7 Replies
Mar 15, 2012
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")
[Code]...
View 1 Replies
Jul 30, 2009
Random name for each item in listbox2(which copies the items from listbox1)
[CODE]:...................
You can see i almost got the code, but i dont know how to rename!
View 4 Replies
Sep 22, 2009
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 )
View 4 Replies
Apr 19, 2012
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
[Code].....
View 2 Replies
Jul 1, 2011
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.
View 5 Replies
Sep 10, 2010
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:
[Code]...
View 2 Replies
Feb 10, 2009
I have say... 10 lines of text in listbox1. how can I copy lines 5 thru 10 to listbox2 on buttonclick?
View 4 Replies
Jun 7, 2012
this is my first project and i am using vb.net2010
i have list box contains my drives using this code
ListBox2.Items.AddRange(Directory.GetLogicalDrives)
and ListBox1 is empty
i need the code to view all files and folders in listbox1 from the selected drive in listbox2
View 8 Replies
Jul 5, 2010
In my application I have a listbox and SelectionMode should be MultiSimple because users need to see which items they selected. In another tab we have another listbox this one should show all the selection users had done in first tab. Private Sub
[Code]....
View 3 Replies
Nov 19, 2011
I have the below code that works great, until you have multiples of the same thing.example of data
burger
-tomato
+tomato[code].....
if i select the +tomato in wrap it remmoves the +tomato in burger (deleting the 1st oocurance of it) how can i fix that. i have played alot and can not figure it out.(ps the other list boxes are other data but it needs to remove the same "line" as each other. they are all changed to the same selected index when 1 is changed)
Dim value As String
Dim value1 As String
Dim value2 As object[code].....
View 21 Replies
Jul 3, 2009
How can I delete a row from an SQL database based on what item is selected in a listbox?
View 7 Replies
Apr 28, 2011
how do I do the code if I wanna delete a selected item from the array list and not all the items store in the array list? [Code]
View 2 Replies
Dec 14, 2010
I have a list of registered users in gridview...
I want when i click on delete button on selected item in gridview, then the record of user will be deleted from the whole database... on single delete command of sqldatasource in gridview....
View 1 Replies
Sep 25, 2011
When I run the program it will populate the listview but when i delete the selected item it will clear all of my records in my listview. . . .can anyone elp me with this??This is my code. . . .
[Code]...
View 2 Replies
Feb 2, 2012
i have a databound combobox using VB2010 and MS access as the DB.. When i click on a button, the selected item in the combobox will be deleted from the database and no longer display in the combobox...
View 1 Replies
Jun 6, 2011
I trying to make a code to Delete and Update Access 2007 database after remove a selected item from a listbox in VB 2008. [using "Remove" button that i create] pervious i already make a button to View data from database and Remove from listbox. but i don't know how to delete and update in database.
The code i using now:
CODE:
In the database, i have ID,Name and Age (simple database)
View 1 Replies
Feb 12, 2011
I'm having some difficulty with a sorted & grouped listbox in WPF vb.net 3.5 that has an items source bound to an ObservableCollection.
What I want to be able to do is to retrieve a piece of data from the ObservableCollection items source depending on what item in the listbox the user has selected.I've almost got it working but because the listbox is sorted it does not match the index of the items source.
[code]...
As I previously mentioned, because the lstBox is sorted and also grouped the index's don't match up.Does anyone know how I can get the correct information I want from the List Source depending on the selected item in the list box?
View 3 Replies
May 25, 2012
Regarding my college project. i'm working on a sales system . i have a form which consist of all the following information( item code , item name , item price , quantity of item ) which is display using a data grid . data input by user using text box and all this information will be stored in a database(sales database) i'm using ms access 2007. the grand total will be displayed in a text box . and amount paid will be input in a text box too , my major problem now is how to i create a reciept that will have all this information of the purcase. i have a reciept button . what the next step ? i dont have any idea how to get the reciept done.
Imports System.Data.OleDb
Public Class Form5
Dim con As New OleDbConnection
[CODE].......................
View 9 Replies
Oct 31, 2009
Just started on vb.net
I have a combo box with "yes" and "no" with i select Yes i want the label2 to change the text to "yes" likewise with "no"
I've tried to code it in a logical way as possible but it just doesn't works except for the "wtf" so i think that overall my code is correct but the way i want to retrieve the selected item from combo box is wrong.
Public Class Form1
Dim aa As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
[Code].....
View 3 Replies
May 19, 2009
Ok, so I have a listview on one form, and when a button is pressed it opens up a new form with the contents of the selected listview item and it's subitems in a series of textboxes. The user can then change the data in the textboxes and either press save to make the changes or cancel to close the window. What command would I use to change the selected listview item and subitems to whatever is in the boxes?
this is the code that populates the boxes:
Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim appeditcontents As String = main.passlist.SelectedItems(0).ToString
[Code]....
View 1 Replies
Dec 29, 2011
i have a combobox containing countries name and their codes like INDIA:CNT001 then i have a textbox that store the code of country i.e CNT001(fetching from database) Now i want to match that code with the combobox code so that the combobox is set to that item when i click a button. i m using vb.net and sql server as database.
View 5 Replies
May 14, 2012
how whould I go about deleteing an item from a listbox and it will select the next available item.you know like the treeview control selects the next node if you delete one.
View 2 Replies
Dec 9, 2011
I am trying to change an item in a selected item of a listbox.
View 1 Replies
Jun 3, 2012
well i was trying to do a function called Procedimento() for each item in listbox1 but it's impossible .... how it can be done ? What i try until now :
Dim myItem As Object
For Each myItem In ListBox1.Items
Procedimento()
[Code]....
View 14 Replies
Jul 21, 2009
How can i make listbox1 item copy itself to texbox1(no using if in texbox1)
View 7 Replies
Dec 24, 2010
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.
View 2 Replies
Dec 15, 2011
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 <
View 7 Replies
Jan 12, 2011
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.
View 5 Replies