4 Replies - 720 Views - Last Post: 28 September 2013 - 07:15 PM Rate Topic: -----

#1 MaggieWu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 28-September 13

'Items' is not a member of 'System.Windows.Forms.RichTextB

Posted 28 September 2013 - 06:24 PM

Attached ImageI keep having trouble with the codes 'Items.Add', I did everything right but I'm still getting errors. I can't figure out where I did wrong...
Is This A Good Question/Topic? 0
  • +

Replies To: 'Items' is not a member of 'System.Windows.Forms.RichTextB

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1043
  • View blog
  • Posts: 4,057
  • Joined: 02-July 08

Re: 'Items' is not a member of 'System.Windows.Forms.RichTextB

Posted 28 September 2013 - 06:43 PM

You have a control that is a RichTextBox named lstResults and it looks like you think you have a ListBox by that name. Hence the error. The error is very specific - why are you confused?
Was This Post Helpful? 0
  • +
  • -

#3 MaggieWu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 28-September 13

Re: 'Items' is not a member of 'System.Windows.Forms.RichTextB

Posted 28 September 2013 - 06:52 PM

View Post_HAWK_, on 28 September 2013 - 06:43 PM, said:

You have a control that is a RichTextBox named lstResults and it looks like you think you have a ListBox by that name. Hence the error. The error is very specific - why are you confused?

This is my first time using visual basic and I don't know anything about it. I was reading the book and doing the problem then I got stuck on this one...can you explain it a little more clear? I don't understand what it has to do with Listbox.
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1043
  • View blog
  • Posts: 4,057
  • Joined: 02-July 08

Re: 'Items' is not a member of 'System.Windows.Forms.RichTextB

Posted 28 September 2013 - 07:04 PM

You add items to a Listbox just like that. And the naming convention also is similar to what some people use for the Listbox - lst... When you type your objects into Visual Studios there is this thing called intellisense and it tells you what properties or methods belong to it. That will be your guide. So explain what you want to do here and we can help.
Was This Post Helpful? 0
  • +
  • -

#5 MaggieWu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 28-September 13

Re: 'Items' is not a member of 'System.Windows.Forms.RichTextB

Posted 28 September 2013 - 07:15 PM

View Post_HAWK_, on 28 September 2013 - 07:04 PM, said:

You add items to a Listbox just like that. And the naming convention also is similar to what some people use for the Listbox - lst... When you type your objects into Visual Studios there is this thing called intellisense and it tells you what properties or methods belong to it. That will be your guide. So explain what you want to do here and we can help.

Ohhh...I get it now. I put in RichText box instead of Listbox! I was wondering why it wouldn't work. Thank you so much!!!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1