Help & Support
Contents
Display Legacy Contents

Search:

Home > Impact Suite > Tables and Forms > Advanced Functions > Run Custom Compiled Code

Run Custom Compiled Code

With the release of Impact 4.2 (build 117) you can now run compiled custom code from the data-entry form button control. This code can be written in VisualBasic or VisualCSharp.  You will need to build a DLL using Visual Studio 2008 or better.

Create the DLL
In the VS project create a new class as shown below and compile into a DLL.

Public Class SDKExample

     Public Shared Function RunCustomCode(ByVal form As Durkin.Common.Classes.frmSubEntityItemEditDurkin) As Boolean

        System.Diagnostics.Debugger.Break()

        Return True

    End Function

End Class


Installing the DLL
To install your custom dll please follow these steps:
  1. Close ACT!
  2. Copy your DLL into the plugin folder
  3. Restart ACT

The ACT plugin folder is either at one of these two locations:
C:\Program Files (x86)\ACT\Act for Windows\Plugins    ( 64 bit machine)
C:\Program Files\ACT\Act for Windows\Plugins (32 bit machines)


Calling the DLL code:
To call you custom code you need to add a button onto your form and set the buttons properties to match your; DLL Name, Class and method. Please follow these steps:
  1. Open you form in the designer
  2. Change the drop down at the top of the toolbox to "Controls - Specialized"
  3. Drag the BUTTON [DLL INVOKE] onto your form

    On the 'Custom Properties' panel change these properties
  4. Set the dllclass property to Durkin.Custom.RunCustomCode.SDKExample
  5. Set the dllfilename property to Durkin.Custom.RunCustomCode.dll
  6. Set the dllmethod property to RunCustomCode
  7. Save and close the form.



See also



Properties
Article ID:
run_custom_compiled_code
Views: 254
Created By: jimdurkin
Modified By: [Modified By]
Created Date: 3/24/2014 12:31 PM
Last Modified: 3/24/2014 1:40 PM
Actions
Print This Article
Bookmark
Email This Article
Previous Article
Next Article