VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE

IdealSolution  (2 Submissions)   Miscellaneous   Visual Basic 5.0   Beginner   Wed 3rd February 2021

This function will return whether your program is running in Visual Basic Or it is running from the compiled EXE.
This Function tries to print in the immediate window using the Debug.print method, which is available only in VB IDE and will be removed while compiling the code to EXE (or dll or ocx). The value being print using Debug.print method the raises a division by zero error and the error handler set the InIDE function to TRUE.
I saw another code in vbcoders.com doing the same thing using a static variable and also calling the same function recursively. but this code is smaller than that.

Rate SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE (9(9 Vote))

Download SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE

SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters