September 30, 2003

Detect if in VB6 IDE

I found this code. It might be useful in the fututre.

Private m_bInIDE As Boolean

Private Function DoIDECheck() As Boolean

'this will only be called in we are running inside the IDE
m_bInIDE = True
DoIDECheck = True

End Function

Private Function IsInIDE() As Boolean

'are we running inside the VB IDE ?
Debug.Assert (DoIDECheck())
IsInIDE = m_bInIDE

End Function

Posted by Michael at September 30, 2003 12:16 PM

Comments

Great I have been looking for this for a while,
I thought there was a build in function to do it but this is just fine.

Thanks

Posted by: David at December 4, 2003 06:48 PM