listbox shows blank items

  • Thread starter Thread starter 2989coder
  • Start date Start date
2

2989coder

Hi,

I have Windows 2000 SP4, Visual Studio 2003 (Microsoft Development
Environment 2003 / Version 7.1.3088), with Microsoft >NET Framework 1.1
(Version 1.1.4322 SP1).

Using C#, C++, or VB I create an application with
one form containing only a listbox, a textbox and a button.
The only code I type is for the button: when clicked
the code copies the text from the textbox to the listbox:

in C#:
private void button1_Click(object sender, System.EventArgs e) {
listBox1.Items.Add(textBox1.Text);
}

It appears the text is copied (I can select it), but
no text appear in the listbox.

When run the compiled program on a colleague's Windows XP
computer the result was the same!


Is this a framework issue (I hardly believe that!)?
Something on our computer's setup?

Any suggestion appreciated.
Many thanks
 
2989coder said:
I have Windows 2000 SP4, Visual Studio 2003 (Microsoft Development
Environment 2003 / Version 7.1.3088), with Microsoft >NET Framework 1.1
(Version 1.1.4322 SP1).

Using C#, C++, or VB I create an application with
one form containing only a listbox, a textbox and a button.
The only code I type is for the button: when clicked
the code copies the text from the textbox to the listbox:

in C#:
private void button1_Click(object sender, System.EventArgs e) {
listBox1.Items.Add(textBox1.Text);
}

It appears the text is copied (I can select it), but
no text appear in the listbox.

If you are using McAfee AntiVirus 8 or a similar virus scanner, turn off
buffer overflow protection.
 
I have a textbox that does not respond to Enter key(happen in my PC only).
Is it also because of McAfee AntiVirus?

Dennis
 
BVM said:
I have a textbox that does not respond to Enter key(happen in my PC only).
Is it also because of McAfee AntiVirus?

I don't know. Do you use McAfee AntiVirus?
 
Sorry for the delay in answering.

That was it!
Thank you very much.


After a few tests I realised the buffer overflow protection only has to be
off when compiling the code, not when it is run.
 
Well ... I right-click the McAffee icon next to
the clock and select "VirusScan Console...".

After that I get a window with a number of tasks.
I select the "Buffer Overflow Protection" task
and click the "Stop" icon in the toolbar (the 3rd icon).




What do you mean the textbox does not respond to the
Enter key?
AFAICT there is no method for the textbox specifically
associated with <ENTER>. You have to define a default
button which will trigger its click action when <ENTER>
is pressed in the textbox (I think).
 
Last week I typed on the textbox(have tried both Rich textbox and normal
textbox), I typed Enter then the text just returned. Last weekend some admin
guys have done/installed something on my machine(including Antivirus
software, I think), then this problem happens.It's very weird. I can type
text, but not the ENTER key anymore. Sevral of us have this problem. Just
don't know what causes it.

Thanks,

Dennis
 
After last update (now I have VirusScan Enterprise
8.0.0 with Scan engine 4320 and Buffer Overflow
Protection Deifnitions 131; Patch Versions
1, 4, 5, 7,8, 9) the problem disappeared!
 
Thank you very much, I have spent all my spare time for the past 2 days
trying to figure this out.

John
 
I have the same problem with the Listboxes and MessageBoxes (blank text),
when the Buffer Overflow Protection is enabled. Where can I find these patch
versions (1, 4, 5, 7, 8, 9). I searched in Mcafee and I found nothing.
 
Back
Top