Hi,
Thanks for your comments, but I'm afraid I do not follow you.
The function that I am using to handle the Click event RemoveTab, has the
required arguments that you mention, and obviously works just fine because
the remove tab button is handled by this and works without fault.
Private Sub RemoveTab(ByVal sender As System.Object, ByVal e As
System.EventArgs)
I can only assume that you meant the arguments should be added to the
btnClose.Click argument of the AddHandler statement, but the compiler will
not allow this. The AddHandler function takes the simple name of the
event, in fact intellisense itself adds the event object in this exact
format. Likewise with the RemoveTab delegate function.
So, can you please explain what you meant as I am still beating my head
against a wall. I have tried every way I can think of off doing it and I
still get the same error. If there is a problem with my code can you give
me a example of what it should be please?
Cheers,
Stuart Anderson
> The problem is that you have not matched the expected arguments required.
The button events expect to have 2 arguments (system object and event
args).
You supplied neither. I am surprised that the compiler did not report an
error. I guess when you add a handler in this manner, you are expected to
know the arguments required....
There certainly is nothing wrong with the registry either, as can be seen
by
re-running your code and not clicking the faulty "close" button.
Richard Ainsley