?
Solved

ListBox Items not Visible

Posted on 2004-11-19
5
Medium Priority
?
460 Views
Last Modified: 2008-03-17
In windows form I just created a ListBox.

Added some items
ListBox1.Items.Add("Item-1");
ListBox1.Items.Add("Item-2");
and so on.

When I run it - these entries are not visible.
I just added a textBox and captured the ListBox1_SelectedIndexChanged event to put the Item's value to the TextBox.  The textBox is getting filled the correct data when I navigate in the ListBox.  It is just that the ListBox Items are not visible.  Looks  very strange to me.

Any ideas will be appreciated.

Thanks.
Sudha
0
Comment
Question by:getsudha
5 Comments
 
LVL 5

Expert Comment

by:volking
ID: 12630367
Try adding "this." to every ListBox1 reference.
this.ListBox1.Items.Add("Item-1");
this.ListBox1.Items.Add("Item-2");

I assume you're adding the items during the Form.Load event, right?
0
 
LVL 8

Accepted Solution

by:
AaronReams earned 200 total points
ID: 12630497
0
 
LVL 8

Expert Comment

by:AaronReams
ID: 12630569
Glad that fixed your problem.   Just in case the above link every breaks, here is the solution for all you future answer seekers...

<snip>
I recently installed McAfee 8 and the buffer overflow protection was the
culprit. Once disabled the messagebox behaved normally. Many thanks to
those who pointed this out.
</snip>
0
 

Author Comment

by:getsudha
ID: 12630572
Yes that was it.  Thanks a lot for finding it.  
Buffer Overflow protection of mcAfee VirusScan Enterprise ver. 8.0i was the culprit.  I am going to post this to mcAfee, they can change the definition for Buffer OverFlow protection to avoid this.

Thanks.
Sudha
0
 
LVL 9

Expert Comment

by:GivenRandy
ID: 14059729
This was supposedly fixed, but we keep updated with the latest versions (daily) and we still have this problem. The irritant is that most users cannot modify their Buffer Overflow Protection because they lack admin rights. Any idea when this will be fixed by McAfee?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question