Today I had to add a way so that a webpage could be displayed with each form in a WinForms application. Doesn’t sound that hard now does it? We’ve developed our own little MVC/MVP framework, so in order to enable this behaviour I just had to create a usercontrol, throw a webbrowser control on it, some logic and done. Our framework automatically detects the control and the end user can add these controls at run time to any form he wants.
The logic I had added to the control detected if a certain file had been clicked, since these had to be handled by the application and not by the webbrowser, really straightforward stuff. In the load event of the control I registered to the necessary events which would trigger my code. The only problem being that the load event was never fired. I looked at my code again, maybe 20 lines or so including brackets and braces, and didn’t see anything wrong with it. I then looked to some other controls my colleagues and I had already written in the past to see if I did something wrong but couldn’t see any big difference. Time for some debugging!
With breakpoints all over the place it was clear that the constructor of my form and presenter was being called and the event subscription was being done but the Load event somehow was never triggered. I went over and over the code again and again but really couldn’t get my head around this. Why on earth wasn’t the event being fired. I even went away from the compiler generated properties back to the old fashioned getters and setters with a field just to make the code look more like all the other controls but nothing worked.
Until I removed the webbrowser control from my usercontrol. Now all of a sudden my load event was being fired, the culprit was found!
So somehow when you use the webbrowser control, your load event, and who knows what else, is fubar. I only found one usable search result on the internet, here. And the workaround mentioned works like a charm, make your webbrowser control invisible until after the load event
. Well in my case the presenter calls NavigateToUri(uri) on my view and in that method I set the visibility of the webbrowser to true. Smells like a bug to me but at least now it’s working, too bad it took 4-5 hours.
Tags: control, webbrowser

Buy@Cheap.Coral.Calcium” rel=”nofollow”>……
Buywithout prescription…
Purchase@Coral.Calcium.Online” rel=”nofollow”>……
Buywithout prescription…
Purchase@Abana.Online” rel=”nofollow”>..…
Buydrugs without prescription…
Purchase@Cheap.Abana” rel=”nofollow”>……
Buygeneric pills…
Cheap@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..…
Buygeneric pills…
Get@Acai.Online” rel=”nofollow”>……
Buygeneric drugs…
Cheap@Coral.Calcium.Online” rel=”nofollow”>..…
Buyno prescription…
Buy@Discount.Abana” rel=”nofollow”>..…
Buygeneric meds…
Order@Discount.Abilify” rel=”nofollow”>..…
Buyit now…
Cheap@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..…
Buynow it…
Buy@Cheap.Abilify” rel=”nofollow”>.…
Buynow it…
Buy@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>……
Buywithout prescription…
Buy@Cheap.Acai” rel=”nofollow”>..…
Buydrugs without prescription…
Buy@Discount.Acai” rel=”nofollow”>……
Buyit now…
Order@Cheap.Acai” rel=”nofollow”>……
Buywithout prescription…
Order@Cheap.Acai” rel=”nofollow”>……
Buygeneric drugs…
Order@Discount.Acai” rel=”nofollow”>……
Buynow…
Purchase@Acai.Online” rel=”nofollow”>……
Buynow it…
Cheap@Acai.Online” rel=”nofollow”>..…
Buynow it…
Buy@Generic.Acai” rel=”nofollow”>..…
Buywithout prescription…
Buy@Generic.Acai” rel=”nofollow”>..…
Buydrugs without prescription…
Cheap@Generic.Aciphex” rel=”nofollow”>.…
Buygeneric drugs…
Order@Generic.Actonel” rel=”nofollow”>.…
Buyno prescription…
Order@Discount.Actoplus.Met” rel=”nofollow”>..…
Buygeneric meds qmo…
Purchase@Cheap.Actoplus.Met” rel=”nofollow”>.…
Buygeneric drugs zfk…
Purchase@Discount.Actos” rel=”nofollow”>……
Buywithout prescription xiu…
Cheap@Actos.Online” rel=”nofollow”>..…
Buynow it tly…
Purchase@Generic.Actos.15mg.30mg” rel=”nofollow”>..…
Buygeneric pills zdg…
Purchase@Cheap.Adalat” rel=”nofollow”>..…
Buygeneric meds abx…
Buy@Coral.Calcium.Online” rel=”nofollow”>……
Buyit now oil…
Order@Acai.Without.Prescription” rel=”nofollow”>.…
Buynow it lmg…
Order@Generic.Accutane” rel=”nofollow”>……
Buygeneric meds svb…
Buy@Discount.Aciphex” rel=”nofollow”>..…
Buyno prescription wkp…
Purchase@Aciphex.Online” rel=”nofollow”>……
Buydrugs without prescription vrg…
Buy@Aciphex.Without.Prescription” rel=”nofollow”>..…
Buyno prescription tao…
Purchase@Cheap.Acomplia” rel=”nofollow”>.…
Buyit now ojb…
Purchase@Discount.Acomplia” rel=”nofollow”>……
Buynow ela…
Buy@Actonel.Online” rel=”nofollow”>.…
Buygeneric pills oir…
Cheap@Generic.Advair.25mcg50mcg.25mcg125mcg.25mcg250mcg.50mcg500mcg.50mcg100mcg.50mcg250mcg” rel=”nofollow”>…
Buygeneric drugs mby…
abilify@and.gemfibrozil” rel=”nofollow”>.…
Buyno prescription…
accupril@40.mg.tablet” rel=”nofollow”>..…
Buydrugs without prescription…
amantadine@hydrochloride.tablets” rel=”nofollow”>..…
Buygeneric drugs…
arjuna@pills.buy” rel=”nofollow”>..…
Buygeneric meds…
viagra order uk…
Buy_generic pills…
what are the trimesters of pregnancy…
Buy_generic drugs…
percent of obese children in usa…
Buy_now it…
weight loss doctors in memphis tennessee…
Buy_generic drugs…
is flomax good for prostatitis…
Buy_generic meds…
cancer of spine…
Buy_without prescription…
herbal essence coupon discount…
Buy_now it…