DEFINE VARIABLE rStrFormat AS CLASS System.Drawing.StringFormat NO-UNDO.
/* Define and initialize ABL array to pass to .NET */ DEFINE VARIABLE dTabs AS DECIMAL EXTENT 4 INITIAL [20.0, 15.0, 10.0, 5.0] NO-UNDO. rStrFormat = NEW System.Drawing.StringFormat( ). /* Pass an ABL array to a .NET System.Single array parameter */ rStrFormat:SetTabStops(0.0, dTabs). |
DEFINE VARIABLE rStrFormat AS CLASS System.Drawing.StringFormat NO-UNDO.
/* Define and initialize ABL array to pass to .NET */ DEFINE VARIABLE dTabs AS DECIMAL EXTENT 4 INITIAL [ 20.0, 15.0, 10.0, 5.0 ] NO-UNDO. /* Define reference to a .NET System.Single array returned from .NET */ DEFINE VARIABLE rTabsOut AS CLASS "System.Single[]" NO-UNDO. /* Define ABL array to hold values returned in .NET array */ DEFINE VARIABLE dTabsOut AS DECIMAL EXTENT 4 NO-UNDO. DEFINE VARIABLE dTabOffset AS DECIMAL NO-UNDO. /* Unused OUTPUT parameter */ DEFINE VARIABLE idx AS INTEGER NO-UNDO. rStrFormat = NEW System.Drawing.StringFormat( ). /* Pass an ABL array to a .NET System.Single array parameter */ rStrFormat:SetTabStops( 0.0, dTabs ). /* Return a .NET System.Single array rTabsOut = rStrFormat:GetTabStops( OUTPUT dTabOffset ). DO idx = 1 TO 4: dTabsOut[idx] = UNBOX(rTabsOut:GetValue( idx - 1 )). MESSAGE "Tab stop" idx "=" dTabsOut[idx] VIEW-AS ALERT-BOX INFORMATION. END. |