•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 456,234 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,754 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
Views: 825 | Replies: 1
![]() |
•
•
Join Date: Nov 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I am doing a ListBox project
here is the example:
http://i213.photobucket.com/albums/cc8/n9370/a4htm7.jpg
I almost down this project. but i still have somewhere need your help.
When i double click an item on toplist, i will move the item to the bottom list
For example, when i double click Acer, it will be to the bottom list.
which do the same thing when i click the button "move to bottom list"
i know how to write the code for that button,
here is my code for that
but i don't know how to write for the selected item on double clicking. how do i write this?
Another problem i have is that
my testbox should be enabled only when any text present in the text box
how do i fix my code to do it? thank you.
here is the example:
http://i213.photobucket.com/albums/cc8/n9370/a4htm7.jpg
I almost down this project. but i still have somewhere need your help.
When i double click an item on toplist, i will move the item to the bottom list
For example, when i double click Acer, it will be to the bottom list.
which do the same thing when i click the button "move to bottom list"
i know how to write the code for that button,
here is my code for that
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = ListBox1.Items.Count - 1 To 0 Step -1
If ListBox1.GetSelected(i) = True Then
ListBox2.Items.Add(ListBox1.Items(i).ToString)
ListBox1.Items.RemoveAt(i)
End If
Next
End SubAnother problem i have is that
my testbox should be enabled only when any text present in the text box
how do i fix my code to do it? thank you.
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text = "" Then
Button3.Enabled = False
End If
End Sub Last edited by jason7361 : Nov 12th, 2007 at 4:25 am.
•
•
Join Date: Dec 2002
Location: West Virginia
Posts: 405
Reputation:
Rep Power: 6
Solved Threads: 42
The same as the button.
However it does not act as you would think. By selecting more than one object and double click, only the one doubleclicked on will be transfered. If you hold down the ctrl and doubleclick, all will be transfered but the one doubleclicked on. If you select several with the shift and holding down the shift then all selected will be transfered. If you make several random selections with the ctrl key and then hold down the shift and doubleclick then everything between the first selected and last selected will be transfered.
Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
Dim i As Integer
For i = ListBox1.Items.Count - 1 To 0 Step -1
If ListBox1.GetSelected(i) = True Then
ListBox2.Items.Add(ListBox1.Items(i).ToString)
ListBox1.Items.RemoveAt(i)
End If
Next
End Sub Last edited by waynespangler : Nov 12th, 2007 at 9:48 am.
Wayne
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net .net framework 3.0 access accounting software selection asp business software code combo core custom data dropdownlist erp systems evaluation evaluations fedora legacy linux microsoft module net project project management reuse selection skin software selection software solutions technology evaluation theme web windows workflow
- Integer to string then 2 listbox (Visual Basic 4 / 5 / 6)
- needed linux project titles (Community Introductions)
- Linking two objectmodules OR Using 'Project' in VC++6.0 compiler? (C++)
- final year project (Java)
- project on the banking sector using .Net (VB.NET)
- Wanting to hire someone for a project.. (Software Development Job Offers)
- Need Ideas For Dissertations, Final Year Degree Project (IT Careers and Business)
- Wanted help for a Final Year Project Theme (Computer Science and Software Design)
Other Threads in the VB.NET Forum
- Previous Thread: aproplem
- Next Thread: Using vb.net for an EPOS System


Linear Mode