Function in module is not being called
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?
Re: Function in module is not being called
It would help if you posted some more of the relevant code, or if possible upload the project as a zip file. Without that nobody could make anything out of the single line.
.
Re: Function in module is not being called
The project is large and it would be difficult to cut down to show this problem.
I wondered if anyone had any idea why the function was not being called.
Thanks.
Re: Function in module is not being called
Have you tried to step through the code and see what is being returned from the module function ?
Maybe you could post the InitialiseOsTransform() function so we can see whats happening ? because as Honeybee said without seeing what is happening we cant really help. ;)
Re: Function in module is not being called
Its possible you have asked to step-over properties and operators, checkout this link to make sure you have it turned off (you can do it just for that line however, if your right-click it!).
Re: Function in module is not being called
When I ste[p through the code it gets to this statement but doesn't go into the function - this is what is strange.
Re: Function in module is not being called
Are you sure that the function is returning something ? If possible please post the module InitialiseOsTransform() or that the previous line is not making it skip past this function ?
Re: Function in module is not being called
Can you post the code of those two functions?, you've mentioned above.
if you do post your code I can get some learning from it too :)
Re: Function in module is not being called
I looked for the 'Step over properties' - but I have the express edition so this isn't available.
Re: Function in module is not being called
Put a breakpoint on the first line within that method.
Re: Function in module is not being called
I did have a breakpoint on the first line of the function.
Thanks for all your suggestions.
I have taken the project that was working calling that function, copied and renamed the project, stripped out all the bits I didn't need and it is working. I'm therefore going to use that project and scrap the project that wasn't working.
Thanks for your advice.
Re: Function in module is not being called
Was the function in another module in a different project (you have not mentioned that it was) ? If it was, possbily the other project is not being compiled in debug mode, or you have not setup the project dependency correctly.