BUG: event firing twice when once is enough

  • Thread starter news.microsoft.com
  • Start date
N

news.microsoft.com

Hi,

I made a user control and that consists of a HScroll control.

I catch the HScroll changed event for that HScroll control and fire my own
ItemChanged event.

When I use this control on a WinForm I put a break point on the event im
firing, and I see its being fired twice for the HScroll change yet Im only
sending this once. The value is the same so why is this firing twice?
 
J

Jon Skeet [C# MVP]

news.microsoft.com said:
I made a user control and that consists of a HScroll control.

I catch the HScroll changed event for that HScroll control and fire my own
ItemChanged event.

When I use this control on a WinForm I put a break point on the event im
firing, and I see its being fired twice for the HScroll change yet Im only
sending this once. The value is the same so why is this firing twice?

Could you post a short but complete program which demonstrates the
problem? See
http://www.pobox.com/~skeet/csharp/complete.html for what I mean.
 

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