473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Listbox Event Handling in C#

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

*** Sent via Developersdex http://www.developersdex.com ***
Jul 29 '08 #1
6 3449
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

"AB" <an***********@gmail.comwrote in message
news:OT**************@TK2MSFTNGP06.phx.gbl...
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 Developersdex http://www.developersdex.com ***
Jul 29 '08 #2
On Jul 29, 3:35*pm, AB <anupamabis...@gmail.comwrote:
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/
Jul 29 '08 #3
Run it under the IDE and break the execution when it hangs and see
where it is executing.

On Tue, 29 Jul 2008 12:35:51 -0700, AB <an***********@gmail.com>
wrote:
>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 Developersdex http://www.developersdex.com ***
Jul 29 '08 #4
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:f4**********************************@25g2000h sx.googlegroups.com...
On Jul 29, 3:35 pm, AB <anupamabis...@gmail.comwrote:
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
Jul 30 '08 #5
On Jul 29, 10:41*pm, "Harry" <harryNoS...@ffapaysmart.com.auwrote:
"rowe_newsgroups" <rowe_em...@yahoo.comwrote in message

news:f4**********************************@25g2000h sx.googlegroups.com...
On Jul 29, 3:35 pm, AB <anupamabis...@gmail.comwrote:
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
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/
Jul 30 '08 #6
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

"AB" <an***********@gmail.comschreef in bericht
news:OT**************@TK2MSFTNGP06.phx.gbl...
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 Developersdex http://www.developersdex.com ***
Jul 30 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: KK | last post by:
Hi All... For my purpose, I need to handle listbox selection changed event.I must be notified before changing occurs and after.After I can handle using SelectedIndexChanged event.Is there anyway...
2
by: Jared Baszler | last post by:
I just wanted to write and ask why the below behavior is occuring. I've simply put a list box on a form and populated it with two items. I'm handling both the SelectedValueChanged event and the...
2
by: Brent Hoskisson | last post by:
Does anyone know where I can find a listbox control for VB.NET where the items in the can be color coded. Thanks Brent
4
by: Selva Chinnasamy | last post by:
I like to implement auto scrolling to the best match in the listbox as I type. Your response is highly appreciated. Selva
0
by: Paul_Madden via DotNetMonster.com | last post by:
I am handling the Listbox DrawItem event to enable the listbox strings to be displayed in different colours for easy reading. Have set ScrollAlwaysVisible and HorizontalScrollbar to true. I...
2
by: Paul_Madden via DotNetMonster.com | last post by:
I am handling the Listbox DrawItem event to enable the listbox strings to be displayed in different colours for easy reading. Have set ScrollAlwaysVisible and HorizontalScrollbar to true. I...
9
by: zdrakec | last post by:
Hello all: Clearly, I'm not getting it! Here is the scenario: On a web page, I have two list boxen and a text box. The first listbox is populated at page load time (if it is not a postback)....
2
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
I have tried to use a ListBox with SelectionMode set to MultiSimple. I have also tried quite a lot of the event handlers, but no events seem to be triggered. Why aren't the events triggered?
4
by: Jeff User | last post by:
Hi Using .NET 1.1, C#, web app I (actually our client) would like to be able to double click a selection in a listbox and have it postback to server . There I would want to access the item that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.