3 Replies - 201 Views - Last Post: 24 February 2013 - 09:04 AM Rate Topic: -----

#1 triangulator  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 27
  • Joined: 03-February 13

How to change a method of an event externally?

Posted 24 February 2013 - 06:54 AM

As I was testing my program, I stumbled upon win32exception:
Spoiler

When I viewed the locals of the line that gave the exception:
if(!kontrol.pz.IsDisposed) kontrol.pz.Dispose();

all the members of kontrol.pz had objectdisposedexception.

I searched the net and found this solution: http://stackoverflow...nested-controls
It requires that I override a method of a control, however that method is protected and I can't find where the class is(TabControl). How can I override the method externally?

This post has been edited by triangulator: 24 February 2013 - 06:55 AM


Is This A Good Question/Topic? 0
  • +

Replies To: How to change a method of an event externally?

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5522
  • View blog
  • Posts: 11,830
  • Joined: 02-June 10

Re: How to change a method of an event externally?

Posted 24 February 2013 - 07:36 AM

No. You don't get to change the code of someone else's program/dll.

Also - The error doesn't mean there is a problem in the code of that dll. It means you've made a mistake in how you've used it.

I can guarantee if there was a problem with the System.Windows.Forms not being able to provide handles it would have come up long before now.

If the choice is between:
  • you made a mistake, or
  • there is a bug in the .NET framework developed over years by hundreds of experienced developers, and further used by millions of developers before you started learning.

The answer is usually #1
Was This Post Helpful? 1
  • +
  • -

#3 triangulator  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 27
  • Joined: 03-February 13

Re: How to change a method of an event externally?

Posted 24 February 2013 - 08:48 AM

So how do I check where I've made the mistake? The IDE didn't provide any additional information.
Was This Post Helpful? -1
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5522
  • View blog
  • Posts: 11,830
  • Joined: 02-June 10

Re: How to change a method of an event externally?

Posted 24 February 2013 - 09:04 AM

From my FAQ list:

What does this error message mean?



Was This Post Helpful? 0
  • +
  • -

Page 1 of 1