Quote Originally Posted by ogagsme
ok got it now...the code must be in a module
Correct. All hooks and callbacks in VB must reside in a regular BAS module. They can not be in any form of class modules (and a Form is a sort of class module), the reason for this is that a class have a reference counter to keep track of the number of references it has. But a callback is called by an external thread and doesn't have a reference to any object.