gmslControlDataClass

The Control Service Class

The service class ControlData accesses control Data

The method FindProperty

Interface: Integer FindProperty(int ctlType, string propName, int iCode);


<Method id="FindProperty" type="Integer" opcode="SCM.ControlData_FindProperty" >
   <Argument id="ctlType" type="Integer" status="ByVal" />
   <Argument id="propName" type="String" status="ByVal" />
   <Argument id="iCode" type="Integer" status="ByVal" />
</Method>
The method FindProperty locates the assignment value for a property specified via its operation code in the parameter ctlType and its operation subcode in the parameter propType. If that value is present its code starting offset is returned; else zero is returned.

The method GetFontSize

Interface: string GetFontSize(int iCode, int inXml);


<Method id="GetFontSize" type="String" opcode="SCM.ControlData_GetFontSize" >
   <Argument id="iCode" type="Integer" status="ByVal" />
   <Argument id="inXml" type="Integer" status="ByVal" Optional="1" />
</Method>
The method GetFontSize returns the authored value of a Font Size property whose value whose code starting offset is in the parameter iCode. The string result is returned in the parameter valueInfo. The method returns the length of the result. Note that regarding Font Size, the font units in VB6 and WinForms is Points In XML all sizes are in logical Pixels. We typically can use 72 points/inch and 96 pixels/inch for scaling.

The method GetProperty

Interface: string GetProperty(int iCode, int inXml);


<Method id="GetProperty" type="String" opcode="SCM.ControlData_GetProperty" >
   <Argument id="iCode" type="Integer" status="ByVal" />
   <Argument id="inXml" type="Integer" status="ByVal" Optional="1" />
</Method>
The method GetProperty returns the authored value of a property whose value code starting offset is in the parameter iCode. The string result is returned in the parameter valueInfo. The method returns the length of the result.

The method GetValue

Interface: int GetValue(int iCode);


<Method id="GetValue" type="Integer" opcode="SCM.ControlData_GetValue" >
   <Argument id="iCode" type="Integer" status="ByVal" />
</Method>
The method GetValue returns the integer value of a property whose value code starting offset is in the parameter iCode.

The method LoadCode

Interface: int LoadCode(int ctlRoot, int cmpOnly);


<Method id="LoadCode" type="Integer" opcode="SCM.ControlData_LoadCode" >
   <Argument id="ctlRoot" type="Integer" status="ByVal" />
   <Argument id="cmpOnly" type="Integer" status="ByVal" optional="0" />
</Method>
The method ControlData_LoadCode loads the property code vector into the next available byte of code storage and returns the offset of that starting byte. The parameter ctlRoot is the root offset of the control whose data is to be accessed. If the control has no code vector associated with it, then a zero is returned. Note that when the code vector is no longer needed the user must call the method Opcode.SetLength(iCode), where iCode was the return value of this method. The parameter cmpOnly, if nonzero, specifies that the original compiled code only should be used, not the modified analysed code.

The method ReplaceValue

Interface: int ReplaceValue(int icode, int opcode, int subcode);


<Method id="ReplaceValue" type="Integer" opcode="SCM.ControlData_ReplaceValue" >
   <Argument id="icode"   type="Integer" status="ByVal" />
   <Argument id="opcode"  type="Integer" status="ByVal" />
   <Argument id="subcode" type="Integer" status="ByVal" />
</Method>
The method ControlData_ReplaceValue replaces the value of a property whose value code starting offset is in the parameter iCode.

The method SaveCode

Interface: void SaveCode(int ctlRoot, int iStart);


<Method id="SaveCode" type="Void" opcode="SCM.ControlData_SaveCode" >
   <Argument id="ctlRoot" type="Integer" status="ByVal" />
   <Argument id="iStart" type="Integer" status="ByVal" />
</Method>

Table of Contents