VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



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

by IdealSolution (2 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

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

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

Download SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE (2 KB)

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

No comments have been posted about SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE. Why not be the first to post a comment about SMALLEST CODE FOR FINDING WHETHER PROGRAM IS RUN FROM VB IDE OR COMPILED EXE.

Post your comment

Subject:
Message:
0/1000 characters