Advertisement
7_2009-2012 Windows API Call/ Explanation #221625

Determine IDE/Debugging Status

This function will return whether you are running your program or DLL from within the IDE, or compiled. I use it as part of my DLL's like active document DLL's to setup information that would normally be supplied from the outside.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Public Function InVBDesignEnvironment() As Boolean
 
 Dim strFileName As String
 Dim lngCount As Long
 
 strFileName = String(255, 0)
 lngCount = GetModuleFileName(App.hInstance, strFileName, 255)
 strFileName = Left(strFileName, lngCount)
 
 InVBDesignEnvironment = False
 If UCase(Right(strFileName, 7)) = "VB5.EXE" Then
  InVBDesignEnvironment = True
 ElseIf UCase(Right(strFileName, 7)) = "VB6.EXE" Then
  InVBDesignEnvironment = True
 End If
End Function
Original Comments (3)
Recovered from Wayback Machine