473,811 Members | 3,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 selectedindexch anged.

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 3473
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******** ******@TK2MSFTN GP06.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 selectedindexch anged.

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 selectedindexch anged.

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 Developersdexht tp://www.developersd ex.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 selectedindexch anged.

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_newsgroup s" <ro********@yah oo.comwrote in message
news:f4******** *************** ***********@25g 2000hsx.googleg roups.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 selectedindexch anged.

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 Developersdexht tp://www.developersd ex.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...@ff apaysmart.com.a uwrote:
"rowe_newsgroup s" <rowe_em...@yah oo.comwrote in message

news:f4******** *************** ***********@25g 2000hsx.googleg roups.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 selectedindexch anged.
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 Developersdexht tp://www.developersd ex.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.blogsp ot.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.comschree f in bericht
news:OT******** ******@TK2MSFTN GP06.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 selectedindexch anged.

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
11852
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 to know which one is selected item before this event.?One thing is I can have a variable to hold the index in my application. I'm looking exactly like TreeView events(which fires events before expanding and after expanding the nodes).
2
7292
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 Click event. The reason being because sometime I change the selected item programmatically and sometimes the user selects the item. I'm wondering why selectedID, which is being set in SelectedValueChanged, is being displayed differently in the...
2
2006
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
3987
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
1713
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 Anchor the listbox T, L, R, B on the parent form The string items held within the listbox are quite big, much longer than could be displayed within the Listbox display area.
2
8892
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 Anchor the listbox T, L, R, B on the parent form The string items held within the listbox are quite big, much longer than could be displayed within the Listbox display area.
9
3250
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). This listbox has AutoPostback = True. When the user selects an item from this list, the second listbox is populated with more items relevant to this selection. I am using an SQLDataSource web control for this. These items are headers. I want, when...
2
2537
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
4758
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 was double clicked. Any idea how to go about this? Thanks
0
9724
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.