Quote Originally Posted by penagate
Now if only we could find a way to get around the BAS module limitation... I know you can do it using machine code, so maybe there are ways to do that too.
The AddressOf keyword only works with procedures in modules. The reason MS implemented it this way is because normally callbacks are called from an API function that runs in a separate thread and as such they can't be used with classes or forms that's created by the main thread in VB.

Since besides the AddressOf keyword there isn't any other native way to get the address of a function I doubt you will find a way. However I don't think that is much of a limitation. The fact that the callback needs four arguments is not much of a limitation either. All callbacks have a determent signature that you must follow so that doesn't matter much. If you need more arguments you can simply do as the API functions does, pass the address of a UDT (struct).