Assign a value to a print control property.
[C#] public void SetValue( fieldName string, propName string, object val );
[Visual Basic] public sub SetValue( _ ByVal fieldName As string _ ByVal propName As string _ ByVal val as object _ ) As Void
[Visual RPG] BegSr SetValue Type(Void) Access(*Public) DclSrParm fieldName Type(*string) DclSrParm propName Type(*string) DclSrParm val Type (*object)
- fieldName
- String. The field in the format represented by IPrintProperties associated with the print control.
- propName
- String. The property name of the print control to obtain the value of.
- val
- Object. The value to assign to the property.
Exception Type | Condition |
---|---|
|
The property specified by propName cannot be found for the control of the field specified by fieldName. |
NullReferenceException |
fieldName or propName is a null reference. |
Print controls associated with format fields have run-time properties that can be assigned with SetValue. IPrintProperties refers to the format containing the field with associated print control, fieldName refers to the field, and propName is the name of a property of the control. The value assigned to the property is passed as val.
Since print controls may be implemented as COM-based unmanaged objects, this method may invoke .NET interoperability functions to obtain a so-called "runtime callable wrapper" for such controls. The user should be aware of the constraints of .NET interoperability in terms of performance and security when using this method.
As a convenience, SetValue performs a simple conversion for certain OLE class types representing image data. If val is of type System.Drawing.Image, then DCS uses .NET framework classes to convert the value to the stdole.IPicture type. The Image class is somewhat more useful for .NET programs and objects of the type are readily convertible to one of the OLE interop types if necessary.
Namespace: ASNA.DataGate.Providers
Assembly: ASNA DataGate Client
Platforms: Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows 7, Windows 8 Pro, Windows 8.1 Pro, Windows 10 Pro