1 |
joko |
1.1 |
Attribute VB_Name = "declares" |
2 |
|
|
Option Explicit |
3 |
|
|
|
4 |
|
|
Declare Sub DebugBreak Lib "kernel32" () |
5 |
|
|
|
6 |
|
|
Enum svcApplicationMode |
7 |
|
|
appMode_Standalone |
8 |
|
|
appMode_NTService |
9 |
|
|
End Enum |
10 |
|
|
|
11 |
|
|
Function IsIDE() As Boolean |
12 |
|
|
On Error GoTo ErrHandler |
13 |
|
|
'because debug statements are ignored when |
14 |
|
|
'the app is compiled, the next statment will |
15 |
|
|
'never be executed in the EXE. |
16 |
|
|
Debug.Print 1 / 0 |
17 |
|
|
IsIDE = False |
18 |
|
|
Exit Function |
19 |
|
|
ErrHandler: |
20 |
|
|
'If we get an error then we are |
21 |
|
|
'running in IDE / Debug mode |
22 |
|
|
IsIDE = True |
23 |
|
|
End Function |
24 |
|
|
|
25 |
|
|
' -------------------------------------------------------------------- |
26 |
|
|
' just a little helper-function to do some simple reporting to our main-form |
27 |
|
|
Sub setCurrentStatus(txtStatus As String) |
28 |
|
|
With FormMain.Text_Status |
29 |
|
|
.Text = .Text & txtStatus & vbCrLf |
30 |
|
|
End With |
31 |
|
|
End Sub |
32 |
|
|
|