Yup, use some precompiler conditionals:

#If DEMO Then
Msgbox("Buy the FULL version now!")
#Else
...
...{complex functions goes here}
...
#End If

Basically, if the compiler flag "DEMO" is set, it only compiles the first chunk. In the final program, there's no trace of the "real" code. You can create your own compiler flags in the Advanced Compile options and you switch between them with the Build Configuration Manager. Basically, you're making a "Demo-Release" and "Demo-Debug" build that are exactly like your "Release" and "Debug" build, except they have the "DEMO" flag on.