New Line in listbox (vb6)

New Line in listbox (vb6)

Page 1 of 1

7 Replies - 6407 Views - Last Post: 31 May 2010 - 12:41 PM Rate Topic: -----

#1 Its Me  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-May 10

New Line in listbox (vb6)

Posted 29 May 2010 - 04:12 PM

I hope to give me the code that I can getting down to new line (listbox) (vb6)



thanks
Is This A Good Question/Topic? 0
  • +

Replies To: New Line in listbox (vb6)

#2 Nikhil_07n  Icon User is offline

  • The cheese stands alone..
  • member icon

Reputation: 49
  • View blog
  • Posts: 2,489
  • Joined: 09-January 09

Re: New Line in listbox (vb6)

Posted 29 May 2010 - 07:34 PM

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 Its Me  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-May 10

Re: New Line in listbox (vb6)

Posted 30 May 2010 - 04:29 AM

View PostNikhil_07n, on 29 May 2010 - 06:34 PM, said:

[rules][/rules]



OK!


If List2.ListCount = List1.ListCount Then
List2.ListIndex = ListIndex + 1
List1.ListIndex = ListIndex + 1
Text1 = List2.Text
Text1.Text = ""
MsgBox ("Ok")

This post has been edited by Its Me: 30 May 2010 - 04:30 AM

Was This Post Helpful? 0
  • +
  • -

#4 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 465
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: New Line in listbox (vb6)

Posted 30 May 2010 - 05:07 AM

assuming your index begin from 0. here is an example:
Private Sub Command1_Click()
Dim i As Integer
'add 3 items in listbox'
List1.AddItem "it1"
List1.AddItem "it2"
List1.AddItem "it3"
'show the 3 items added'
For i = 0 To List1.ListCount - 1
    MsgBox List1.List(i)
Next
End Sub


Was This Post Helpful? 0
  • +
  • -

#5 Its Me  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-May 10

Re: New Line in listbox (vb6)

Posted 30 May 2010 - 09:45 AM

View PostNoBrain, on 30 May 2010 - 04:07 AM, said:

assuming your index begin from 0. here is an example:
Private Sub Command1_Click()
Dim i As Integer
'add 3 items in listbox'
List1.AddItem "it1"
List1.AddItem "it2"
List1.AddItem "it3"
'show the 3 items added'
For i = 0 To List1.ListCount - 1
    MsgBox List1.List(i)
Next
End Sub




I don't want this code .. I will explain for you what I mean

I have two ( listbox)

suppose I have two lists ok!! I want when the word in list1 is the same in list2 is getting down in list1 and list2‎
Was This Post Helpful? 0
  • +
  • -

#6 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 465
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: New Line in listbox (vb6)

Posted 30 May 2010 - 11:03 AM

well yea :)
now put 2 for cycles one in another that way you can check if the items in listbox 1 is in listbox 2 and the part where i show the items replace it to populate the textboxes
Was This Post Helpful? 0
  • +
  • -

#7 Its Me  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 29-May 10

Re: New Line in listbox (vb6)

Posted 31 May 2010 - 12:15 PM

View PostNoBrain, on 30 May 2010 - 10:03 AM, said:

well yea :)
now put 2 for cycles one in another that way you can check if the items in listbox 1 is in listbox 2 and the part where i show the items replace it to populate the textboxes



Look

http://rapidshare.co...5/test.rar.html
Was This Post Helpful? 0
  • +
  • -

#8 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 465
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: New Line in listbox (vb6)

Posted 31 May 2010 - 12:41 PM

0 effort do you even try it.
ok so here is how we list if items from listbox1 searching for the match in listbox2
Private Sub Command1_Click()
Dim i, l As Integer
For i = 0 To List1.ListCount - 1
    For l = 0 To List2.ListCount - 2
        'we list every element in listbox2'
        'while 1 element from listbox1 is selected'
    Next l
Next i
End Sub



i hope you make it from here ...

This post has been edited by NoBrain: 31 May 2010 - 12:42 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1