Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#INCLUDE - VFP Preprocessor file
Message
From
31/12/2003 13:24:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00863051
Message ID:
00863190
Views:
90
>Okay, I went back to the one set of code where this worked perfectly and found that the
>
>
#INCLUDE CONSTANTS.H
>
>statement was not in the INIT of my form, but in the actual procedure within the form where it was needed right away. I assumed that if it were in the INIT that it would carry through in a GLOBAL manner on the form level, but that is not the case.
>
>The #INCLUDE has to be placed precisely where it is needed, if in a form, then right in the procedure in the form where it is needed. Placing it in INIT event/procedure did not do the trick, since the
>
>
#DEFINE CRLF CHR(13) + CHR(10)
>
>was to be used in a procedure within the form.

That belief probably stems from the fact that this is, more or less, the case in FoxPro 2.x.

In VFP, to use an include file globally in a form, give the command "Form | Include...", and select your include file.

You can specify only a single #include file; for more than one, have a global #include file that #includes others.

For a class, the command is similar: "Class | Include..."
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform