Click here to Skip to main content
15,902,189 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCode Convert vb6 to vb.net Pin
charleslau28555-Sep-06 16:22
charleslau28555-Sep-06 16:22 
AnswerRe: Code Convert vb6 to vb.net Pin
hannesHTG5-Sep-06 23:07
hannesHTG5-Sep-06 23:07 
Questionlistbox Pin
sash625-Sep-06 14:22
sash625-Sep-06 14:22 
AnswerRe: listbox Pin
KhadijaYaseen7-Sep-06 22:03
KhadijaYaseen7-Sep-06 22:03 
QuestionComboBox.Collection example ? Pin
dcassidy5-Sep-06 11:19
dcassidy5-Sep-06 11:19 
Questionvb.net application sending realtime data to web service Pin
anthony Glover5-Sep-06 10:00
anthony Glover5-Sep-06 10:00 
QuestionListbox To Textbox Pin
FeRtoll5-Sep-06 8:37
FeRtoll5-Sep-06 8:37 
AnswerRe: Listbox To Textbox Pin
dcassidy5-Sep-06 13:51
dcassidy5-Sep-06 13:51 
Well I guess you could be clever and keep a reference to all the selections but I have found that using the Stringbuilder Class takes a lot of overhead out of string manipulation - note each time a selection/deselection is made then a complete rebuild is done - beats having to keep track of other stuff - great advantage of the StringBuilder is SPEED. There is another more fancy way for handling this using Predicates and Actions as described in the new article (worth a read)http://msdn.microsoft.com/msdnmag/issues/06/09/AdvancedBasics/default.aspx

Anyway to keep things simple....Hope this helps...

Private mstrbld As New StringBuilder
Private mcolSelectedObjects As ListBox.SelectedObjectCollection
Private mobjSelectedObject As Object

Private Sub lstListBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstListBox.SelectedIndexChanged
mstrbld.Length = 0
mcolSelectedObjects = Me.lstListBox.SelectedItems
For Each mobjSelectedObject In mcolSelectedObjects
mstrbld.Append(mobjSelectedObject.ToString & vbCrLf)
Next
Me.txtTextBox.Text = mstrbld.ToString

End Sub


Questionntgraph and visual basic 6.0 code samples Pin
BigTenFootball5-Sep-06 8:05
BigTenFootball5-Sep-06 8:05 
QuestionApplication update - To skip or not to skip Pin
KreativeKai5-Sep-06 5:47
professionalKreativeKai5-Sep-06 5:47 
QuestionViewing generated code Pin
dptalt5-Sep-06 5:40
dptalt5-Sep-06 5:40 
AnswerRe: Viewing generated code Pin
Ed.Poore5-Sep-06 12:06
Ed.Poore5-Sep-06 12:06 
QuestionAssemblyVersion vs PublishVersion Pin
KreativeKai5-Sep-06 5:28
professionalKreativeKai5-Sep-06 5:28 
QuestionConnecting one form with two different databases or datatable using diff dataadapters Pin
Nikhil Bandekar5-Sep-06 3:44
Nikhil Bandekar5-Sep-06 3:44 
QuestionDrag and Drop Question Pin
rgaleote5-Sep-06 3:37
rgaleote5-Sep-06 3:37 
QuestionCompare 2 Time Strings Pin
japel5-Sep-06 2:22
japel5-Sep-06 2:22 
AnswerRe: Compare 2 Time Strings Pin
Tamimi - Code5-Sep-06 2:40
Tamimi - Code5-Sep-06 2:40 
AnswerRe: Compare 2 Time Strings Pin
japel5-Sep-06 2:49
japel5-Sep-06 2:49 
Questionopen folder Pin
Sasmi5-Sep-06 1:05
Sasmi5-Sep-06 1:05 
Answeropen folder Pin
Kanniah5-Sep-06 4:11
Kanniah5-Sep-06 4:11 
Questionhexa convert to bits Pin
Muad_Dib4-Sep-06 23:16
Muad_Dib4-Sep-06 23:16 
AnswerRe: hexa convert to bits Pin
progload5-Sep-06 9:26
progload5-Sep-06 9:26 
Questionlistview Daily Report! Pin
charleslau28554-Sep-06 22:10
charleslau28554-Sep-06 22:10 
Answercant show the msgbox?? [modified] Pin
campbells4-Sep-06 21:44
campbells4-Sep-06 21:44 
AnswerRe: cant show the msgbox?? Pin
Guffa4-Sep-06 22:08
Guffa4-Sep-06 22:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.