|
-
Jul 13th, 2011, 03:56 AM
#1
Thread Starter
Hyperactive Member
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?
-
Jul 13th, 2011, 04:02 AM
#2
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.
.
-
Jul 13th, 2011, 04:08 AM
#3
Thread Starter
Hyperactive Member
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.
-
Jul 13th, 2011, 04:12 AM
#4
Addicted Member
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.
-
Jul 13th, 2011, 04:23 AM
#5
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!).
-
Jul 13th, 2011, 04:25 AM
#6
Thread Starter
Hyperactive Member
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.
-
Jul 13th, 2011, 04:29 AM
#7
Addicted Member
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 ?
-
Jul 13th, 2011, 04:30 AM
#8
Hyperactive Member
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
-
Jul 13th, 2011, 04:33 AM
#9
Thread Starter
Hyperactive Member
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.
-
Jul 13th, 2011, 04:41 AM
#10
Re: Function in module is not being called
Put a breakpoint on the first line within that method.
-
Jul 13th, 2011, 05:02 AM
#11
Thread Starter
Hyperactive Member
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.
-
Jul 13th, 2011, 05:09 AM
#12
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|