eclare Function SetErrorMode Lib "kernel32" (ByVal wMode As Long) As
 Long
Private Const SEM_FAILCRITICALERRORS = &amp;H1
Private Const SEM_NOGPFAULTERRORBOX = &amp;H2
Private Const SEM_NOOPENFILEERRORBOX = &amp;H8000

Private m_bInIDE As Boolean


Public Sub Main()

   ' we need to call InitCommonControls before we
   ' can use the alpha support in the ImageList.
   ' Note this will only work when the control is
   ' being used as an OCX
   InitCommonControls
   
   ' now start the application
   On Error 