Tip: You can find complete sample projects on creating plugins under the Help > Samples folder. For example C:\Program Files (x86)\Blackbaud\The Financial Edge\Help\Samples\PLUGINS

The typical plug-in is made of two parts. The first is a class module that implements the IBBHostedPlugin and the IBBHeaderInfo interface, and which provides information about the plug-in. The second is a document that provides the user interface. The document type depends on the application you want to build.This example procedure and sample code use Visual Basic 6.0 to create a COM dynamic link library (DLL) called pMyPlugIn.DLL.

  • To set up a plug-in class, set references to the Blackbaud 7.3 EE object library, Blackbaud FE 7.0 object library and the Blackbaud Common Shell Interfaces 7.0 type library. If you need to reference other libraries, you should also set those references.
  • Add a reference to the interface.
Implements IBBHostedPlugIn
Implements IBBHeaderInfo
'A session context for the application is passed in when the
'plug-in is initialized (IBBHostedPlugIN_OnInit()). This may not
'be necessary, depending on the application.
Private moSessionContext As IBBSessionContext
 
'When the plug-in is loaded (IBBHostedPlugIn_OnLoad()), the main
'user interface document is passed in. This may not be
'necessary, depending on the application.
Private moUserDoc As docMyActiveXPlugin ' use if ActiveX Page
  • Set initialization information. Note that when a plug-in is first accessed, The Education Edge or Blackbaud Student Information System host must perform several initialization tasks before the plug-in is loaded. Because these tasks require that the OnInit and OnCloseDown events fire, you cannot use those events to determine whether or not the plug-in has been run. You should avoid putting code into these events, with the exception of setting a reference to the SessionContext in OnInit and clearing the reference in OnCloseDown. OnLoad and OnQueryUnLoad do not fire during the initialization process, so you can use them for any required start-up and closedown code.
Private Sub IBBHostedPlugin_OnInit(ByVal oApp As IBBShellInterfaces.IBBHostedApp)
    Set moContext = oApp.System.SessionContext
End Sub
 
Private Sub IBBHostedPlugin_OnLoad(ByVal oDoc As Object)
    Set moUserDoc = oDoc
End Sub
  • Specify the name of the plug-in user interface document. The IBBHostedPlugin_URL property should return the path to the user interface file. If your interface consists of user documents, when you create the DLL, the user documents are created in the same directory as the *.vbd DLL.
Uses App.Path to return the path to your compiled DLL file.
Private Property Get IBBHostedPlugin_ProgID() As String
    IBBHostedPlugin_ProgID = "pMyPlugin." & TypeName(moUserDoc)
End Property
 
Private Property Get IBBHostedPlugin_URL() As String
    IBBHostedPlugin_URL = App.Path & "\docMyActiveXPlugin.vbd"
End Property
  • Create a user-friendly description for your plug-in. This text appears as a link on the Plug-ins page.
Private Property Get IBBHeaderInfo_Name() As String
    IBBHeaderInfo_Name = "My ActiveX Plug-in"
End Property
Private Property Get IBBHeaderInfo_Description() As String
    IBBHeaderInfo_Description = "A Simple Example of an ActiveX Plug-In"
End Property
  • Create a caption for the plug-in and add a graphic, if desired. These appear at the top of the Plug-Ins page. Header images can be *.jpg, *.gif, or *.bmp format, but they are restricted to 32 x 32 pixels.
Private Property Get IBBHeaderInfo_Caption() As String
    IBBHeaderInfo_Caption = "My ActiveX Plug-in"
End Property
 
Private Property Get IBBHeaderInfo_Image() As String
        IBBHeaderInfo_Image = App.Path & ?\MyPlugIn.jpg?
End Property
  • Close down the plug-in properly. The IBBHostedPlugIn_OnQueryUnload occurs before either the plug-in or application closes. Linking to a separate HTML page from the shell or switching to another shell menu item also fires this event. With OnQueryUnload, you can verify information and cancel the close process if the user did not complete all necessary tasks. If you set bCancel to true, it cancels the unload and returns the user to the plug-in form. If the user tries to close The Education Edge or Blackbaud Student Information System, bShellIsUnloading returns True.
Private Sub IBBHostedPlugin_OnQueryUnload(bCancel As Boolean, ByVal bHostIsUnloading As Boolean
    'AllowClose is a public method on the docMyPlugIn user
    'document. The routine validates the user input
    'and determines if the plug-in can be closed.
    If Not moUserDoc.AllowClose Then
        MsgBox "Checkbox must be marked in order to close this plug-in."
        bCancel = True
    End If
End Sub
 
Private Sub IBBHostedPlugin_OnClosedown()
 
    'Clean up module level variables
    If Not moUserDoc Is Nothing Then
        Set moUserDoc = Nothing
    End If
 
    If Not moContext Is Nothing Then
        Set moContext = Nothing
    End If
End Sub

For additional details on using the VBA/API in The Financial Edge, please reference The Financial Edge VBA and API Guide.

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.