system.diagnostics.debugger.isattached
--
HTH
Éric Moreau, MCSD
Conseiller Principal / Senior Consultant
Concept S2i inc.(
www.s2i.com)
"Rob Nicholson" <rob.nicholson@NOSPAM_informed-direct.com> wrote in message
news:%23Gbgt7$(E-Mail Removed)...
> How do you determine if a program is running in the Visual Studio
> IDE/debugger as opposed to standalone? We often include support files in
the
> same folder as the executable and would so something like:
>
> Dim SupportFile As String
> SupportFile = Application.StartupPath & "\SupportFile.txt"
>
> But of course this fails when running in the IDE as the executable is in
the
> BIN folder so we need to do something like this:
>
> Readonly Property SupportFilesPath() As String
> Get
> If IsIde() Then
> SupportFilesPath = Application.StartupPath & "..\"
> Else
> SupportFilesPath = Application.StartupPath & "\"
> End If
> End Get
> End Property
>
> Need to implement that IsIde() function/property...
>
> Thanks, Rob.
>
>