Forms :: Move Same Selected Item In 2 Listboxes?

Sep 24, 2011

I would like to know if and how I can move a selected item in one listbox and the second listbox moves the same item aswell (so they move in sync).I can move the items in one listbox with the following

Private Sub UpButton_Click(sender As System.Object, e As System.EventArgs) Handles UpButton.Click
Dim index As Integer = ListBox1.SelectedIndex

[code].....

View 1 Replies


ADVERTISEMENT

Forms :: Move A Listbox Item If You Have 5 Listboxes?

May 20, 2011

im having trouble with moving listbox items between several listboxes with the click of a button?

View 3 Replies

Listboxes In Array: Move To Next Item, And Move To Next Listbox Command?

Dec 26, 2009

I have three listboxes in an array and on form_load the listboxes initially select the fifth item in each listbox:

Private Sub frmSample_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 1 To 3

View 8 Replies

Forms :: Setting Selected Item Of Combobox?

Aug 16, 2011

I have a combobox which is populated from a datatable.

I hae a list of values also and when one is selected i would like it to highlight the correct value in the combo box and have been trying to no avail.

my code is

Dim searchrow() As DataRow
Dim searchrow2() As DataRow
Dim cellvalue As String = dgvStockComps.Rows(e.RowIndex).Cells(1).Value

[Code]....

eveytime i sellect a value in my list nothing happejns to my combo box (i.e. it goes blank and it doesnt show the sleected item like i would like!)

View 2 Replies

Move Items Between Listboxes?

Dec 6, 2010

i am working in vb 2008, and i am having problems switching data between listboxes. I want all the data thats in listbox 2 to appear in listbox 1.here is my code.

While ListBox1.SelectedIndices.Count > 0
ListBox2.Items.Add(ListBox1.Items( _
ListBox1.SelectedIndices(0)))

[code]....

View 2 Replies

Forms :: Compare The Selected Item Of The Listbox With The Database?

Jun 25, 2011

how compare the selected item of the listbox with the database and dispaly data again in the textbox of front end

View 3 Replies

Forms :: Display The Selected Item From A List Box In To A Label?

Dec 10, 2009

I have items in a listbox. the user have to select one item(its mandatory) and after have to click next button to proceed to the next form. in the second form the selected item should be displayed in a label.

View 6 Replies

Forms :: Listview: Open Item Path From Selected Row?

Jun 24, 2011

I have a simple Windows application, it list all Directories from a specified path in a liestview. My Listview have 2 column. First one show only icons and second one is the name of the Directory. Now i have a context menu "open dir". It should be open the Directory in/with explorer - Doesnt work.The Problem part, i think, is following event: ToolStripMenuItem1_Click

Here is my

Imports System
Imports System.IO
Public Class Form1

[code]....

View 1 Replies

Forms :: Choose Item From ComboBox And Save Selected Value To DataSet

Dec 23, 2009

I have a problem with a combobox. I have a form (with information about clients) with textboxes binded to a dataview. One of the columns in the dataview contains a number that tells me what kind of client it is. I don't my users want that my users have to fill in a number in a textbox, but I want them to choose a item from a combobox. De selected value should be the value that is actually saved in the database.

This is my
Dim cmd As New SqlCommand
Dim dr As SqlDataReader
VerbindingMaken()
cmd.Connection = cnnVraagbaak
cmd.CommandType = CommandType.StoredProcedure
[Code] .....

De Datasource is the information in my combobox. With Databindings I'm trying to bind it to my dataset (or view, that doesn't work either) with clients. Every time I get a NullReferenceExeption. The moment I remove the line cbo.DataSource = dsRelatie.Tables("Relatiesoort"), I don't get an error, but it doesn't work either.

That dataset is filled (I've checked) and also the derived view. The column Relatiesoort exists. What do I have to do to make it possible for my users to choose an item from a combobox and save the selected value to the underlying dataset?

View 1 Replies

Forms :: Pass The Task_ID Of Selected Item From Form1 To Form2?

May 20, 2009

I had two forms, first forms shows all the task details in a list and user select any task and the second form shows the details of that task in edit mode so user can edit the record, now i don't know how to pass the Task_ID of selected item from form1 to form2.

View 1 Replies

Forms :: Select TreeView Node By ListView Selected Item?

Mar 23, 2010

I have been playing with, and researching, this all day and can't figure it out. I have a Windows Explorer style form with a TreeView and a ListView. I've populated the TreeView with directories and when a node is selected, the ListView fills with the contents of the directory associated with that node. No problem there, but I want to be able to select a directory in the ListView and automatically select the associated node in the TreeView, just like it works in Windows Explorer. All the information I've found online tells me how to populate the ListView from the TreeView, but I haven't found any good examples of how to populate the TreeView from the ListView.

[Code]...

View 7 Replies

.net - Windows.Forms.Listbox Selected Item Font Size Is Changing?

Jan 4, 2011

I have inherited from a Windows.Forms.Listbox so I could override the OnPaint and OnDrawItem methods in an effort to highlight specific items and alternate backcolors. I am also skipping some DrawItem events to prevent flickering.Everything is working fine, however when I select items in the listbox, it looks like the font is shrinking or becoming more compressed.Then when I mouse leave, the font goes back to its normal size and appearance but the same items are still selected (which is correct). During debugging the font never changes nor do any of its properties, but it does end up looking different when the item is selected and the mousedown event just happened.

Public Sub New(ByVal relativityHighlightColor As System.Drawing.Color)
_relativityHighlightColor = relativityHighlightColor
Me.SetStyle( _
System.Windows.Forms.ControlStyles.OptimizedDoubleBuffer Or System.Windows.Forms.ControlStyles.ResizeRedraw Or

[code]....

View 1 Replies

Forms :: Make ListBox5 Select The Index Of ListBox4 Selected Item?

May 10, 2009

i have this..

ListBox4.SelectedIndex = 0
Dim mrc As Integer = ListBox5.FindString(ListBox5.Items.IndexOf(ListBox4.SelectedItem))
ListBox5.SelectedIndex = mrc[code]....

What im trying to do is, Make ListBox5 select the index of ListBox4 Selected Item (The Matching Ones).. example:I have the files of the same in two listboxes,Then in ListBox4, it selects The first Item (Got that bit),Then it selects the item of the exact same string as listbox4 selected item to select in listbox5..

View 8 Replies

Move Items From Inbetween Multiple Listboxes (4 Boxes)?

May 19, 2011

I'm having a problem with moving items between list boxes, i'm fine with moving an item from 1 list box to another but thats 2 boxes and i have 4. I basically want to know the code to move 1 item from a list box to any of my other 3 list boxes.

View 5 Replies

How To Select Item # On Listboxes

Jul 2, 2010

what I want to do is make it so when i select the first item in Listbox1 it will also select the first item in listbox2 and if i select the second one it selects the second one on listbox2 as well. Is there a way to do this? i honestly have no clue and i know my code is wrong cus i do not know how to select the item # on listboxes but this is what i have:[code]

View 7 Replies

When Users Select Each Item Another Item Will Be Added To Second Listbox But It Is The First Selected Item

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

Move Between Forms - The Menu Move Step By Step When The User Move Between Forms

Apr 8, 2011

Im working on my project. and i just asking if i can used this Property in vb. NET [URL] when i install adobe photoshop .. i see on the leff installer...something like a menu and the menu move step by step when the user move between Forms

Welcome
Serial Number
Adobe ID
Install
Finish

How i can create like this in VB .NET

View 1 Replies

Forms :: Selected Item In Combo Box Will Not Appear In Another Combo Box?

May 27, 2011

how do i program by saying if a certain item is selected in a combo box then that item will not appear in a second combo box. i have this code for now but it does not work

[Code]...

View 2 Replies

Forms :: Making A Program That Has Five Listboxes

May 20, 2011

this is my code till now, i no most of it doesnt make sense but i dont know the most efficient way of making a program that has five lisboxes (4 are classes 1 is absent list) of names but each class can only have 10 student and the user should be able to move student to other classes as required

[Code]...

View 1 Replies

Forms :: Remove Button For Two ListBoxes

May 28, 2010

ListBox1.Items.Remove(ListBox1.Text)
ListBox2.Items.Remove(ListBox2.Text)
I need so that I click the button once it deletes from both listboxes. For example a till... listbox1 had items listbox2 has prices to remove an item I want the price to go aswell with same click... I already have a clear all button.

View 3 Replies

Get Selected Item Index Or A Sorted & Grouped List Relative To Item Source?

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

Check Combobox Item Then Change Labels To Item Selected

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

Edit Item Or Subitem Values Of A Selected Listview Item?

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

Match Combobox Item With Text In Textbox And Set Selected Item

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

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

Change An Item In A Selected Item Of A Listbox?

Dec 9, 2011

I am trying to change an item in a selected item of a listbox.

View 1 Replies

Move Any Control That Is Selected?

Jun 13, 2012

The new application that Im building allows the user to create custom Labels and then move them around on a form.I have the labels created successfully using this

vb
Dim lbl As New Label lbl.Text = TextBox1.Text lbl.Font = New Font(lbl.Font, FontStyle.Bold) lbl.Size = New Size(25, 25) lbl.TextAlign = ContentAlignment.MiddleCenter lbl.Location = New System.Drawing.Point(10, 10) lbl.BackColor = Color.DarkGreen Form2.Controls.Add(lbl) lbl.BringToFront()

and I can move around a single label using this

vb
Private Sub obj1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseUp Go = False LeftSet = False TopSet = False End Sub Private Sub obj1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown Go = True End Sub Private Sub obj1_MouseMove(ByVal sender As

[code]....

The problem is, is that this code just moves label1. What I need it to do is to move whatever label is selected. The user could create an infinite amount of labels and I do not want to repeat the above code an infinite number of times. Is there a way to make the label selectable, and if it is selected, it uses that name in replace of label1?

View 6 Replies

Forms :: Command To Auto Remove Item From Combobox If Item Is Blank?

Apr 3, 2011

I have used the command:

For Each Proc as process in process.getprocesses
Combobox1.Items.Add(Proc.MainWindowTitle)

to populate a combo box with the list of current process windows, however for every process that doesnt have a main window title there is a blank space, is there a way that I could tell it to not insert the item if it's mainwindowtitle field is blank?

View 7 Replies

Move To The Next Item?

Jun 17, 2010

I'm trying to upload a batch of employee file but i want that when i will be prompted with a warning saying that the file employee file has conflict, i will select CANCEL and the uploading will move to the next item. what would be the best code to use for this?

Example:
Employee1 - has conlict
Employee2 - No Conflict

When i cancel uploading employee1 it will proceed with employee2.

View 11 Replies

Move Selected File To Directory?

Dec 12, 2011

First off, I am completely new to VB and have no previous programming experience. I was required to take an Intro to Visual Basic class.

As a result, I was assigned to write a program for my final project. My professor wanted us to challenge ourselves and try to design something we would use. While my fellow classmates chose damage calculators and stat calculators, I chose to write something that would move files around. It was challenging for a beginner, but i figured i would be able to find alot of help in my book and online. I'm impressed at myself that I've made it as far as I have, but I've hit a snag in the road.

The project is due friday, and for the life of me I can't figure out how to move the files... which is a bit of a problem.[code]....

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved