In one project we are using old VB6 application which is referenced also as COM component to communicate with it from .NET. I needed a way to find out whether VB6 application runs as standalone EXE or ActiveX.
If App.StartMode = vbSModeStandalone Then
‘ Started as standalone EXE
If App.StartMode = vbSModeAutomation Then
‘ Started as COM component