The signature (i.e. the method definition) must match.
Just subclass the thread and add a Run(variable1, variable2…etc) event, then AddHandler will work.
I do not quite understand what you want to achieve. If you create a handler method to have that method execute upon thread.run, by definition, there is no parameters to pass to Run. You will not be able to do Thread.Run(variable1,variable2,etc.).
What you can do is add your parameters either inside MyMethod, or if you need to modify them outside, add properties to a module and set them before you call Thread.run.
You could put a property on the WebPage itself, set that and then have the thread check or set the property, but it will be much more portable if you subclass WebThread and add parameters to Run or properties to the subclass.
i create a webthread with the correct addressof method and its working.
But how i can do the same but i need to pass more variables to the method, example
t = new webthread
addhandler t.run, addressof Mymethod(variable1, variable2…etc)
Please help[/quote]
Create one object that is the “Context”
Add whatever parameters to that and pass one of those to your method
Any time you need to add more parameters you adjust the Context object & the code that uses it but never the actual method signature