- If a strong named interop assembly has not been created, create one
- Create a new Class Library Project
- Set a reference to the interop assembly created in step 1
- The following code will get you started:
Imports BBREAPI7 'Replace BBREAPI7 with the name of the interop assembly created in step 1.
Public Class Class1
Implements IBBPlugIn
Private moSC As IBBSessionContext
Public ReadOnly Property DocumentName() As String Implements BBREAPI7.IBBPlugIn.DocumentName
Get
'Insert the path to the HTML document
End Get
End Property
Public ReadOnly Property DocumentType() As BBREAPI7.REShellDocumentTypes Implements BBREAPI7.IBBPlugIn.DocumentType
Get
'Select your document type
'DocumentType = REShellDocumentTypes.redocHTMLPage
'VB.Net Does not have an option to create a user document, however
'a Form could be called in place of the User Document.
DocumentType = REShellDocumentTypes.redocActiveXDocument
End Get
End Property
Public ReadOnly Property HeaderCaption() As String Implements BBREAPI7.IBBPlugIn.HeaderCaption
Get
HeaderCaption = "VB.Net Plugin"
End Get
End Property
Public ReadOnly Property HeaderImage() As String Implements BBREAPI7.IBBPlugIn.HeaderImage
Get
End Get
End Property
Public Sub OnClosedown() Implements BBREAPI7.IBBPlugIn.OnClosedown
If Not moSC Is Nothing Then
moSC = Nothing
End If
End Sub
Public Sub OnInit(ByRef oREHost As BBREAPI7.IBBShellHost) Implements BBREAPI7.IBBPlugIn.OnInit
moSC = oREHost.SessionContext
End Sub
Public Sub OnLoad(ByRef oDoc As Object) Implements BBREAPI7.IBBPlugIn.OnLoad
'Do something when the Plugin is loaded.
'You could call a form here.
MsgBox("This is a messagebox")
End Sub
Public Sub OnQueryUnload(ByRef bCancel As Boolean, ByVal bShellIsUnloading As Boolean) Implements BBREAPI7.IBBPlugIn.OnQueryUnload
End Sub
Public Function PluginDescription() As String Implements BBREAPI7.IBBPlugIn.PluginDescription
PluginDescription = "VB Dot Net Plugin Sample"
End Function
Public Function PluginName() As String Implements BBREAPI7.IBBPlugIn.PluginName
PluginName = "VB Dot Net Plugin Sample"
End Function
End Class
- Right-click on the Project and select Project Properties
- Select Configuration Properties, Build
- Mark the box for Register for Com Interop
- Compile the project
- Copy the pluginname.dll, pluginname.tlb and the REDotNetAPI.dll to the Raiser's Edge 7\Plugins directory
- Use the regasm utility with the /codebase option to register the pluginname.dll file. The command would like something like this:
regasm \pluginname.dll /codebase
- Access Raiser's Edge and you should see the plug-in.
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.