|
-
Sep 2nd, 2000, 01:37 AM
#1
Thread Starter
Addicted Member
How do I determine in the code whether or not my project is running compiled or not.
-
Sep 2nd, 2000, 01:51 AM
#2
Well, if it's compiled, than there should be an exe file.
Here is the code to determine if it exists:
Code:
If Dir(App.Path & "\" & App.EXEName & ".exe") <> "" Then
Msgbox "Project has been compiled"
Else
Msgbox "Project has not been compiled"
End If
Or do you want to check to see if your program is already running?
Code:
If App.PrevInstance Then
MsgBox App.Title & " is already running!
End
Exit Sub
End If
-
Sep 2nd, 2000, 04:29 AM
#3
Lively Member
do you mean this?
There is a way to determine whether the app is running in the development environment. I just can't remember where i got the info from. I will look and post back if i find the code.
Later
REM
"Innovate, don't immitate."
-
Sep 2nd, 2000, 05:21 AM
#4
Hyperactive Member
There is no such thing is App.IsRunningInIDE
But a while ago someone posted something like
Debug.Print 1 / 0
In the IDE this will cause a "division by zero" error. In the exe it won't since debug statements are not compiled.
However, I think this is *very* crappy, if you want certain code only be executed in the IDE (or only in the exe) just put some conditional compiler constants in the project properties (eg. DEBUG = 1)
and check it in your code like
#If DEBUG Then
' will only be executed when DEBUG = 1, else it will be ignored
#End If
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
|