Results 1 to 4 of 4

Thread: Compiled or not compiled

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Adelaide - Australia
    Posts
    150

    Talking

    How do I determine in the code whether or not my project is running compiled or not.

  2. #2
    Guest
    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

  3. #3
    Lively Member
    Join Date
    Apr 2000
    Posts
    110

    Question 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."

  4. #4
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    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
    Hope this helps

    Crazy D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width