summaryrefslogtreecommitdiff
path: root/migrationanalysis/src/wizard/Wizard.Dsr
blob: 7b031dc5b048ebba0f26f400e0e3d76bce78b498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
VERSION 5.00
Begin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} Wizard 
   ClientHeight    =   7470
   ClientLeft      =   1740
   ClientTop       =   1545
   ClientWidth     =   6585
   _ExtentX        =   11615
   _ExtentY        =   13176
   _Version        =   393216
   DisplayName     =   "AnalysisWizard"
   AppName         =   "Visual Basic"
   AppVer          =   "Visual Basic 6.0"
   LoadName        =   "Command Line / Startup"
   LoadBehavior    =   5
   RegLocation     =   "HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0"
   CmdLineSupport  =   -1  'True
End
Attribute VB_Name = "Wizard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Dim mcbMenuCommandBar         As Office.CommandBarControl  'command bar object
Public WithEvents MenuHandler As CommandBarEvents          'command bar event handler
Attribute MenuHandler.VB_VarHelpID = -1
Dim mfrmWizard As frmWizard
Dim VBInstance As VBIDE.VBE


'------------------------------------------------------
'this method adds the Add-In to the VB menu
'it is called by the VB addin manager
'------------------------------------------------------
Private Sub AddinInstance_OnConnection(ByVal application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
   On Error GoTo error_handler
   
   Set VBInstance = application
   
   If ConnectMode = ext_cm_External Then
       'Used by the wizard toolbar to start this wizard
       LoadMe
   Else
       Set mcbMenuCommandBar = AddToAddInCommandBar(VBInstance, LoadResString(15), LoadResPicture(5000, 0))
       'sink the event
       Set Me.MenuHandler = VBInstance.Events.CommandBarEvents(mcbMenuCommandBar)
   End If
  
   Exit Sub
     
error_handler:
   MsgBox Err.Description
End Sub

'------------------------------------------------------
'this method removes the Add-In from the VB menu
'it is called by the VB addin manager
'------------------------------------------------------
Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
    'delete the command bar entry
    mcbMenuCommandBar.Delete
End Sub

'this event fires when the menu is clicked in the IDE
Private Sub MenuHandler_Click(ByVal CommandBarControl As Object, handled As Boolean, CancelDefault As Boolean)
    LoadMe
End Sub

Private Sub LoadMe()
    Set mfrmWizard = New frmWizard
    'pass the vb instance to the wizard module
    Set mfrmWizard.VBInst = VBInstance
    'load and show the form
    mfrmWizard.Show vbModal
    Set mfrmWizard = Nothing
End Sub