Listbox Event Handling in C#

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
 
S

Stanimir Stoyanov

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
 
R

rowe_newsgroups

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/
 
J

Jack Jackson

Run it under the IDE and break the execution when it hangs and see
where it is executing.
 
H

Harry

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
 
R

rowe_newsgroups

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/
 
C

Cor Ligthert[MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top