-
Jan 7th, 2005, 12:55 PM
#1
Thread Starter
Fanatic Member
Help with ListBox error [resolved]
This is the error i get when trying to do FolderList.Items.Clear() or anything else dealing with the list box that i added to my form.
An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication1.exe
Additional information: Object reference not set to an instance of an object.
Last edited by nkad; Jan 7th, 2005 at 03:44 PM.
-
Jan 7th, 2005, 12:57 PM
#2
Re: Help with ListBox error
i know this is probably a stupid question but are then items in the list?
-
Jan 7th, 2005, 01:03 PM
#3
Thread Starter
Fanatic Member
Re: Help with ListBox error
no, but it still gives the same error even when i try to just add items to the list.
-
Jan 7th, 2005, 01:04 PM
#4
Re: Help with ListBox error
-
Jan 7th, 2005, 01:22 PM
#5
Re: Help with ListBox error
try deleting and readding FolderList to your form (please note this will require that you "rewire" any events for FolderList that were being handled in code)
it sounds like at some point the name got changed or something and it was not reflected in the collapsed for designer code
-
Jan 7th, 2005, 02:03 PM
#6
PowerPoster
Re: Help with ListBox error
Originally Posted by nkad
no, but it still gives the same error even when i try to just add items to the list.
That is not clear. Do you mean that you can't add items to the list?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jan 7th, 2005, 02:37 PM
#7
Thread Starter
Fanatic Member
Re: Help with ListBox error
Correct. I can not add items to the ListBox. When I try to, I get this error
An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication1.exe
Additional information: Object reference not set to an instance of an object.
I have tried deleting the control and re-adding it and using the default name of the control; ListBox1.
I still get the same error.
-
Jan 7th, 2005, 02:41 PM
#8
Re: Help with ListBox error
can you add anything at all even a string?
-
Jan 7th, 2005, 02:48 PM
#9
Re: Help with ListBox error
try a rebuild all.. perhaps its using an old cache of the compiled exe
-
Jan 7th, 2005, 03:03 PM
#10
Thread Starter
Fanatic Member
Re: Help with ListBox error
Rebuilt entire project.... no luck
ListBox1.Items.Add("fun")
doesnt work.
-
Jan 7th, 2005, 03:10 PM
#11
Re: Help with ListBox error
try creating a new project and adding a listbox and trying to add an item... if that fails as well then perhaps something is screwy with your install and it may require a reinstallation... otherwise at least it has to do just with that project
-
Jan 7th, 2005, 03:21 PM
#12
Thread Starter
Fanatic Member
Re: Help with ListBox error
wow... creating a new projected worked.... go figure.
thanks!
-
Jan 7th, 2005, 03:25 PM
#13
PowerPoster
Re: Help with ListBox error
A few questions.
Did you create the Listbox in code or in design mode?
Are you getting the error at design time or run time?
If at runtime, does any previous part of the program run?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|