Listbox Event Handling in C#

  • Thread starter Thread starter AB
  • Start date Start date
A

AB

Hi,

I have a listbox and a webbrowser control.
For each single item selected I am generating a different web page.

However for more than one selection, a common web page gets generated.

I am handling the event in Listbox selectedindexchanged.

It is working well with a single selection. if I am making multiple
selections using keyboard or mouse, my entire application hangs.

Can somebody help me with this problem.

Thanks
AB
 
It would be better to post this in the C# newsgroup and if possible with
some of your code demonstrating the issue.

Best Regards,
Stanimir Stoyanov | www.stoyanoff.info
 
Hi,

I have a listbox and a webbrowser control.
For each single item selected I am generating a different web page.

However for more than one selection, a common web page gets generated.

I am handling the event in Listbox selectedindexchanged.

It is working well with a single selection. if I am making multiple
selections using keyboard or mouse, my entire application hangs.

Can somebody help me with this problem.

Thanks
AB

*** Sent via Developersdexhttp://www.developersdex.com***

Unless you have an extremely good reason, I would suggest you get rid
of the web browser control and create the content differently (say
with WPF).

Also, why not just turn off multiple selection on the listbox?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
Run it under the IDE and break the execution when it hangs and see
where it is executing.
 
Hi,

I have a listbox and a webbrowser control.
For each single item selected I am generating a different web page.

However for more than one selection, a common web page gets generated.

I am handling the event in Listbox selectedindexchanged.

It is working well with a single selection. if I am making multiple
selections using keyboard or mouse, my entire application hangs.

Can somebody help me with this problem.

Thanks
AB

*** Sent via Developersdexhttp://www.developersdex.com***

Unless you have an extremely good reason, I would suggest you get rid
of the web browser control and create the content differently (say
with WPF).

Also, why not just turn off multiple selection on the listbox?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/

I am interested in your reason for getting rid of the web browser control.
What are the issues with this control

thanks
 
Unless you have an extremely good reason, I would suggest you get rid
of the web browser control and create the content differently (say
with WPF).

Also, why not just turn off multiple selection on the listbox?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/

I am interested in your reason for getting rid of the web browser control..
What are the issues with this control

thanks

In my experience, you usually gain nothing from the webbrowser control
than poor performance. Most of the time you can reproduce the behavior
of the webbrowser with other techniques (such as WPF) and get better
performance and more functionality.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
AB,

Be aware that a lot of people create recursive actions on a Listbox by the
events, be sure you did not do that, this is mostly the reason with slow
performance in a listbox. I doubt that it has something to do with your
webbrowser.

(recursive actions happens "by instance" as you add in an index change a new
item to the listbox)

Cor
 
Back
Top