I have the following statement and the function 'InitialiseOsTransform' is in a Module which is in the project.

Code:
If InitialiseOsTransform() = False Then
But instead of the code going into this function it goes into the Paint function.

I have used the similar code in another project and it works correctly. I'm confused. What is going on?