vbAccelerator - Contents of code file: mMain.bas
Attribute VB_Name = "mMain"
Option Explicit
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
Private Declare Function SetErrorMode Lib "kernel32" ( _
ByVal wMode As Long) As Long
Private Const SEM_FAILCRITICALERRORS = &H1
Private Const SEM_NOGPFAULTERRORBOX = &H2
Private Const SEM_NOOPENFILEERRORBOX = &H8000&
Private m_bInIDE As Boolean
Public Sub Main()
InitCommonControls
Dim f As New frmMACAudio
f.Show
End Sub
' The VS.NET tab control doesn't have the
' LoadLibrary Shell32.dll hack, hence we need to
' kill the error at shutdown
Public Sub UnloadApp()
If Not InIDE() Then
SetErrorMode SEM_NOGPFAULTERRORBOX
End If
End Sub
Public Property Get InIDE() As Boolean
Debug.Assert (IsInIDE())
InIDE = m_bInIDE
End Property
Private Function IsInIDE() As Boolean
m_bInIDE = True
IsInIDE = m_bInIDE
End Function
|
|