Attribute VB_Name = "mMain"
Option Explicit
Public Type tagInitCommonControlsEx
lngSize As Long
lngICC As Long
End Type
Public Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
Public Const ICC_USEREX_CLASSES = &H200
Public Sub Main()
On Error Resume Next
Call LimitaAvvio(App.Title & " è già in funzione!")
Dim iccex As tagInitCommonControlsEx
With iccex
.lngSize = LenB(iccex)
.lngICC = ICC_USEREX_CLASSES
End With
InitCommonControlsEx iccex
On Error GoTo 0
Avvio.Show
Load GoddevaderMain
GoddevaderMain.Visible = False
End Sub
Sub LimitaAvvio(messaggio As String)
On Local Error GoTo errore
If App.PrevInstance Then
MsgBox messaggio, vbExclamation, App.Title
End
End If
Exit Sub
errore:
End
End Sub